- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Swap space utilization
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
тАО10-01-2007 09:52 PM
тАО10-01-2007 09:52 PM
is there any way how to find out how much swap space a process has reserved/allocated?
I am facing a large swap space utilization on some systems and want to find out what application causes this behaviour. It's for sure being caused by SAP and Oracle, but I would like to see some exact numbers.
Thanks for any helpful answer.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-01-2007 10:17 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-01-2007 10:48 PM
тАО10-01-2007 10:48 PM
Re: Swap space utilization
Overall:
swapinfo -tam
http://www.hpux.ws/?p=6
http://www.hpux.ws/?p=8
The second link includes a memory leak detector, which may help you spot a leak of ORACLE or SAP
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
тАО10-02-2007 01:07 AM
тАО10-02-2007 01:07 AM
Re: Swap space utilization
Here's an example from my test system:
bigboy:(/tmp)(root)#UNIX95= ps -e -o vsz,uid,pid,ruser,args |sort -rn | head -7
5364 0 2563 root /usr/sbin/stm/uut/bin/tools/monitor/fpl_em
4764 30 1726 www /opt/hpws/apache/bin/httpd -d /opt/hpws/apache -k start
4544 0 1519 root /opt/samba/bin/smbd -D -s /etc/opt/samba/smb.conf
4544 0 1489 root /opt/samba/bin/smbd -D -s /etc/opt/samba/smb.conf
4068 0 1208 root /opt/dce/sbin/rpcd
3740 30 1727 www /opt/hpws/apache/bin/httpd -d /opt/hpws/apache -k start
3484 0 1707 root /opt/hpws/apache/bin/httpd -d /opt/hpws/apache -k start
bigboy:(/tmp)(root)#swapinfo -mt
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4096 0 4096 0% 0 - 1 /dev/vg00/lvol2
reserve - 141 -141
memory 1185 260 925 22%
total 5281 401 4880 8% - 0 -
bigboy:(/tmp)(root)#
If I get it right then although this system is not swapping anything, the summary of the numbers in the VSZ column from the 'ps' output(in kB) should be equal to the reserved MB value in the swapinfo output. Is that right?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-02-2007 01:26 AM
тАО10-02-2007 01:26 AM
Re: Swap space utilization
There are a few things which will complicate this sort of calculation:
1) mmap() using MAP_FILE when the mapping is not MAP_PRIVATE (or is MAP_PRIVATE but all accesses are read). These objects will use virtual address space (and therefore show in VSZ [as they should]) but need no swap reservation because the object is backed by the file, not the swap area.
2) Shared memory segments -- each segment will contribute to the VSZ of each attached process [i.e. a 1Mb (virtual) segment will contribute 1Mb of VSZ to each of processes A, B and C if each is attached].
And probably some other nuances that are slipping my brain this early. What you really want is reported via pstat -- I think top and ps just don't have columns for it. Take a look at the attached program. Fair warnings/disclaimers: This is my own quick work, not production code. I haven't compiled it on anything older than r11.23 (though I think I handle prior releases... I just wouldn't want to bet the farm on it).
If you compile 32-bit, I'd use the -D_PSTAT64 option... compile with +DD64 and you won't need to.
The important field is the pst_swap field from the pst_vm_status structure for each object in the process(es) you care about... that's the swap reservation consumption. You should be able to use that to find your heavy hitters (and know if they're shared objects or whatnot).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-02-2007 01:37 AM
тАО10-02-2007 01:37 AM
Re: Swap space utilization
I'll check your code on a test system and then consider the distribution to customer systems (won't be easy with over 1000 systems though).
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-02-2007 01:40 AM
тАО10-02-2007 01:40 AM