rkac has asked for the wisdom of the Perl Monks concerning the following question:
Unfortunately, what it also does ocassionally is kill shared memory id's while they are being initialized (not all, just some). Is there any way to read the contents of the shared memory page, using perl, to see what is happening and based on that knowledge choose to remove it?while (1 == 1) { # #Clear any unused shared memory pages # $presult=`ipcs -m |grep -v - | grep -v bytes | grep -v dest`; @parts = split("\n", $presult); foreach $w (@parts) { print "ipcs: $w\n"; @pidparts=split(" ", $w); $thispid = $pidparts[1]; $presult1=$pidparts[5]; if ($presult1 eq 0) { print "removing ssh id: pid: -$thispid- current at +tached -$presult1-\n"; $pcmd="ipcrm shm \"$thispid\""; print "pcmd: $pcmd\n"; $presult1 = `$pcmd`; print "presult1: $presult1\n"; sleep 15; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 1: Controlling Shared Memory Id's
by tilly (Archbishop) on Sep 14, 2000 at 02:11 UTC | |
|
Re: Controlling Shared Memory Id's
by rkac (Novice) on Sep 14, 2000 at 02:39 UTC | |
by tilly (Archbishop) on Sep 14, 2000 at 02:46 UTC | |
|
Re: Controlling Shared Memory Id's
by rkac (Novice) on Sep 15, 2000 at 23:30 UTC |