Possible to link an IPC Sempahore to a process ID?


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Possible to link an IPC Sempahore to a process ID?
# 1  
Old 07-02-2008
Possible to link an IPC Sempahore to a process ID?

Hi,

Anyone knows whether it is possible to link/relate an IPC semaphore to a particular process ID?

e.g.
# ipcs -as
IPC status from <running system> as of Wednesday July 2 14:10:39 EST 2008
T ID KEY MODE OWNER GROUP CREATOR CGROUP NSEMS OTIME CTIME
Semaphores:
s 0 0x71003323 --ra-ra-ra- root root root root 1 13:58:59 19:15:20
s 131073 0x49000027 --ra-ra-ra- root root root root 3 14:10:38 15:31:33
s 262146 0x45000ef8 --ra-ra-ra- root root root root 1 14:10:36 15:31:44
s 196611 0x450005c9 --ra-ra-ra- root root root root 1 8:03:07 15:32:53
s 262148 0xcace --ra-ra-ra- root root root root 1 14:10:36 15:33:19
s 65541 0xd20049a3 --ra-ra-ra- root root root root 1 23:30:06 23:28:01

The reason is that I'm trying to find out what process is spawning these semaphores IDs. The system has been set up to have 10 semaphores identifiers (Solaris 9 default) and after a week or 2 we always hit that limit. Instead of just adjusting /etc/system and changing the limit of semaphores ID's, I'd like to find out what is causing it. This box is used as a Tivoli Storage Manager server.

IPC information from sysdef -i :
*
* IPC Semaphores
*
10 semaphore identifiers (SEMMNI)
60 semaphores in system (SEMMNS)
30 undo structures in system (SEMMNU)
25 max semaphores per id (SEMMSL)
10 max operations per semop call (SEMOPM)
10 max undo entries per process (SEMUME)
32767 semaphore maximum value (SEMVMX)
16384 adjust on exit max value (SEMAEM)

Last edited by Solarius; 07-02-2008 at 02:18 AM..
# 2  
Old 07-02-2008
The ipcs(1) utility may help you. man ipcs for details of the various options available.
# 3  
Old 07-02-2008
10 semid's is slim pickings. Why don't you cut your losses and set the max to something reasonable based on the system behavior, once it's ascertained that the system is working within reasonable bounds.
# 4  
Old 07-03-2008
Thx for your answers.

Ramen_noodle, the reason why I want to keep the semaphore ID's on 10 is 1.) because this is the Solaris 9 default and 2.) we actually don't experience this problem on our production system. The production system has exactly the same setup OS/hardware/software as this development system. So therefore it would be handy to find out which process is causing the grieve and it may lead us to something we can investigate.
# 5  
Old 07-03-2008
That's great that you want to maintain continuity between current production and what I assume is dev, but in reality a codebase may
require a lot of tweaking in dev to conform. This is all guesswork of course.

If you aren't willing to bend the rules to develop a refined system in dev/test the result will probably be entirely different than what you are aiming for.
"Premature optimization is the root of all evil"
# 6  
Old 07-07-2008
I've changed /etc/system and set semaphore identifiers to 30. Currently I'm waiting on agreement for an outage window for a reboot.
I'll post the results.
# 7  
Old 07-09-2008
After the reboot the system ran ok for a couple days, but again the SEMMNI (semaphore id's) limit was reached. We will have to take this issue to the software vendor and see if they have an idea.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

/var/adm/messages (insterface turned off/restored) and link up & link down message.

Hi All I am facing an issue with our new solaris machine. in /var/adm/messages Apr 22 16:43:05 Prod-App1 in.routed: interface net0 to 172.16.101.1 turned off Apr 22 16:43:33 Prod-App1 mac: NOTICE: nxge0 link up, 1000 Mbps, full duplex Apr 22 16:43:34 Prod-App1 mac: NOTICE: nxge0 link... (2 Replies)
Discussion started by: javeedkaleem
2 Replies

2. Solaris

/var/adm/messages (interface turned off/restored) and link up & link down message.

Hi All I am facing an issue with our new solaris machine. in /var/adm/messages root@Prod-App1:/var/tmp# root@Prod-App1:/var/tmp# root@Prod-App1:/var/tmp# cat /var/adm//messages Apr 20 03:10:01 Prod-App1 syslogd: line 25: WARNING: loghost could not be resolved Apr 20 08:24:18 Prod-App1... (0 Replies)
Discussion started by: javeedkaleem
0 Replies

3. UNIX for Dummies Questions & Answers

[Solved] Symbolic link not allowed or link target not accessible

Hi everybody, I read about treads realted to this issue but they did not resovle issue given below. Please help me resolve issue given below I have html file under /srv/www/htdocs/actual_folder ls actual_folder/ test.html and following link works... (0 Replies)
Discussion started by: newbielgn
0 Replies

4. Programming

g++ fails to link to static library when compilation and link in single command

Hello All, I've encountered a strange behaviour from g++ that doesn't make sense to me. Maybe you can shed some light on it: I have a bunch of source files and want to compile them and link them with a static library liba.a located in /usr/local/lib64 into an executable Approach 1 works... (0 Replies)
Discussion started by: magelord
0 Replies

5. Programming

IPC - pipes between parent and child process

Hi guys, I'm having some problem here, I'm studying pipes, and i want to create a shell in C and at this point a don't want to use semaphores, instead I want to use tricks. Straight to the doubt: I've a parent and a child process, and both of them has some code to execute, and the child process... (5 Replies)
Discussion started by: pharaoh
5 Replies

6. Solaris

errors on Netra-440: "IPC Warning: ipc: tcp_protocol: bad magic number"

I was asked to look into a problem with a Sun Netra 440 in another department. On the server in question, the relevant 'uname -a' information is, "SunOS host1 5.9 Generic_118558-16 sun4u sparc SUNW,Netra-440". That information aside, while the other admin is logged into the ALOM, these errors are... (0 Replies)
Discussion started by: Borealis
0 Replies

7. Programming

C program using IPC (inter process communication)

i want to write a C chat program that communicates over IPC(inter process communication), that could be run using 2 seperate terminal windows within the same computer. so that wat u type in one terminal window , should appear on the other and vice versa... could some one please help me with the... (2 Replies)
Discussion started by: localp
2 Replies

8. UNIX for Advanced & Expert Users

can some one give me some link about process and job control commands

can some one give me some link about process and job control commands (2 Replies)
Discussion started by: alokjyotibal
2 Replies

9. IP Networking

Automate FTP process and autorestart on link failure

Hi Guys, i have this lil challenge; i am to implement an automated script that searches/scans a directory for files then picks and sends this files to a very remote server via an ftp link. the challenge here is that the ftp link fails due to netwrk issues maybe; i therefore need to develop... (5 Replies)
Discussion started by: sdcoms
5 Replies

10. UNIX for Dummies Questions & Answers

Difference between hard link and soft link in unix

Hi All, Can any one please explain me what is the difference between hard link and soft link in UNIX. Thanks in advance Raja Chokalingam. (2 Replies)
Discussion started by: RAJACHOKALINGAM
2 Replies
Login or Register to Ask a Question