The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

chkservd Log Errors

Discussion in 'General Discussion' started by delta003, Oct 5, 2004.

  1. delta003

    delta003 Member
    PartnerNOC

    Joined:
    Aug 26, 2004
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    I thought it'd be fun to make a PHP web-based tool to parse chkservd.log. I think that log
    doesn't get enough attention and perhaps this is because there was no web-based way to
    view it (unless I missed something in WHM; to be honest I spend most my time at the
    command line) . Or perhaps it's because less and grep aren't fun.

    Almost full info can be found at:
    http://codenode.com/chkservd.html

    "Almost" meaning you'll have to get the script in some docroot you can access it by. And
    then there's the matter of open_basedir restrictions, which if you have you'll need to get
    a copy of chkservd.log to either ./ (where the script is) or /tmp/.

    But let's hope all our servers are free of errors. :rolleyes:
     
  2. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    I just tested it. Very nice. :)
     
  3. dezignguy

    dezignguy Well-Known Member

    Joined:
    Sep 26, 2004
    Messages:
    534
    Likes Received:
    0
    Trophy Points:
    16
    Oddly enough my chkservd.log in /var/tmp is emtpy... it exists, but it's empty.

    I don't remember for sure if it had something in it before.
     
  4. delta003

    delta003 Member
    PartnerNOC

    Joined:
    Aug 26, 2004
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    It shouldn't have anything. chkservd only logs to /var/log/
     
  5. dezignguy

    dezignguy Well-Known Member

    Joined:
    Sep 26, 2004
    Messages:
    534
    Likes Received:
    0
    Trophy Points:
    16
    umm... do you know what you're talking about delta003?

    /var/log is a directory on every redhat server I've had... inside it are all the log files. And I'd rather expect chkservd to log to chkservd.log.
     
  6. delta003

    delta003 Member
    PartnerNOC

    Joined:
    Aug 26, 2004
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    You said: "Oddly enough my chkservd.log in /var/TMP is emtpy... it exists, but it's empty."
    To which I replied: "It shouldn't have anything. chkservd only logs to /var/LOG/"--referring
    to your comment about /var/TMP/chkservd.log which probably should be empty.
     
  7. Sheldon

    Sheldon Well-Known Member

    Joined:
    Jun 7, 2004
    Messages:
    378
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
    create a softlink to chkservd.log ;)

    Sheldon
     
  8. dezignguy

    dezignguy Well-Known Member

    Joined:
    Sep 26, 2004
    Messages:
    534
    Likes Received:
    0
    Trophy Points:
    16
    My apologies, delta003... I don't know why I typed /var/tmp - it should have been /var/log.

    Anyways... yes - chkservd.log in /var/log is a 0 byte file... dated Oct 3 04:02

    I also have a chkservd.log.1 - also a 0 byte file... Sep 26 04:02

    I've added the additional log rotation (on sept 15th it looks) per this article

    But I really can't remember if this file was filled befor ethen or not.... is there an option to turn off the logging somewhere?
     
  9. BenThomas

    BenThomas Well-Known Member

    Joined:
    Feb 12, 2004
    Messages:
    598
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Houston, Texas USA
    cPanel Access Level:
    Root Administrator
    There's no option to do that. Try restarting chkservd and see it it writes anything to the log file.
     
  10. dezignguy

    dezignguy Well-Known Member

    Joined:
    Sep 26, 2004
    Messages:
    534
    Likes Received:
    0
    Trophy Points:
    16
    There we go... did /etc/init.d/chkservd restart and it started writing to the chkservd.log file.

    I wonder if the log rotation broke the logging? Does chkservd have to reload the log file when it's rotated? Maybe I should turn off log rotation for chkservd.log?
     
  11. BenThomas

    BenThomas Well-Known Member

    Joined:
    Feb 12, 2004
    Messages:
    598
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Houston, Texas USA
    cPanel Access Level:
    Root Administrator
    If you're rotating the log out, then you should definately restart the chkservd process afterwards. If your using logrotate, then that can be easily done in the postrotate section.
     
  12. delta003

    delta003 Member
    PartnerNOC

    Joined:
    Aug 26, 2004
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Since the PHP version has its limitations and I work mostly from the command
    line anyway, I created a much quicker Perl script to extract chkservd.log errors.
    http://codenode.com/chkservdlogerrors.php

    Thanks squirrel; I checked out your custom scripts site. It taught me that these
    things can be integrated into cPanel which I hadn't thought of doing.
     
  13. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    That's what I like about the cpanel software. It's written so that it's possible to add our own things to it.
     
    #13 PWSowner, Oct 14, 2004
    Last edited: Oct 14, 2004
  14. Sheldon

    Sheldon Well-Known Member

    Joined:
    Jun 7, 2004
    Messages:
    378
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
    squirrel... how so..

    could someone refer me to some documentation on how to go about doing that.

    thanks

    Sheldon
     
  15. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    What I mean is that cpanel and WHM, mostly WHM, use mainly perl for the functions, so anyone knowing perl can add their own stuff to it, like the things in my scripts club.
     
Loading...

Share This Page