It turned out ps wasn't really what was using most CPU resource. The MQ agent ( 
and its probes ) is.
I put in a small script to output continuously every second:
#!/usr/sbin/dtrace -qs

profile-1001
/pid == $target || progenyof($target)/
{
 @a["on-CPU, 1001 Hertz count:"] = count();
}

tick-1
{
 printa(@a);
 trunc(@a)
}

This is from Application Agent:
  on-CPU, 1001 Hertz count:                                         2
  on-CPU, 1001 Hertz count:                                         2
  on-CPU, 1001 Hertz count:                                         2
  on-CPU, 1001 Hertz count:                                       510
  on-CPU, 1001 Hertz count:                                       410
  on-CPU, 1001 Hertz count:                                       677
  on-CPU, 1001 Hertz count:                                       796
  on-CPU, 1001 Hertz count:                                       750
  on-CPU, 1001 Hertz count:                                       828
  on-CPU, 1001 Hertz count:                                       518
  on-CPU, 1001 Hertz count:                                       751
  on-CPU, 1001 Hertz count:                                      1086
  on-CPU, 1001 Hertz count:                                       604
  on-CPU, 1001 Hertz count:                                       992
  on-CPU, 1001 Hertz count:                                       568
  on-CPU, 1001 Hertz count:                                       736
 ...

And MQ agent:
...
  on-CPU, 1001 Hertz count:                                      1696
  on-CPU, 1001 Hertz count:                                      1743
  on-CPU, 1001 Hertz count:                                      1784
  on-CPU, 1001 Hertz count:                                      1679
  on-CPU, 1001 Hertz count:                                      1691
  on-CPU, 1001 Hertz count:                                      1547
 ...

Since profile probes fire on both CPUs, a 1001 Hz probe should fire 2002 times 
a second correct? So 1743 fires is almost like 85% of CPU used.

Thanks Brendan for the idea.

Sean


--
This message posted from opensolaris.org
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to