HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: pstat_getlwp() and struct lwp_status
Operating System - HP-UX
1833619
Members
3622
Online
110062
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
Forums
Discussions
Discussions
Discussions
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
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-26-2006 06:50 AM
06-26-2006 06:50 AM
pstat_getlwp() and struct lwp_status
The pstat_getlwp() function populates
the lwp_status stuct but the lwp_utime
and wp_stime members contain the user
and system time in seconds according
to the .H include files.
Does anyone to know how to obtain thread/lwp
clock time in sub-second resolution.
Nanoseconds or microseconds would be best.
Thanks,
Chuck
the lwp_status stuct but the lwp_utime
and wp_stime members contain the user
and system time in seconds according
to the .H include files.
Does anyone to know how to obtain thread/lwp
clock time in sub-second resolution.
Nanoseconds or microseconds would be best.
Thanks,
Chuck
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2006 12:36 PM
06-26-2006 12:36 PM
Re: pstat_getlwp() and struct lwp_status
I cannot say if it is "supported" or not for end-user use, but if you go into:
/usr/include/sys/pstat/lwp_pstat_body.h
and find lwp_utime you will see (on 11.11 and I presume later at least)
struct lwpcycles
lwp_usercycles; /* 64-bit user mode execution cycle count */
struct lwpcycles
lwp_systemcycles; /* 64-bit system mode execution cycle count */
struct lwpcycles
lwp_interruptcycles; /* 64-bit interrupt for thread cycle count */
It is left as an excercise to the reader to find the definition of "lwpcycles" :) (I'd start with:
find /usr/include -exec grep lwpcycles {} \;
myself. And, if those cycles are anything like the system-wide cycles netperf looks at for CPU util, you could probably go into say the src/netcpu_pstatnew.c file of netperf sources:
http://www.netperf.org/svn/netperf2/trunk
and find-out how to manipulate them.
/usr/include/sys/pstat/lwp_pstat_body.h
and find lwp_utime you will see (on 11.11 and I presume later at least)
struct lwpcycles
lwp_usercycles; /* 64-bit user mode execution cycle count */
struct lwpcycles
lwp_systemcycles; /* 64-bit system mode execution cycle count */
struct lwpcycles
lwp_interruptcycles; /* 64-bit interrupt for thread cycle count */
It is left as an excercise to the reader to find the definition of "lwpcycles" :) (I'd start with:
find /usr/include -exec grep lwpcycles {} \;
myself. And, if those cycles are anything like the system-wide cycles netperf looks at for CPU util, you could probably go into say the src/netcpu_pstatnew.c file of netperf sources:
http://www.netperf.org/svn/netperf2/trunk
and find-out how to manipulate them.
there is no rest for the wicked yet the virtuous have no pillows
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
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP