Wednesday, May 20, 2009

runqueue.d

The minimal interval for which sar is able to collect statistics
is one second. If a system has many processes that take a couple
of milliseconds to run, sar will not know that they are in the
run queue.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

#!/usr/sbin/dtrace -s

#
# Used for automating checks of CPU, memory, I/O, and network TCP performance.
#
# This script is described and explained in the BigAdmin Tech Tip:
# Automating a System Performance Check Using the checkperf Utility
# http://www.sun.com/bigadmin/content/submitted/perf_check.jsp
#

#pragma D option quiet

profile-1000hz
/curthread->t_cpu->cpu_disp->disp_nrunnable/
{
@runq = sum(curthread->t_cpu->cpu_disp->disp_nrunnable);
}

profile:::tick-30sec
{
normalize(@runq, 3000);
printa("%@8d", @runq);
exit(0);
}


##############################################################################
### This script is submitted to BigAdmin by a user of the BigAdmin community.
### Sun Microsystems, Inc. is not responsible for the
### contents or the code enclosed.
###
###
### Copyright Sun Microsystems, Inc. ALL RIGHTS RESERVED
### Use of this software is authorized pursuant to the
### terms of the license found at
### http://www.sun.com/bigadmin/common/berkeley_license.jsp
##############################################################################

No comments:

Post a Comment