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 want to monitor vsftpd server from monit on CentOS 5.4 but somehow vsftpd does not create pid file in /var/run (nor in any other place).

Is this behavior normal for this distro? How should I configure monit to watch for vsftpd, should I create pid file manually in /etc/init.d/vsftpd script?

Thanks.

share|improve this question

3 Answers 3

up vote 5 down vote accepted

You can try this: monit: check process without pidfile

check process vsftpd
 matching vsftpd
 start program = "/etc/init.d/vsftpd start"
 stop program = "/etc/init.d/vsftpd stop"

Alternatively you can follow the guide I put together using aforementioned init file. Created RPM to keep the system consistent across updates (via fpm). New init file has modified service name vsftpd-pid so you can keep vsftpd stopped and vsftpd-pid running.

Remember to change your monit start and stop commands too.

More info here: http://bemehow.github.com/2012/11/15/monit-vsftpd/

share|improve this answer

Yes, this is normal (for any distro). vsftpd does not write out a pid file.

share|improve this answer
    
It does no my Ubuntu 9.1. –  jackhab Jan 28 '10 at 12:10
    
@jackhab: no, it doesn't. the start/stop script in /etc/init.d/ does. –  hop Feb 1 '10 at 15:12
    
You are right! –  jackhab Feb 4 '10 at 11:39

I created a replacement init script for vsftpd on Centos 5.4 that will create the PID files:

http://gist.github.com/508889

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.