Title: | DIGITAL UNIX (FORMERLY KNOWN AS DEC OSF/1) |
Notice: | Welcome to the Digital UNIX Conference |
Moderator: | SMURF::DENHAM |
Created: | Thu Mar 16 1995 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 10068 |
Total number of notes: | 35879 |
Hi all, is there a way (beyond ipcs) to get information on ipc objects in the system? I've been contacted by a customer who'd like to have a program that, before using such an object, (i.e a semaphore), get the number of currently used objects, compares it with the maximum allowed (where can I get it?) and avoid using it if the maximum is reached. The above for sockets, shared memories, semaphores and message queues. Wouldn't be better to try to used it, handling the error if any? thanks in advance Angelo
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
8952.1 | NETRIX::"[email protected]" | Shashi Mangalat | Wed Feb 26 1997 19:09 | 14 | |
The table(2) system call provides options to retrieve SystemV IPC limits. For eg: if (table(TBL_SHMINFO, SHMINFO_MAX, &shmmax, 1, sizeof(((struct shminfo *)0)->shmmax)) < 0) { perror("table"); exit(1); } See the man page and <sys/table.h> for other options. Don't know about sockets. --shashi [Posted by WWW Notes gateway] | |||||
8952.2 | VAXCPU::michaud | Jeff Michaud - ObjectBroker | Wed Feb 26 1997 19:18 | 8 | |
> Don't know about sockets. And .0 didn't say which address families/protocols since they differ from family to family. For a start however, if table() can fetch you the size of the system open file table, that would be the absolute upper limit on the max sockets. |