[NBLUG/talk] ipcs/ipcrm
Walter Hansen
gandalf at sonic.net
Wed Jun 22 12:32:47 PDT 2005
Sorry this took so long. I was real busy on a project and it's now
clearing up...
[root at abco wrs]# ipcs
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x626d756e 655360 root 666 65536 0
0x646c6f68 688129 root 666 65536 0
0x00000000 557058 postgres 600 10436608 1 dest
------ Semaphore Arrays --------
key semid owner perms nsems
0x626d756e 3801088 root 666 3
0x646c6f68 3833857 root 666 3
------ Message Queues --------
key msqid owner perms used-bytes messages
[root at abco wrs]#
> Hi Gandalf,
>
> On Mon, 20 Jun 2005 17:34:54 -0700 (PDT), "Walter Hansen"
> <gandalf at sonic.net> said:
>> Did I post at an bad time or does no one realy have a clue on this?
>
> Mebbe both. I was hoping someone more experienced would
> answer, but I guess they're all hiding. ;-)
>
>> > I've got a machine running perl scripts that comunicate with each
>> other.
>> > The thing is they do so via shared variables, and the shared variables
>> > hang arround afterwards.
>
> Can you show us an ipcs from when it is quiet so we can see what
> is hanging around? Is it just shared mem? Or does it include sem's
> and queues?
>
>> > Script I found that doesn't work:
>> > #! /bin/sh
>> > for PID in `ps -ef | grep -v root | grep -v proccessname | grep -v
>> userid
>> > | grep " 1 " | awk '{print $2}' `
>> > do
>> > echo killing $PID$TEST
>> > kill $PID
>> > for QID in `ipcs -qp | grep -w $PID | awk '{print $2}'`
>> > do
>> > echo removing $QID$TEST
>> > ipcrm -q $QID
>> > done
>
> OK. There are some 'pseudo' vars in there. Things like 'processname'
> and 'userid' are not really meant to be there. Also, I have no idea
> what
> the $TEST is for except to make things fail when set.
>
> Not only that, the ipcrm is only dealing with queues. No shared mem
> or sem's.
>
> The three types of IPC constructs have different reporting via ipcs
> so once we know what is being 'orphaned' we can know how to
> write the script to do the right thing.
>
> HTH.
>
> Ross.
>
> --
> http://www.fastmail.fm - Email service worth paying for. Try it for free
>
>
> _______________________________________________
> talk mailing list
> talk at nblug.org
> http://nblug.org/cgi-bin/mailman/listinfo/talk
>
>
More information about the talk
mailing list