[X-Unix] Processor/process Context Switching

gurple gurple at mac.com
Wed Nov 30 00:22:44 PST 2005


Alexandre,

You're right, it is installed on your PowerBook. However, and this  
may be an indictment of my lack of keen observation, it is a version  
that doesn't provide the detailed view of the system I'm used to on  
SunOS or HP/UX. I have, however, found a tool called 'latency' that  
does report on process context switching. It seems to only want to  
report cumulative stats as the tool is run rather than independent  
slices.

For example, here is what "typical" 'sar' output would look like  
having been instructed to tick twice at a two second interval:

Solaris 10
-----------------------------------------------------------
-bash-3.00$ sar -w 2 2

SunOS localhost 5.10 Generic i86pc    11/30/2005

00:13:52 swpin/s bswin/s swpot/s bswot/s pswch/s
00:13:54    0.00     0.0    0.00     0.0     124
00:13:56    0.00     0.0    0.00     0.0     150

Average     0.00     0.0    0.00     0.0     137
-----------------------------------------------------------

Here is the output of 'latency' having run 10 seconds

MacOS X 10.4.3
-----------------------------------------------------------
localhost:~ user$ sudo latency
Wed Nov 30 09:17:47                             0:00:10
                      SCHEDULER     INTERRUPTS
---------------------------------------------
total_samples             8945          14042

delays <  10 usecs        7616          14011
delays <  20 usecs        1064             20
delays <  30 usecs         193              6
delays <  40 usecs          13              3
delays <  50 usecs           9              2
delays <  60 usecs           7              0
delays <  70 usecs           6              0
delays <  80 usecs           8              0
delays <  90 usecs           4              0
delays < 100 usecs           1              0
total  < 100 usecs        8921          14042

delays < 200 usecs          19              0
delays < 300 usecs           2              0
delays < 400 usecs           0              0
delays < 500 usecs           0              0
delays < 600 usecs           1              0
delays < 700 usecs           1              0
delays < 800 usecs           0              0
delays < 900 usecs           1              0delays <   1  
msec            0    e
-----------------------------------------------------------

'latency' will work but it's not as friendly for my needs.

Cheers,
gurple

--
We've secretly replaced his regular signature with Folgers Crystals®

On Nov 30, 2005, at 2:16, Alexandre Gauthier wrote:

> Well, I doubt I have installed it manually, but apparently /usr/bin/ 
> sar
> is present on my OS X 10.4 Powerbook.



More information about the X-Unix mailing list