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.

whm server status information file name

Discussion in 'General Discussion' started by parag joshi, Jun 17, 2010.

  1. parag joshi

    parag joshi Well-Known Member

    Joined:
    Sep 2, 2008
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    0
    Hello,

    Where is whm server status information stored?

    Please provide me its file name and adress

    Thanks
     
  2. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Server Status

    Main >> Server Status is a menu that contains four items:


    • Apache Status
    • Daily Process Log
    • Server Information
    • Service Status

    Are you asking for the location of each of these, or only one specific item?

    Main >> Server Status >> Apache Status simply shows the output of the following command:

    Code:
    # /usr/local/apache/bin/apachectl status
    The cpsrvd process executes the above command and displays the output in the browser.

    Main >> Server Status >> Daily Process Log calls a function, showcpuusage, that is inside /usr/local/cpanel/whostmgr/bin/whostmgr2. There is no way to call this from the command line. whostmgr2 is compiled and the function can only be called from the WebHost Manager.

    Main >> Server Status >> Server Information collects information from a variety of sources, notably dmesg. You can find the information presented here in output of the following commands:

    Code:
    # cat /proc/cpuinfo
    # free -m
    # uname -a
    # dmesg
    # df -h
    Main >> Server Status >> Service Status reads the contens of the files in /var/run/chkserv.d. chkservd, which is part of tailwatchd, is what monitors the status of services. Each service that is monitored has a file named for it in /var/run/chkserv.d, and that file contains either a "+" or a "-", signifying whether the service has been detected as running or not. Which services are monitored is selected in Main >> Service Configuration >> Service Manager. The chkservd configuration is stored in /etc/chkserv.d. Just as with /var/run/chkserv.d, each service that is monitored has a file named for it in that directory.
     
    #2 cPanelJared, Jun 17, 2010
    Last edited: Jun 21, 2010
  3. parag joshi

    parag joshi Well-Known Member

    Joined:
    Sep 2, 2008
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    0
    Hello,

    I need file name where serverstatus stored.

    Please help.
     
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    What do you mean by "serverstatus?"
     
  5. parag joshi

    parag joshi Well-Known Member

    Joined:
    Sep 2, 2008
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    0
    Hello,

    Server status means i need file name and address where the information of whm server status option is stored.

    Please help.
     
  6. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Which one?
     
  7. parag joshi

    parag joshi Well-Known Member

    Joined:
    Sep 2, 2008
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    0
    Hello,

    We have change ftp port from 21 to 2121 however its shows ftp service failed in whm server status.

    How can we fixed this?

    Please advise.
     
  8. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    chkservd is responsible for this

    Thank you for the detailed explanation of what you want to do. This was not clear in your original post. Now that I know specifically the change you want to make, I can offer specific advice instead of general suggestions.

    chkservd is the service that is responsible for checking the status of services. It is configured in the WebHost Manager in Main >> Service Configuration >> Service Manager. The configuration is stored in files in /etc/chkserv.d. /etc/chkserv.d/ftpd is the file in question. Here is an example:

    Code:
    # cd /etc/chkserv.d/
    # cat ftpd 
    service[ftpd]=21,QUIT,220,/scripts/restartsrv_ftpserver,proftpd||pure-ftpd&&pure-authd,root|nobody,220|USER %service_auth_user%|3|PASS %service_auth_pass%|2|QUIT
    The number "21" near the beginning of the file is the port number. You can change the number, then save the changes to the file. Then, restart tailwatchd (chkservd is a driver that is part of tailwatchd; tailwatchd is the parent service):

    Code:
    # /scripts/restartsrv_tailwatchd
    You can check to see if chkservd is detecting the FTP service as up or down by using tail -f to watch its log file:

    Code:
    # tail -f /var/log/chkservd.log 
    Service Check Started
    [2010-06-18 07:51:24 -0500] Service check ....syslogd [[check command:+][tcp connect:N/A]]...spamd [[check command:+][tcp connect:N/A]]...queueprocd [[check command:+][tcp connect:N/A]]...named [[check command:+][tcp connect:N/A]]...mysql [[check command:+][tcp connect:N/A]]...lfd [[check command:+][tcp connect:N/A]]...ipaliases [[check command:+][tcp connect:N/A]]...imap [[check command:+][tcp connect:+]]...httpd [[check command:N/A][tcp connect:+]]...ftpd [[check command:+][tcp connect:+]]...exim-26 [[check command:N/A][tcp connect:+]]...exim [[check command:+][tcp connect:+]]...cpsrvd [[check command:N/A][tcp connect:+]]...cpanellogd [[check command:+][tcp connect:N/A]]...clamd [[check command:+][tcp connect:N/A]]...Done
    Service Check Finished
    Use Ctrl+C to stop the tail -f command.

    The only problem with changing the port number in /etc/chkserv.d/ftpd is that the file will be overwritten if cPanel updates, and it will revert back to checking port 21. You can create a script with the filename /scripts/postupcp to copy your custom version of the file back to /etc/chkserv.d/ftpd after each cPanel update.
     
    Infopro likes this.
  9. parag joshi

    parag joshi Well-Known Member

    Joined:
    Sep 2, 2008
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    0
    Hello,

    Issue has been resolve.

    thanks
     
Loading...

Share This Page