Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

What is WCPU in top command?

Posted on 2006-07-03
5
Medium Priority
?
7,335 Views
Last Modified: 2013-12-06
On HP-UX, when I run the top command, there is a column for the WCPU (weighted CPU).  Can somebody tell me what this is?  Thanks.
0
Comment
Question by:mromeo
  • 2
  • 2
5 Comments
 
LVL 4

Expert Comment

by:Phreonx
ID: 17033523
Hello,
let me start off by mentioning the exact definition from the man page for top:

     "WCPU, when displayed, is the weighted cpu percentage."

Now a bit of explanation. %wcpu or weighted cpu percentage as I understand it, is an exponentially decaying, average percentage measured over the last few minutes, of the CPU time that was dedicated to a particular process. It has no real world value and it's value is totally controlled by the CPU scheduler. As you would expect, processes running for a short period of time the %wcpu should be very close to the actual %cpu.

Hope that helped ;)
0
 

Author Comment

by:mromeo
ID: 17033572
so, if the WCPU gets quite large (approx 80-90%), but the CPU % stays at about 50%, what is that indicating?
0
 

Author Comment

by:mromeo
ID: 17033579

This is what is happening when I try to compile some code w/ gcc.
0
 
LVL 4

Assisted Solution

by:Phreonx
Phreonx earned 240 total points
ID: 17033664
I'd suspect that 80-90% of the CPU time is dedicated to swapping processes in and out of the CPU scheduler whereas 50% of the CPU is used for actual process execution by the CPU.
0
 
LVL 6

Accepted Solution

by:
JJSmith earned 260 total points
ID: 17047424

%CPU give the utilization of the last sample period.

%WCPU looks at the same process over a longer period.

In summary;

A process of short duration (one top sample period) should show almost identical %WCPU and %CPU.

A process of longer duration (more than 1 top sample period) would start to show a widening 'gap' between %WCPU and %CPU.

If a longer process was maxing the CPU in the last sample period, then expect %CPU to be bigger than %WCPU.

If a longer process had been maxing CPU for a while but in the last sample period it had lightened up - then expect %CPU to be lower than %WCPU.

Hope that helps
Cheers
JJ
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question