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

Replacing sigar #11995

Closed
wants to merge 5 commits into from
Closed

Replacing sigar #11995

wants to merge 5 commits into from

Conversation

tlrx
Copy link
Member

@tlrx tlrx commented Jul 2, 2015

A first step in order to remove sigar (see #11034)

This pull request removes all Sigar stuff and adds the ability to query multiple probes at once. It focused on Process stats/info for now and serves as an example for the other stats we have (Os, Fs, Network).

@tlrx tlrx added v2.0.0-beta1 review :Data Management/Stats Statistics tracking and retrieval APIs labels Jul 2, 2015
@tlrx
Copy link
Member Author

tlrx commented Jul 2, 2015

For the record, here are some data collected by the JmxProcessProbe and the SigarProcessProbe (not part of this pull request) on different platforms:

Empty values means "not supported".

Linux - Oracle Corporation Java HotSpot(TM) 64-Bit Server VM (1.8.0_20)
Probe method JmxProcessProbe SigarProcessProbe
pid 6239 6239
openFileDescriptor 61 62
maxFileDescriptor 4096
processCpuTime 3580 3570
processCpuLoad 33 0
processSystemTime 16 170
processUserTime 0 3400
residentMemorySize 210898944
sharedMemorySize 15446016
totalVirtualMemorySize 7149735936 7149731840
Linux - Oracle Corporation OpenJDK 64-Bit Server VM (1.7.0_79)
Probe method JmxProcessProbe SigarProcessProbe
pid 6131 6131
openFileDescriptor 62 63
maxFileDescriptor 4096
processCpuTime 2090 2080
processCpuLoad 50 0
processSystemTime 12 50
processUserTime 0 2030
residentMemorySize 144453632
sharedMemorySize 14565376
totalVirtualMemorySize 5920894976 5920890880
Windows 8.1 - Oracle Corporation Java HotSpot(TM) 64-Bit Server VM (1.8.0_25)
Probe method JmxProcessProbe SigarProcessProbe
pid 2888 2888
openFileDescriptor 377
maxFileDescriptor 4096
processCpuTime 3656 3655
processCpuLoad 0
processSystemTime 0 437
processUserTime 0 3218
residentMemorySize 188260352
sharedMemorySize -1
totalVirtualMemorySize 378478592 2626973696

public Long processSystemTime() {
if (!threadMxBean.isThreadCpuTimeSupported()) {
throw new UnsupportedOperationException("JmxProcessProbe does not support process user time");
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you happen to know if any platforms where this returns false?

Copy link
Member Author

Choose a reason for hiding this comment

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

No. This method is documented as the flag to indicate if CPU time is supported, I think it makes sense to use it here before requesting value

@tlrx
Copy link
Member Author

tlrx commented Jul 3, 2015

Closed in favor of #12010 , I keep the code here for the record.

@tlrx tlrx closed this Jul 3, 2015
@kevinkluge kevinkluge removed the review label Jul 3, 2015
@tlrx tlrx deleted the replacing-sigar branch May 19, 2016 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>breaking :Data Management/Stats Statistics tracking and retrieval APIs v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants