Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Removing IPC resources

Status
Not open for further replies.

mte

Programmer
Sep 17, 2002
3
GB
Does anybody know how to remove ipc resources that have a key of 0x0 or connect them to pids. I know ipcs -mp will show the appropriate cpids but how do you find out this information for queues and semaphores, (plus -mp has shown 0 as the cpid at least once before).

Basically i have multiple Tuxedo domains booted and i want to remove all resources associated with one domain when it has died on me.

Ive tried removing the keys manually with ipcrm but when i try to remove the resource associated with the key 0x0000c09f isnt that supposed to remove all referenced resources?

Code:
$ ipcs -a | grep medwa1                                                                                                                                      
q     856976   0x0000c09f -Rrw-rw----   medwa1   tuxedo   medwa1   tuxedo      0     0  65535 26886 26828 14:11:18 14:11:18 14:11:04
q     856981   00000000 -Rrw-rw----   medwa1   tuxedo   medwa1   tuxedo      0     0  65535     0     0 no-entry no-entry 14:11:06
q     617991   00000000 --rw-rw----   medwa1   tuxedo   medwa1   tuxedo      0     0  65535 26828 26853 14:11:07 14:11:07 14:11:06
q     581225   00000000 -Rrw-rw----   medwa1   tuxedo   medwa1   tuxedo      0     0  65535 26870 26857 14:11:12 14:11:12 14:11:08
q     498505   00000000 --rw-rw----   medwa1   tuxedo   medwa1   tuxedo      0     0  65535     0     0 no-entry no-entry 14:11:07
q     461973   00000000 -Rrw-rw----   medwa1   tuxedo   medwa1   tuxedo      0     0  65535 26857 26859 14:11:09 14:11:09 14:11:08
q     213793   00000000 -Rrw-rw----   medwa1   tuxedo   medwa1   tuxedo      0     0  65535     0     0 no-entry no-entry 14:11:10
q     480363   00000000 -Rrw-rw----   medwa1   tuxedo   medwa1   tuxedo      0     0  65535 26857 26870 14:11:12 14:11:12 14:11:12
q     186225   00000000 -Rrw-rw----   medwa1   tuxedo   medwa1   tuxedo      0     0  65535     0     0 no-entry no-entry 14:11:13
q   15711545   00000000 -Rrw-rw----   medwa1   tuxedo   medwa1   tuxedo      0     0  65535     0     0 no-entry no-entry 14:11:15
q    6537972   00000000 --rw-rw----   medwa1   tuxedo   medwa1   tuxedo      0     0  65535     0     0 no-entry no-entry 14:11:15
q    3559765   00000000 -Rrw-rw----   medwa1   tuxedo   medwa1   tuxedo      0     0  65535     0     0 no-entry no-entry 14:11:16
q    1004390   00000000 --rw-rw----   medwa1   tuxedo   medwa1   tuxedo      0     0  65535     0     0 no-entry no-entry 14:11:16
q     388527   00000000 -Rrw-rw----   medwa1   tuxedo   medwa1   tuxedo      0     0  65535     0     0 no-entry no-entry 14:11:17
q     167920   00000000 --rw-rw----   medwa1   tuxedo   medwa1   tuxedo      0     0  65535 26828 26886 14:11:18 14:11:18 14:11:17
q     204689   00000000 -Rrw-rw----   medwa1   tuxedo   medwa1   tuxedo      0     0  65535     0     0 no-entry no-entry 14:11:20
q     223074   00000000 --rw-rw----   medwa1   tuxedo   medwa1   tuxedo      0     0  65535     0     0 no-entry no-entry 14:11:18
m       5578   0x0000c09f --rw-rw----   medwa1   tuxedo   medwa1   tuxedo     14     312252 26828 26918 14:11:27 14:11:28 14:11:00
m       5579   00000000 --rw-------   medwa1   tuxedo   medwa1   tuxedo      2     252649 26859 26860 14:11:10 no-entry 14:11:09
m       5580   00000000 --rw-------   medwa1   tuxedo   medwa1   tuxedo      2      64340 26870 26872 14:11:13 no-entry 14:11:12
m       9572   00000000 --rw-------   medwa1   tuxedo   medwa1   tuxedo      1         20 26870 26872 14:11:13 14:11:12 14:11:12
m       4277   00000000 --rw-------   medwa1   tuxedo   medwa1   tuxedo      2      13904 26870 26872 14:11:13 no-entry 14:11:12
m       4278   00000000 --rw-------   medwa1   tuxedo   medwa1   tuxedo      2    1048576 26870 26872 14:11:13 no-entry 14:11:12
s     393438   0x0000c09f --ra-ra----   medwa1   tuxedo   medwa1   tuxedo     3 14:11:54 14:11:00
s     590051   00000000 --ra-ra----   medwa1   tuxedo   medwa1   tuxedo    96 no-entry 14:11:00
s     590052   00000000 --ra-ra----   medwa1   tuxedo   medwa1   tuxedo     3 no-entry 14:11:09
s     327922   00000000 --ra-ra----   medwa1   tuxedo   medwa1   tuxedo     3 no-entry 14:11:12

Thanks for any help,
Michael
 
Type ID KEY
q 856976 0x0000c09f

i expect: ipcrm -q 856976 works. ------------ jamisar
Einfachheit ist das Resultat der Reife. (Friedrich Schiller)
Simplicity is the fruit of maturity.
 
Removing single ipc keys isnt the problem. Its that ive got two of the same 'applications' started each using ipc resources.

I know that application A uses the IPC key 0x0000c09f and application B uses 0x0000c09e and i also know that application B is dead.

How do i remove the resources that application B didn't remove, our current scripts just remove all the ipc resources for the current user.
 
please don't put more then 80 char per line in your post,
it's very annoying to use orizontal-bar.
-----
if you are confident in 'c' or 'perl' install a 'sighander'
to kill them. ------------ jamisar
Einfachheit ist das Resultat der Reife. (Friedrich Schiller)
Simplicity is the fruit of maturity.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top