Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a ubuntu server, and going to /var/lock I see it is empty.

I do have nginx and mysql running, does each process store their lock files in a custom location?

I'm just learning ubuntu via a book, and it mentioned that if a process is running on redhat, you should see a lock file in /var/lock/subsys.

I'm using ubuntu.

share|improve this question
up vote 2 down vote accepted

If you are looking for the pid files, they live under /var/run. This will contain small text files that contain the process id of a running process, although if the process dies it might not clean up the pid file. If you want to see if a process is running, you really want to do ps axf | grep processname, i.e. for nginx do ps axf | grep nginx.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.