05-31-2006
Identifying Semaphore Owners
Hi,
I have an AIX server which has a number of root owned semaphores. Is there a way of identifying which processes/threads own these processes so that they can be removed.
I there also a way to remove shared memory segments in a similar way
Thanks.
\
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hi, is there any command where we can monitor semaphores? (1 Reply)
Discussion started by: yls177
1 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I'm new to UNIX.
I need to know what's a semaphore
Do reply.
Thanks
VJ (3 Replies)
Discussion started by: vjsony
3 Replies
3. Solaris
Hello,
I have recently aquired an E280R chassis, that is one of the first E280R chassis so it still features old fan block from 420R (540-4434).
Unfortunately I have 900Mhz X7009A CPUs to go into this machine and those need a better fan block (540-5088) because they do overheat :(.
Could... (2 Replies)
Discussion started by: Don.Key
2 Replies
4. Shell Programming and Scripting
Hi,
I am looking to use a semaphore for the first time in one of my scripts. I am just wondering if there are any simple examples or tutorials around?
I am a beginner so the simpler the better :)
Thanks
-Jaken (2 Replies)
Discussion started by: Jaken
2 Replies
5. Shell Programming and Scripting
Control two exclusively shared resources(semaphore). The two resources are two files. The producer will write even numbers to one file, and odd numbers to another one. The consumer respectively reads from each file until it gets 5 even numbers and 5 odd numbers.
Can any one help me with the... (0 Replies)
Discussion started by: gokult
0 Replies
6. Programming
If I create a semaphore and then I fork a number of child processes then all the child process use that same semaphore.
Since the process address spaces are different rfom each other then how all the child process are able to access the same semaphore?
I understand that semaphore/mutex is at os... (0 Replies)
Discussion started by: rupeshkp728
0 Replies
7. Solaris
Can anyone tell me abt the Semaphore concept and what is semaphore???
is semaphore id is associated in terms as in resources like semaphore id 1 indicates cpu share unit is given and semaphore id 2 will indicate abt the memore or semaphore id 3 will tell us the i/o components (1 Reply)
Discussion started by: aarjun07
1 Replies
8. Shell Programming and Scripting
My git post-update has the following lines in it to make sure the permissions are set right:
find /usr/local/apache/htdocs -type d -print0 | xargs -0 chmod 755
find /usr/local/apache/htdocs -type f -print0 | xargs -0 chmod 644
chown -R apache:apache /usr/local/apache/htdocsThe only problem is... (5 Replies)
Discussion started by: dheian
5 Replies
9. UNIX for Dummies Questions & Answers
I have to list the files in a directory and along with that, list the owner of each of those files. Can someone please help me with a way to get this info please?
Gayathri (2 Replies)
Discussion started by: ggayathri
2 Replies
10. HP-UX
Hi,
I have a HP-UX server were I need to list all the files in the entire file system, their directory path, last modified date, owner and group. I do not need to search the file contents. I created the script given below and I am excluding directories and files of type tmp, temp and log. The... (4 Replies)
Discussion started by: Adyan Faruqi
4 Replies
LEARN ABOUT DEBIAN
apache::session::lock::semaphore
Apache::Session::Lock::Semaphore(3pm) User Contributed Perl Documentation Apache::Session::Lock::Semaphore(3pm)
NAME
Apache::Session::Lock::Semaphore - Provides mutual exclusion through semaphores
SYNOPSIS
use Apache::Session::Lock::Semaphore;
my $locker = new Apache::Session::Lock::Semaphore;
die "no semaphores" unless $locker;
$locker->acquire_read_lock($ref);
$locker->acquire_write_lock($ref);
$locker->release_read_lock($ref);
$locker->release_write_lock($ref);
$locker->release_all_locks($ref);
DESCRIPTION
Apache::Session::Lock::semaphore fulfills the locking interface of Apache::Session. Mutual exclusion is achieved through system semaphores
and the IPC::Semaphore module.
CONFIGURATION
The module must know how many semaphores to use, and what semaphore key to use. The number of semaphores has an impact on performance.
More semaphores means less lock contention. You should use the maximum number of semaphores that your platform will allow. On stock NetBSD,
OpenBSD, and Solaris systems, this is probably 16. On Linux 2.2, this is 32. This module tries to guess the number based on your operating
system, but it is safer to configure it yourself.
To set the number of semaphores, you need to pass an argument in the usual Apache::Session style. The name of the argument is NSems, and
the value is an integer power of 2. For example:
tie %s, 'Apache::Session::Blah', $id, {NSems => 16};
You may also need to configure the semaphore key that this package uses. By default, it uses key 31818. You can change this using the
argument SemaphoreKey:
tie %s, 'Apache::Session::Blah', $id, {NSems => 16, SemaphoreKey => 42};
PROBLEMS
There are a few problems that people frequently encounter when using this package.
If you get an invalid argument message, that usually means that the system is unhappy with the number of semaphores that you requested.
Try decreasing the number of semaphores. The semaphore blocks that this package creates are persistent until the system is rebooted, so if
you request 8 semaphores one time and 16 semaphores the next, it won't work. Use the system commands ipcs and ipcrm to inspect and remove
unwanted semphore blocks.
Cygwin
IPC on Cygwin requires running cygserver. Without it, program will exit with "Bad System call" message. It cannot be intercepted with eval.
Read /usr/share/doc/Cygwin/cygserver.README for more information.
Darwin/MacOS X
Darwin and MacOS X may not have semaphores, see <http://sysnet.ucsd.edu/~bellardo/darwin/sysvsem.html>
*BSD
Error "No space left on device" means that maximum number of semaphores is reached. See
<http://www.postgresql.org/docs/7.3/static/kernel-resources.html> for more information.
AUTHOR
This module was written by Jeffrey William Baker <jwbaker@acm.org>.
SEE ALSO
Apache::Session
perl v5.10.1 2010-10-18 Apache::Session::Lock::Semaphore(3pm)