Skip to content

#130 script to generate javacore collector for linux #146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sonaleegupta
Copy link
Collaborator

Issue: 130

This PR contains javacoreCollector.sh linux script that accepts:

  • javaPid, with the value being the java process ID
  • number, the number of javacores to generate, default 10
  • interval, the time between two subsequent javacores in seconds, default 30

@@ -0,0 +1,38 @@
#Copyright IBM Corp. 2025 - 2026
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copyright should be 2025-2025

# Validation
if [[ -z "$libertyPath" && -z "$javaPid" ]]; then
echo "Error: You must provide either 'libertyPath' or 'javaPid'."
echo " ./javacoreCollector.sh libertyPath=/servers/clm"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The path should be like /opt/ibm/liberty

Copy link
Collaborator

@kkazmierczyk kkazmierczyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The patch looks good for me so far.

What needs to be done:

  1. Get an option for running the tool in liberty path
  2. Get parametrised $count and $interval

@kkazmierczyk
Copy link
Collaborator

@sonaleegupta are you fine with further working on the patch? Let me know if you want to meet

@sonaleegupta
Copy link
Collaborator Author

@sonaleegupta are you fine with further working on the patch? Let me know if you want to meet

@kkazmierczyk yes, I'm on it.

@sonaleegupta sonaleegupta requested a review from kkazmierczyk May 6, 2025 11:26
Copy link
Collaborator

@kkazmierczyk kkazmierczyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the current changes look good. I think the next step would be to generate collector option for libery path. Here is how you need to run it:

export WLP_USER_DIR=/liberty
export JAVA_HOME=/server/jre
./liberty/wlp/bin/server javadump <server_name>

WLP_USER_DIR, JAVA_HOME and <server_name> should be configurable through the script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants