- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- what does %WCPU column mean in TOP output ?
Operating System - HP-UX
1820677
Members
2362
Online
109627
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2003 11:36 PM
тАО06-30-2003 11:36 PM
what is different between %CPU and %WCPU in top output ?
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2003 11:43 PM
тАО06-30-2003 11:43 PM
Re: what does %WCPU column mean in TOP output ?
Hi,
as far as i know, the difference is the following:
%CPU - % of time of cpu used
%WCPU - % of time waited for cpu
You can also check from "man top", it is explained.
Massimo
as far as i know, the difference is the following:
%CPU - % of time of cpu used
%WCPU - % of time waited for cpu
You can also check from "man top", it is explained.
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2003 11:46 PM
тАО06-30-2003 11:46 PM
Solution
Hi,
Have a look at this RCEN.
Regards.
UCMDSKBRC00009042
What is different between %CPU and %WCPU within top(1) ?
DocId: UCMDSKBRC00009042 Updated: 2/7/02 10:34:00 AM
PROBLEM
Online manual [ top(1) ] says that:
%WCPU is "Weighted CPU (central processing unit) percentage"
%CPU is "Raw CPU percentage. This field is used to sort the top processes".
The information is vague. Is there any more details on these values?RESOLUTION
%WCPU reported by top(1) is basically the reporting of the cpu
estimator which is reviewed by the hardclock() routine. The hardclock()
routine is apart of the process scheduling and adjusts the process running
priority when a process accumulates 40 ms.
Every 10ms, hardclock() runs and adjusts the process's time. This in turn will
affect the cpu estimator (p_cpu) and increases its value. This value is what
top(1) is reading via a pstat system call.
It essentially is a 'forecast' of the process to help determine its future
priority. As a process runs, its time increases and it can result in it
getting a low priority on a context switch.
Overview of hardclock() routine:
o check if process is valid
o increment clock tick for process
o increment cpu estimator
o check if cpu estimator has reached 40ms
o call setpri
This is a high level overview based on psuedo-code examples. Keep in
mind the cpu estimator ramps up quite quickly when a process is running
and decays away exponentially.
In summary:
The %WCPU is just a 'forecast' value for the process. It really has no
real world value. It's value is totally controlled by the scheduler.
The man page for top(1) indicates that %CPU is the "Raw CPU percentage. This
field is used to sort the top processes".
Well, the %CPU is the total percentage without the 'forecast' factor built-in,
such as a 'raw value.'
See below for information and how the value is determined for top. Notice that
the %CPU has no other variables to handle.
The following is a brief overview of the source code utilized:
Based on the source code for top.c:
* WCPU is the Weighted CPU that the kernel calculates to use in the
* scheduling algorithm.
* It is a weighted average over the last few minutes.
logcpu = log(ccpu);
Printw("%4.4s %5d %-8d %3d %2d %5d%c %5d%c %-5s %3d:%02d
%5.2f %5.2
f ", /* DSDe407527 */
gettty(pp->pst_major,pp->pst_minor),
pp->pst_pid,
pp->pst_uid,
pp->pst_pri,
pp->pst_nice,
processSize, processSizeUnits,
residentSize, residentSizeUnits,
state_name(pp->pst_stat, 1),
cputime / 60l,
cputime % 60l,
pp->pst_time == 0 ? 0.0 :
%WCPU ---> (100.0 * pctcpu / (1.0 - exp(pp->pst_time * logcpu))),
%CPU ---> (100.0 * pctcpu));
print_cmd(pp->pst_cmd);
Done.HP ONLY
"%wcpu" "%cpu" "top" "top(1)" "wcpu"
Have a look at this RCEN.
Regards.
UCMDSKBRC00009042
What is different between %CPU and %WCPU within top(1) ?
DocId: UCMDSKBRC00009042 Updated: 2/7/02 10:34:00 AM
PROBLEM
Online manual [ top(1) ] says that:
%WCPU is "Weighted CPU (central processing unit) percentage"
%CPU is "Raw CPU percentage. This field is used to sort the top processes".
The information is vague. Is there any more details on these values?RESOLUTION
%WCPU reported by top(1) is basically the reporting of the cpu
estimator which is reviewed by the hardclock() routine. The hardclock()
routine is apart of the process scheduling and adjusts the process running
priority when a process accumulates 40 ms.
Every 10ms, hardclock() runs and adjusts the process's time. This in turn will
affect the cpu estimator (p_cpu) and increases its value. This value is what
top(1) is reading via a pstat system call.
It essentially is a 'forecast' of the process to help determine its future
priority. As a process runs, its time increases and it can result in it
getting a low priority on a context switch.
Overview of hardclock() routine:
o check if process is valid
o increment clock tick for process
o increment cpu estimator
o check if cpu estimator has reached 40ms
o call setpri
This is a high level overview based on psuedo-code examples. Keep in
mind the cpu estimator ramps up quite quickly when a process is running
and decays away exponentially.
In summary:
The %WCPU is just a 'forecast' value for the process. It really has no
real world value. It's value is totally controlled by the scheduler.
The man page for top(1) indicates that %CPU is the "Raw CPU percentage. This
field is used to sort the top processes".
Well, the %CPU is the total percentage without the 'forecast' factor built-in,
such as a 'raw value.'
See below for information and how the value is determined for top. Notice that
the %CPU has no other variables to handle.
The following is a brief overview of the source code utilized:
Based on the source code for top.c:
* WCPU is the Weighted CPU that the kernel calculates to use in the
* scheduling algorithm.
* It is a weighted average over the last few minutes.
logcpu = log(ccpu);
Printw("%4.4s %5d %-8d %3d %2d %5d%c %5d%c %-5s %3d:%02d
%5.2f %5.2
f ", /* DSDe407527 */
gettty(pp->pst_major,pp->pst_minor),
pp->pst_pid,
pp->pst_uid,
pp->pst_pri,
pp->pst_nice,
processSize, processSizeUnits,
residentSize, residentSizeUnits,
state_name(pp->pst_stat, 1),
cputime / 60l,
cputime % 60l,
pp->pst_time == 0 ? 0.0 :
%WCPU ---> (100.0 * pctcpu / (1.0 - exp(pp->pst_time * logcpu))),
%CPU ---> (100.0 * pctcpu));
print_cmd(pp->pst_cmd);
Done.HP ONLY
"%wcpu" "%cpu" "top" "top(1)" "wcpu"
It works for me (┬й Bill McNAMARA ...)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2003 11:48 PM
тАО06-30-2003 11:48 PM
Re: what does %WCPU column mean in TOP output ?
Hi,
WCPU is "Weighted cpu" average cpu for the process.
WCPU is "Weighted cpu" average cpu for the process.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP