Skip to content

Instantly share code, notes, and snippets.

@schnell18
Created April 8, 2014 01:55
Show Gist options
  • Save schnell18/10082232 to your computer and use it in GitHub Desktop.
Save schnell18/10082232 to your computer and use it in GitHub Desktop.
Check and set Linux kernel semaphores
# cat /proc/sys/kernel/sem
250 32000 32 128
# ipcs -ls
------ Semaphore Limits --------
max number of arrays = 128
max semaphores per array = 250
max semaphores system wide = 100
max ops per semop call = 32
semaphore max value = 32767
Temporarily set semaphore
# echo 250 32000 100 128 > /proc/sys/kernel/sem
Permanently set semaphore
# echo "kernel.sem=250 32000 100 128" >> /etc/sysctl.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment