Computing.Net > Forums > Unix > CPU Usage : vmstat, prstat...

CPU Usage : vmstat, prstat...

Reply to Message Icon

Original Message
Name: Ed
Date: September 19, 2002 at 08:36:50 Pacific
Subject: CPU Usage : vmstat, prstat...
OS: Solaris
CPU/Ram: sparcv9 256 Mb
Comment:

Hi,

It seems to me that using vmstat, prstat or top at the same moment, the CPU Usage results are different on those tools. Could somebody explain me why ? What is exactly calculated in each tool ?
In parrallel, I have a another tool (home made), which calculates the CPU Usage by parsing all the /proc directory and getting the CPU of each process through ioctl (PIOCPSINFO, pr_pctcpu). This tool gives another result ! Why ?

Thanks for your help

Ed


Report Offensive Message For Removal

Response Number 1
Name: Paul
Date: October 1, 2002 at 09:02:29 Pacific
Subject: CPU Usage : vmstat, prstat...
Reply: (edit)

Ed,

I don't have an answer to your question, but I saw something in your question that interested me. You said you have a homemade tool to calculate CPU usage etc. I am trying to do almost exactly the same thing that your tool does, only I don't want a total cpu usage, just the usage by a process and all its child processes. I know I can do this using ps or top, but they take too long. How does your tool work? Can you share it? BTW, I'm using Red Hat Linux 7.2. Thanks.

Paul


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: CPU Usage : vmstat, prstat...

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software