From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,9fb0671a4786522e,start X-Google-Attributes: gidfee84,public From: Nenad Vidovic Subject: How to get number of context switches and system calls for a process Date: 1998/12/08 Message-ID: <366D855B.560B@swi.com>#1/1 X-Deja-AN: 420159298 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii NNTP-Posting-Time: 8 Dec 1998 20:00:28 GMT Organization: Interlog Internet Services Mime-Version: 1.0 Newsgroups: comp.unix.osf.osf1 Hi! I am trying to get the number of context switches for some process(not current one, and not it's child). On Solaris ioctl(fd, PIOCUSAGE, &usage) retuns in the usage (struct prusage usage) number of context switches: u_long pr_vctx; /* voluntary context switches */ u_long pr_ictx; /* involuntary context switches */ This information is not contained on DEC ioctl. However ps has two options for listing context switches( -o nivcsw,nwchan). Also a function getrusage can get number of context switches for a current or child processes. Is there something which will get this information for pid you specify???? System calls. This is also available in ioctl returned struct on Solaris, but not on DEC. How to get the number of system calls for a specified process???? Does anyone have any clues. Thanks for your help! Regards, Nenad Vidovic SWI Systemware/Halcyon Inc. www.swi.com nenad@swi.com