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...
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 ?
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.
Summary: Hi, I am having an issue with a sctipt i am creating for monitoring of CPU usage. To retreive the usage for a certain PID i am using the following: getCPU=`prstat -p $PID 1 1 | awk '{print $9}' | cut ...
Summary: hi i have couple of questions, if anybody can help me out,i would really appreciate it. i have to compute the priority number of a unix process with a recent cpu usage of 31, a threshold priority of ...
Summary: How to find CPU Usage , RAM, Hard Disk space. This should be on " DEC OSF/1 " I need to write these details into log file for every 10 min. sar command doesn't work on DEC OSF/1(Digital UNIX) ...