Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.