Operating System - HP-UX
1825800 Members
2667 Online
109687 Solutions
New Discussion

Re: ipcs -ma has many NATTACH zeros

 
boomer_2
Super Advisor

ipcs -ma has many NATTACH zeros

Hi guys,
i have a server which is heavily swapping..with hpux 11iv2...8gb RAM ..rx 4640..
#swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 16000 4849 11151 30% 0 - 1 /dev/vg00/lvol2
dev 16000 4837 11163 30% 0 - 1 /dev/vg00/lvol12
reserve - 20169 -20169
memory 8180 4308 3872 53%
total 40180 34163 6017 85% - 0 -
And also the o/p of ipcs -ma attached herewith.

Somewhere i had read that NATTACH -zeros should be removed which r result of many kill-9's..which is very much possible here b'coz before i joined here everyone used to kill aprocess by kill -9 only..However i have now advised them to use kill -15 now...

But hos do i release those shared memory segments now..??
7 REPLIES 7
Dennis Handly
Acclaimed Contributor

Re: ipcs -ma has many NATTACH zeros

You use ipcrm(1).

I don't see any date entries indicating they were old. Unless it only keeps the time of day? But what use would that be??

It would have been helpful to pipe that to:
ipcs -ma | sort -k6,6

I'm not sure if those no-entry for DTIME indicate that a kill 9 was done?
boomer_2
Super Advisor

Re: ipcs -ma has many NATTACH zeros

Hi Denis,
Here's the o/p of the requireed command :->

ipcs -ma | sort -k6,6

Dennis Handly
Acclaimed Contributor

Re: ipcs -ma has many NATTACH zeros

>Here's the o/p of the required command

Your original .txt file was easier to fiddle with than this .doc. I then only looked at the NATTACH == 0.

It looks like you have a bunch of no-entry for DTIME, most likely indicating that a kill 9 was done. Or sloppy programming.

>>Unless it only keeps the time of day? But what use would that be??

It appears that ipcs only prints the time of day! I filed an enhancement request to include a date with the time, CR JAGag42853:
ipcs -ma, add option to report ATIME, etc as date

I've also attached a simple C source that will give the expanded dates for each segment.
boomer_2
Super Advisor

Re: ipcs -ma has many NATTACH zeros

Hi Dennis,
I have attached herewith the required ouput with ur C program..

Regards,
Boomer
Dennis Handly
Acclaimed Contributor

Re: ipcs -ma has many NATTACH zeros

>I have attached herewith the required ouput with your C program.

(I expected the output to be obvious. :-)

0 0x412811f0 0 348 02-16|13:15 02-16|13:15 02-16|13:15
139 0x741cc1a2 0 6 03-26|17:06 03-26|17:06 02-16|13:30
140 0x741cc1a3 0 6 03-26|17:06 03-26|17:06 02-16|13:30
142 0x741cc1a5 0 6 03-26|17:06 03-26|17:06 02-16|13:30
32905 0x741cc1a0 0 28244 05-15|13:24 05-15|13:24 02-16|13:30

These were detached in Feb/Mar and May by root, leave alone.

164088 0x73099eef 0 41 02-23|16:09 NO-ENTRY 02-23|15:46
196855 0x73099eee 0 1 02-23|16:09 NO-ENTRY 02-23|15:46
196859 0x7309cd3a 0 196100 02-23|16:01 NO-ENTRY 02-23|15:46
229622 0x73098770 0 1850 02-23|16:03 NO-ENTRY 02-23|15:46
262394 0x7309cd39 0 4204 02-23|16:01 NO-ENTRY 02-23|15:46
327929 0x7309cd38 0 28 02-23|16:01 NO-ENTRY 02-23|15:46

These were created in Feb by fnsonls and were never detached. These old ones are likely to have been left due to kill 9.

You can then look at the other NO-ENTRY ones:
16580730 0x73b5cf89 0 4204 05-15|13:24 NO-ENTRY 05-15|12:49

This was left in May
boomer_2
Super Advisor

Re: ipcs -ma has many NATTACH zeros

thanx Dennis,questn answered
Dennis Handly
Acclaimed Contributor

Re: ipcs -ma has many NATTACH zeros

Oops, slight problem with my program. I have the months off by one. Change a line to this:
printf(" %02d-%02d|%02d:%02d", p->tm_mon + 1,

(Adds 1 to p->tm_mon.)