Operating System - HP-UX
1832069 Members
2843 Online
110034 Solutions
New Discussion

Re: How to access "process context switches` information

 
Jerry Sims
Advisor

How to access "process context switches` information

In the past I have utilized System Activity Reporting ( sar -w ) to access "process context switches" ( pswch/s ) information. The
system ( HP9000 ; 11.0 ) does not have sar enabled. Is ther another way to obtain this information ( process context switches per second ) ?
Learn More
5 REPLIES 5
Pete Randall
Outstanding Contributor

Re: How to access "process context switches` information

Jerry,

What do you mean it doesn't have sar enabled? What happens if you enter the sar command? Do you get an error message? Maybe something was not installed correctly. Sar is an integral with HP-UX.


Pete


Pete
Jeff Schussele
Honored Contributor

Re: How to access "process context switches` information

Hi Jerry,

glance or it's GUI, gpm, can give you that info. It's a purchase item, but you can get a 60-day free demo trial.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Brian Bergstrand
Honored Contributor

Re: How to access "process context switches` information

vmstat will dispaly this under the "faults cs" column.

HTH.
A. Clay Stephenson
Acclaimed Contributor

Re: How to access "process context switches` information

I suspect that you are simply typing in sar -w as opposed to sar -w 5 2 to do 2 samples over 5-second intervals. Sar w/o the interval attempts to open files in /var/adm which probably haven't been setup. You should have no trouble invoking sar with interval and count parameters.
If it ain't broke, I can fix that.
Jeff Schussele
Honored Contributor

Re: How to access "process context switches` information

Hi Jerry,

You must give sar a time value & iteration count, else it assumes it's supposed to read a file. So try

sar -w 5 5

for 5 iterations 5 seconds apart.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!