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

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

CPU Usage : vmstat, prstat...

Reply to Message Icon

Name: Ed
Date: September 19, 2002 at 08:36:50 Pacific
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



Sponsored Link
Ads by Google

Response Number 1
Name: Paul
Date: October 1, 2002 at 09:02:29 Pacific
Reply:

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


0
Reply to Message Icon

Related Posts

See More


awk wierdness Script: Read file to set ...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: CPU Usage : vmstat, prstat...

URGENT - CPU usage string help www.computing.net/answers/unix/urgent-cpu-usage-string-help/7802.html

unix process with recent cpu usage www.computing.net/answers/unix/unix-process-with-recent-cpu-usage/4892.html

How to find CPU usage, RAM, Hard Disk www.computing.net/answers/unix/how-to-find-cpu-usage-ram-hard-disk/3417.html