- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Shared memory segment removal, swap close to 9...
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
Forums
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
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
04-15-2004 05:00 AM
04-15-2004 05:00 AM
Shared memory segment removal, swap close to 97% question
# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 8000 0 8000 0% 0 - 1 /dev/vg00/lvol2
dev 12000 3910 8090 33% 0 - 0 /dev/vg00/lv_swap1
reserve - 16090 -16090
memory 12737 11837 900 93%
total 32737 31837 900 97% - 0 -
Shared memory segment ->
m 2582 0x00000000 D-rw-rw-rw- abpadm sapsys abpadm sapsys 39
4290772992 17295 17295 11:33:45 no-entry 11:33:45
m 22840 0x00000000 D-rw-rw-rw- arcadm sapsys arcadm sapsys 26
6442450944 18017 18017 10:51:09 no-entry 10:51:09
The defunct processes ->
# ps -ef |grep defunc
abpadm 18849 17231 1 20:05:30 ? 0:00
abpadm 29291 17231 1 23:15:44 ? 0:00
abpadm 18312 17231 1 20:01:00 ? 0:00
root 16626 8415 1 12:55:23 pts/2 0:00 grep defunc
arcadm 16864 16862 4 05:12:10 ? 0:00
How do I ensure safe removal of defunct process or "defunct shared mem segment" to give relief to high swap utilization ?
-TIA
Q
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2004 05:07 AM
04-15-2004 05:07 AM
Re: Shared memory segment removal, swap close to 97% question
Try kill -9
That may work, but probably will not.
The only way at that point to deal with it is by restarting the system.
You can as root take a shot at the shared memory segment with ipcrm command
if it shows up in ipscs as -s use ipcrm -s
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
04-15-2004 05:13 AM
04-15-2004 05:13 AM
Re: Shared memory segment removal, swap close to 97% question
#ipcs |grep for processes
#ipcrm -s pid
do man on ipcs and ipcrm.
-s is for active semaphores
-m about active shared memory segments.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2004 05:13 AM
04-15-2004 05:13 AM
Re: Shared memory segment removal, swap close to 97% question
otherwise, you could use
ipcrm -m
ro remove shm seg. (shmid is the second field in ipcs)
"Reality is just a point of view." (P. K. D.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2004 05:17 AM
04-15-2004 05:17 AM
Re: Shared memory segment removal, swap close to 97% question
To determine if it is safe to remove a shared memory identifier (shmid), do an ipca -ma and look in the NATTCH column. If this value is zero, it is a necessary but not necessarily a sufficient condition to use ipcrm. It all depends upon how the software that uses the shmid is wriiten. For example, it's rather common to have a process set up a shared memory region but then detach itself so that NATTCH = 0. Later processes which actually use the shared memory will then fail because the expected shared memory identifier is not found. Only your software developer will know for sure unless you have documentation or prior experince with this particular application.
By the way, the number one reason that dangling shmid's and sema4's get left is the use of kill -9.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2004 05:58 AM
04-15-2004 05:58 AM
Re: Shared memory segment removal, swap close to 97% question
knew about the ipcrm and kill etc. the question is more towards "safe removal" or checks be made before using the sword to chop off the rope ( when you don't know you may be hanging on the same rope :)
As Clay mentioned, the each shared mem segment in the question above, have 39 & 26 attachments resp. but its is marked as "D-rw-rw-rw" and not used/updated since 10:51 and 11:33 AM. The parent processes 17295 & 18017 are running sap instances each has many more child processes running at this time.
If recycle/boot is "THE" solution then its not a solution :)) I am still keeping points in my bag..
-TIA
Q
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2004 06:09 AM
04-15-2004 06:09 AM
Re: Shared memory segment removal, swap close to 97% question
You probably can (99%) kill defunc processes by killing the ppid .. In your case
kill -9 17231
Then use ipcs -m to find out shared memory segments that are marked as "D" and user ipcrm to remove them.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2004 10:05 PM
04-15-2004 10:05 PM
Re: Shared memory segment removal, swap close to 97% question
The master SAP daemon creates the segment, forks the other processes which attach to the shared memory, then uses shmctl() to remove it - see man shmctl for how it works. Dont try to delete it - you cannot remove it anyway, until the processes that are attached to it exit on their own.
I suspect it is a way of automatically removing the shared memory when the master SAP daemon exits, but other SAP gurus may have more correct information.
Whats more important in your case is the SAP system has taken all of your memory and swap. I have seen this frequently before and I suspect that it is something to do with the SAP tuning recommendations. If you run vmstat -S 5 20 and see it paging out a lot (po>0), then you will have to 'take a view' on whether to reduce the amount of memory you SAP system is allowed, or to say that the system is running at a reasonable speed and you don't have a serious problem after all.
As has been said above, you wont be able to remove the zombie processes unless (a) you reboot or (b) they clean themselves up
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2004 02:40 PM
04-18-2004 02:40 PM
Re: Shared memory segment removal, swap close to 97% question
Appreciate if someone could post good doc on SAP customization and/or Performance guide on HPUX.
-Q