Solved

What is WCPU in top command?

Posted on 2006-07-03
5
6,732 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 60 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 65 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Suggested Solutions

Title # Comments Views Activity
sudo logging 5 101
Parsing a file using ksh 10 72
UNiX Script filesystem space usage Part2 54 88
Wrap Oraccle SQL*Plus executable Command 4 95
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
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.

820 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