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 installed monit on my centos 6/64bit and somethings wrong. Look at the shell :

[root@ND-1003 monit.d]# service monit start
Starting monit: monit: generated unique Monit id f8f62f27db2323649f105342f2fbf04d and stored to '/var/monit/id'
                                                           [  OK  ]
[root@ND-1003 monit.d]# service monit status
monit dead but subsys locked
[root@ND-1003 monit.d]# service monit stop
Stopping monit:                                            [FAILED]

As you can see there is a message: monit dead but subsys locked

Anybody know how to correct this ?

share|improve this question

Look for the monit statefile variable in the configuration file. On the CentOS/RHEL RPMForge packaging of monit, the statefile defaults to /var/monit/state

The definition in the config file looks like:

set statefile /var/monit/state

Find the file, remove it, then restart the monit service.

share|improve this answer

If you look in the startup script, is there a lockfile or socket file that is searched for in a tmp directory of some kind? Rename that and see if it'll start.

Might be in something like /var/lock/subsys or /var/run.

share|improve this answer

This is a little hackish, but it worked for me.

  1. stop monit (/etc/init.d/monit stop)
  2. start monit using this command (/usr/bin/monit -c /etc/monit.conf -l /var/log/monit.log -vv)
  3. test status (/etc/init.d/monit status)
    No subsys locked error is reported.

use /usr/bin/monit -h for more monit options.

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.