How do I check to see how many semaphores are being allocated by InterBase.

By: Borland Staff

Abstract: Steps to check the semaphores allocated

Getting "semget" errors.  Need to troubleshoot available semaphores.

NOTE: It is very important that you ensure that there are no clients
            attached to or working with databases on the server that you
            are performing the following operations on.
Method: (example from Solaris 2.5 / SO-V4.0)
1) Check the values configured in the isc_config file:
	cat /usr/interbase/ics_config
	#V4_LOCK_MEM_SIZE       98304
	#ANY_LOCK_MEM_SIZE      98304
        --->	#V4_LOCK_SEM_COUNT      32
	#V4_LOCK_SIGNAL         16
	#ANY_LOCK_SIGNAL        16
	#V4_EVENT_MEM_SIZE      32768
	#ANY_EVENT_MEM_SIZE     32768

NOTE:  When configuring custom settings you must uncomment the
               associated entry.		
2) Stop the InterBase server. **IMPORTANT** Make sure there are
     no clients attached to the server.  You MUST be root to shut 
     down the server.
	gds_drop -a
3) Start the InterBase lock_manager by making an attachment to
     the server.
   	isql connect /usr/interbase/examples/v4/employee.gdb
4) Check to see how many semephores were allocated by InterBase.
     The number of semephore should directly correlate to the
     value configured for (V4_LOCK_SEM_COUNT).  On some OS's the
     default number used by InterBase may actually be less than
     the isc_config default of (32).
   	ipcs -a
     Look for a process owned by whomever you attached to the 
     server as.  Identify the number of semephores allocated by
     the number of (NSEMS).
     If you are making a custom configuration and you do not see
     the value that you expect, check to make sure that you have
     uncommented the (V4_LOCK_SEM_COUNT) in the isc_config file.

Server Response from: ETNASC04