Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using Monit for system monitoring. If i enable monitoring on a service it shows 'initializing' in the Status row. This can take a while. I wonder what Monit is doing in that time, since the used start script should return in under 2 secs max.

share|improve this question

1 Answer 1

up vote 5 down vote accepted

If you look in /etc/monit/monitrc, you'll see one of the options is "set daemon" which controls how often Monit checks services. Mine is set at 120. So that is the quickest Monit will update what it reports. The script might return in 2 seconds, but if yours is set like mine Monit won't check it again for another 118 seconds thereafter.

share|improve this answer
    
This line reads set daemon 10 with start delay 20 in my monitrc. But sometimes it stucks with 'initializing' for more than a minute. –  mikezter Dec 8 '10 at 13:41
    
Does the service take that long to create a .pid file? IIRC Monit needs that to verify the service is running. –  ultrasawblade Dec 8 '10 at 21:18
    
Actually your answer pointed me into the right direction: The init script i used started monit with the command line parameter -d which overrides directives in the config file. –  mikezter Dec 10 '10 at 13:51

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.