- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- pstat_getprocessor() shows wait I/O as always 0 ho...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
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
Community
Resources
Forums
Blogs
- 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
10-25-2016 01:54 AM
10-25-2016 01:54 AM
pstat_getprocessor() shows wait I/O as always 0 however sar command always results in values above 0
We are using pstat_getprocessor() to find CPU utilization for individual cores. Here we got a issue reported from customer and we further checked and found that CPU wait calculated using pstat_getprocessor() always returns 0.
Formula used by us is CP_BLOCK+ CP_SWAIT+ CP_INTR
pCpu->stats.fWait = pProcessorInfo[cpu_number].psp_cpu_time[CP_BLOCK];
pCpu->stats.fWait += pProcessorInfo[cpu_number].psp_cpu_time[CP_SWAIT];
pCpu->stats.fWait += pProcessorInfo[cpu_number].psp_cpu_time[CP_INTR];
Total 30021
User 1 = (212 + 0) * 100 / 30021
System 0 = 95 * 100 / 30021
Idle 99 = 29714 * 100 / 30021
Wait 0 = 0 * 100 / 30021
Total 30021
User 0 = (41 + 0) * 100 / 30021
System 0 = 59 * 100 / 30021
Idle 100 = 29921 * 100 / 30021
Wait 0 = 0 * 100 / 30021
Total 30021
User 2 = (546 + 0) * 100 / 30021
System 1 = 228 * 100 / 30021
Idle 97 = 29247 * 100 / 30021
Wait 0 = 0 * 100 / 30021
Total 30021
User 0 = (27 + 0) * 100 / 30021
System 0 = 60 * 100 / 30021
Idle 100 = 29934 * 100 / 30021
Wait 0 = 0 * 100 / 30021
Total 30021
User 0 = (51 + 0) * 100 / 30021
System 0 = 82 * 100 / 30021
Idle 100 = 29888 * 100 / 30021
Wait 0 = 0 * 100 / 30021
Total 30021
User 0 = (26 + 0) * 100 / 30021
System 0 = 110 * 100 / 30021
Idle 100 = 29885 * 100 / 30021
Wait 0 = 0 * 100 / 30021
Total 30021
User 1 = (190 + 0) * 100 / 30021
System 0 = 97 * 100 / 30021
Idle 99 = 29734 * 100 / 30021
Wait 0 = 0 * 100 / 30021
Total 30021
User 1 = (428 + 0) * 100 / 30021
System 0 = 114 * 100 / 30021
Idle 98 = 29479 * 100 / 30021
Wait 0 = 0 * 100 / 30021
Also we checked sar command and it returns values greater than zero. i.e It reports the value like 3,2,4 for Wait I/O metric.
root@serv5040:/usr/storapi/bin> sar -u 1 50
HP-UX serv5040 B.11.31 U ia64 10/20/16
11:41:16 %usr %sys %wio %idle
11:41:17 2 1 3 94
11:41:18 2 1 2 95
11:41:19 2 0 4 94
11:41:20 2 2 4 92
11:41:21 4 2 6 88
11:41:22 2 0 4 94
11:41:23 2 1 3 94
11:41:24 3 7 7 83
11:41:25 3 8 5 84
Average 3 2 5 91
Can you please let us know how to fetch CPU Wait using pstat_getprocessor() correctly.?
Why there is difference between output from sar command and pstat_getprocessor().?
Please let us know in case any more information required.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2016 07:31 PM
11-06-2016 07:31 PM
Re: pstat_getprocessor() shows wait I/O as always 0 however sar command always results in values > 0
Have you contacted Support yet?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2016 05:31 AM
11-22-2016 05:31 AM
Re: pstat_getprocessor() shows wait I/O as always 0 however sar command always results in values >
not yet.
I am new to community.
Can anyone please share steps how to go ahead on this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2016 04:39 AM
11-23-2016 04:39 AM
Re: pstat_getprocessor() shows wait I/O as always 0 however sar command always results in values > 0
>Can anyone please share steps how to go ahead on this.
You need a support contract (SAID) to contact Support.