add proc_state.threads metric

This commit is contained in:
Doug MacEachern committed 2005-11-22 21:45:45 +00:00
1 parent 5ae081f7a9
commit fb61a2ebb0
5 files changed
+34 -1

No files matched your search

+5
View File
@@ -348,6 +348,11 @@ my %classes = (
desc => 'Kernel scheduling priority of process',
plat => 'DFHLSW'
},
{
name => 'threads', type => 'Long',
desc => 'Number of active threads',
plat => ''
},
],
ProcFd => [
{
@@ -21,7 +21,8 @@ public class TestProcState extends SigarTestCase {
ProcState procState = sigar.getProcState(sigar.getPid());
char state = procState.getState();
traceln(procState.getName() + "=" + state);
traceln("threads=" + procState.getThreads());
assertTrue((state == 'R') || (state == 'S'));
assertTrue(procState.getName().indexOf("java") != -1);