Package org.acemq.workloads.endurance
Interface ProcessSampler
- All Known Implementing Classes:
ProcessSampler.Proc,ProcessSampler.PsLsof
public interface ProcessSampler
What a process is holding, read from outside it.
From outside because none of the five libraries reports any of this, and teaching all five would measure what each believes about itself rather than what the operating system can see it holding. A pid is a pid in every language, so a sixth client costs nothing here.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classLinux:/proc/<pid>/statusfor VmRSS and Threads, and the entries of/proc/<pid>/fdfor descriptors.static final classmacOS and other Unixes:ps -o rss=,lsof -pandps -M, counted exactly asscripts/soak.shcounted them so a report from either compares with the other: every line lsof prints, header included, and every thread line ps prints after its header.static final record -
Method Summary
-
Method Details
-
sample
- Returns:
- what the process holds, or empty if it is not running
-
forThisOs
- Returns:
- the sampler for this operating system: /proc on Linux, ps and lsof elsewhere
-