whm server status information file name

parag joshi

Well-Known Member
Sep 2, 2008
52
0
56
Hello,

Where is whm server status information stored?

Please provide me its file name and adress

Thanks
 

JaredR.

Well-Known Member
Feb 25, 2010
1,834
27
143
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.
 
Last edited:

parag joshi

Well-Known Member
Sep 2, 2008
52
0
56
Hello,

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

Please help.
 

parag joshi

Well-Known Member
Sep 2, 2008
52
0
56
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.
 

JaredR.

Well-Known Member
Feb 25, 2010
1,834
27
143
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.
 
  • Like
Reactions: Infopro