- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: PSTAT - Swap info
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
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
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
тАО06-25-2007 04:26 AM
тАО06-25-2007 04:26 AM
I'm writing simple monitoring tool using pstat interface. How to obtain information how much swap space on disk dev is used? When I'm using pstat_getvminfo I get sum of reserved swap on device and used space:
total_sw_dev = vbuf.psv_swapspc_max;
avail_sw_dev = vbuf.psv_swapspc_cnt;
I've looked through forum and I can't find the answer.
Solved! Go to Solution.
- Tags:
- pstat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2007 04:27 AM
тАО06-25-2007 04:27 AM
Re: PSTAT - Swap info
I usually use vmstat or swapinfo -tam
You can parse the output any way you want to get data back into your program.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2007 04:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2007 05:05 AM
тАО06-25-2007 05:05 AM
Re: PSTAT - Swap info
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-26-2007 04:55 AM
тАО06-26-2007 04:55 AM
Re: PSTAT - Swap info
struct __pss_blk {
struct __psdev Pss_dev; /* Device specification */
_T_ULONG_T Pss_start; /* For 300,700: starting blk */
_T_ULONG_T Pss_nblks; /* OBSOLETE, was total # of blocks */
_T_ULONG_T Pss_nblksavail; /* # of blocks available */
};
This struct returns info only about available blocks, not used blocks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-26-2007 07:32 AM
тАО06-26-2007 07:32 AM
Re: PSTAT - Swap info
#define pss_nblksenabled pss_un.Pss_blk.Pss_nblks
That's what you want, total blocks enabled on the device (for the Device case). pss_nfpgs is then pages free, pss_nblksavail is available blocks [this is usually when maxswapchunks or swchunk is too small and the system has to consider some of the possible blocks as unusable].
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-26-2007 07:43 AM
тАО06-26-2007 07:43 AM