cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Symptoms

Server is still not reflecting in the reports and running ndtrack manually with Upload=false option does not generate any inventory data. We see the following error in the tracker.log:
[Thu Apr 12 16:36:37 2018 (G, 0)] {9303} ************************************************************ 
[Thu Apr 12 16:36:37 2018 (G, 0)] {9303} Program arguments are '/opt/managesoft/libexec/ndtrack -t Machine -o Upload=false' 
[Thu Apr 12 16:36:37 2018 (G, 0)] {9303} Preferences loaded 
[Thu Apr 12 16:36:37 2018 (G, 0)] {9303} Inventory Setting file is '/var/opt/managesoft/tracker/inventorysettings/InventorySettings.xml' 
[Thu Apr 12 16:36:37 2018 (G, 0)] {9303} Obtaining semaphore lock (to ensure only one instance is running)... 
[Thu Apr 12 16:36:37 2018 (G, 0)] {9303} ERROR: Could not obtain semaphore lock, Windows error code: 2 
[Thu Apr 12 16:36:37 2018 (G, 0)] {9303} Program exited with code -536870910 
[Thu Apr 12 16:36:37 2018 (G, 0)] {9303} ************************************************************

Cause

This is usually due to the system running out of semaphores to allocate. Applications such as Oracle DB and Apache can use a lot of semaphores, and if an application has a programming issue, this can prevent them from being freed and thus prevent other applications from using them.


Steps To Reproduce

  • Reduce semaphore limits to lower than needed.
  • Observe the error when running ndtrack

Resolution

There are several commands that can be used to troubleshoot this issue and find out if there are excessive semaphores in use by the system:

  • Show current semaphore limits:
    ipcs -ls
    
  • Show current semaphore usage:
    ipcs -us
  • Show the processes associated with current semaphores in use:
    for pid in $(for semid in $(ipcs -s | awk '/0x/{ print $2 }'); do ipcs -s -i $semid | tail -2 | head -1 | awk '{print $5}'; done | sort -u); do ps uh -p $pid; done
After investigating the above you may notice that the semaphore limit is not set high enough or a process is using a lot of semaphores.
Was this article helpful? Yes No
No ratings
Version history
Last update:
‎Jun 28, 2018 04:27 PM
Updated by: