Skip to content
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

Enabling separate metrics pull #39

Open
danijel-zima opened this issue Apr 10, 2019 · 0 comments
Open

Enabling separate metrics pull #39

danijel-zima opened this issue Apr 10, 2019 · 0 comments

Comments

@danijel-zima
Copy link

To get separate metrics per JAVA process, following modifications have to be done:
in metrics-java-heap-graphite-java8.sh
Lines 40 & 65 instead:
PID=$(sudo jps | grep " $NAME$" | awk '{ print $1}')
&
projectName=$(sudo jps | grep $PID | awk '{ print $2}' | cut -d. -f1)

It would be nice to have:

PID=$(sudo jps -l | grep " $NAME$" | awk '{ print $1}')
&
projectName=$(sudo jps -l | grep $PID | awk '{ print $2}' | cut -d. -f1)

And

in metrics-java-heap-graphite.sh

Line 50
project=$(sudo jps | grep $PID | awk '{ print $2 }' | cut -d. -f1)
to
project=$(sudo jps -l | grep $PID | awk '{ print $2 }' | cut -d. -f1)

-l is added after jps command

Best Regards

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

No branches or pull requests

1 participant