Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Mar 2004
    Posts
    859

    Default Is there anyway to monitor crond?

    A hosted customer just pointed out to us that their crons had not run since Dec 8th. I was amazed to find that crond had stopped on the server without our receiving any sort of notice. We may have received an email about this, but we, like many receive a TON of email every day and this may have been overlooked.

    Is there any way to have crond monitored via the Service Manager so that the stats appears when clicking on he Server Status link in WHM?

    Thanks much for any answer on this.

  2. #2
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    I was told a while back that this was going to be put into chkservd, but it never materialised - possibly because of the different cron daemons used by RH/trustix/FreeBSD. If you want to hack in your own process check it should be straightforward enough if you know some perl and look in the files in /etc/chkserv.d/ and the script itself /usr/local/cpanel/libexec/chkservd
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  3. #3
    Member
    Join Date
    Mar 2004
    Posts
    859

    Default

    For a very late thanks; Thanks much for the tip.

  4. #4
    Member
    Join Date
    Mar 2004
    Posts
    859

    Default

    Trying to write a script for this for chkserv monitoring and restarting cron (when needed).

    How does this look:

    cd /etc/chkserv.d
    touch crond
    pico -w crond

    Inserting this line at the top:
    service[crond]=x,x,x,service crond restart,crond,root|mailnull

    Then:
    pico -w chkservd.conf

    Inserting this line in alpehbetical order within the list:

    crond:1


    Look good?

    Thanks much.

  5. #5
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Looks good - simple to test it. You probably don't need the |mailnull at the end of the line.

    This would need tweaking for the likes of FreeBSD and Trustix that use different cron daemons and start methods.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  6. #6
    Member
    Join Date
    Feb 2004
    Posts
    46

    Default This works

    This worked for me. Remember to restart chkservd

    service chkservd restart

    Not sure if that is required to restart but once I did that it automatically restarted crond so I know it works now.

    Thanks
    Web Hosting Flash Tutorials for your hosting clients at OnlyDemos.com.

Similar Threads & Tags
Similar threads

  1. chkservd and crond
    By rapidot in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 02-10-2010, 10:12 AM
  2. Crond always stop by itself
    By hbhb in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 05-30-2009, 04:24 AM
  3. Crond Not Working
    By Millar in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 12-09-2008, 09:36 AM
  4. runaway crond ?
    By jols in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 05-23-2008, 06:51 PM
  5. Crond errror
    By ashokpomnar in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 04-04-2007, 01:39 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube