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

Remove sigar from JvmMonitor #33

Merged
merged 2 commits into from
Aug 1, 2017
Merged

Remove sigar from JvmMonitor #33

merged 2 commits into from
Aug 1, 2017

Conversation

drcrallen
Copy link
Contributor

No description provided.


import com.metamx.common.RE;
import java.lang.management.ManagementFactory;
import java.util.regex.Pattern;

/**
* For systems that for whatever reason cannot use Sigar (through com.metamx.metrics.cgroups.SigarPidDiscoverer ),
* For systems that for whatever reason cannot use Sigar (through com.metamx.metrics.SigarPidDiscoverer ),
* this attempts to get the PID from the JVM "name".
*/
public class JvmPidDiscoverer implements PidDiscoverer
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add a static method to not always force to create an object JvmPidDiscoverer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

Copy link
Contributor

Choose a reason for hiding this comment

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

I meant a static method that just returns Pid, but it works too


import com.metamx.common.RE;
import java.lang.management.ManagementFactory;
import java.util.regex.Pattern;

/**
* For systems that for whatever reason cannot use Sigar (through com.metamx.metrics.cgroups.SigarPidDiscoverer ),
* For systems that for whatever reason cannot use Sigar (through com.metamx.metrics.SigarPidDiscoverer ),
* this attempts to get the PID from the JVM "name".
*/
public class JvmPidDiscoverer implements PidDiscoverer
Copy link
Contributor

Choose a reason for hiding this comment

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

I meant a static method that just returns Pid, but it works too

@drcrallen drcrallen merged commit 41066f3 into master Aug 1, 2017
@drcrallen drcrallen deleted the noSigarJVMMonitor branch August 1, 2017 18:36
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