Description

This function reports which services (daemons) are enabled, installed, and monitored on your server.


Examples




https://hostname.example.com:2087/cpsess##########/json-api/servicestatus?api.version=1&service=crond




https://hostname.example.com:2087/cpsess##########/xml-api/servicestatus?api.version=1&service=crond




whmapi1 servicestatus service=crond



{
  "data": {
    "service": [
      {
        "monitored": 0,
        "installed": 0,
        "name": "clamd",
        "display_name": "ClamAV Daemon",
        "enabled": 1
      },
      {
        "monitored": 1,
        "installed": 1,
        "name": "cpanellogd",
        "running": 1,
        "display_name": "cPanel Log and Bandwidth Processor",
        "enabled": 1
      },
      {
        "monitored": 0,
        "installed": 1,
        "name": "cpdavd",
        "display_name": "cPanel DAV Daemon",
        "enabled": 1
      },
      {
        "monitored": 1,
        "installed": 1,
        "name": "cpsrvd",
        "running": 1,
        "display_name": "cPanel Dns Admin Cache",
        "enabled": 1
      },
      {
        "monitored": 0,
        "installed": 1,
        "name": "crond",
        "display_name": "Cron Daemon",
        "enabled": 1
      },
      {
        "monitored": 0,
        "installed": 1,
        "name": "dnsadmin",
        "display_name": "service_dnsadmin_pretty_name",
        "enabled": 1
      },
      {
        "monitored": 0,
        "installed": 1,
        "name": "entropychat",
        "display_name": "Entropy Chat Server",
        "enabled": 1
      },
      {
        "monitored": 0,
        "installed": 1,
        "name": "exim",
        "display_name": "Exim Mail Server",
        "enabled": 1
      },
      {
        "monitored": 1,
        "installed": 1,
        "name": "ftpd",
        "running": 1,
        "display_name": "Ftp Server",
        "enabled": 1
      },
      {
        "monitored": 0,
        "installed": 1,
        "name": "httpd",
        "display_name": "Apache Web Server",
        "enabled": 1
      },
      {
        "monitored": 1,
        "installed": 1,
        "name": "imap",
        "running": 1,
        "display_name": "IMAP Server",
        "enabled": 1
      },
      {
        "monitored": 0,
        "installed": 1,
        "name": "ipaliases",
        "display_name": "IP Aliases",
        "enabled": 1
      },
      {
        "monitored": 0,
        "installed": 1,
        "name": "mailman",
        "display_name": "Mailman",
        "enabled": 1
      },
      {
        "monitored": 0,
        "installed": 1,
        "name": "mysql",
        "display_name": "MySQL Server",
        "enabled": 1
      },
      {
        "monitored": 1,
        "installed": 1,
        "name": "named",
        "running": 1,
        "display_name": "DNS Server",
        "enabled": 1
      },
      {
        "monitored": 0,
        "installed": 1,
        "name": "pop",
        "display_name": "POP3 Server",
        "enabled": 1
      },
      {
        "monitored": 0,
        "installed": 0,
        "name": "postgresql",
        "display_name": "PostgresSQL Server",
        "enabled": 1
      },
      {
        "monitored": 1,
        "installed": 1,
        "name": "queueprocd",
        "running": 1,
        "display_name": "TaskQueue Processor",
        "enabled": 1
      },
      {
        "monitored": 0,
        "installed": 1,
        "name": "rsyslogd",
        "display_name": "rsyslogd",
        "enabled": 1
      },
      {
        "monitored": 0,
        "installed": 1,
        "name": "spamd",
        "display_name": "Apache SpamAssassin™ Server",
        "enabled": 1
      },
      {
        "monitored": 0,
        "installed": 1,
        "name": "sshd",
        "display_name": "SSH Daemon",
        "enabled": 1
      },
      {
        "monitored": 0,
        "installed": 0,
        "name": "syslogd",
        "display_name": "System Logger Daemon",
        "enabled": 1
      },
      {
        "monitored": 0,
        "installed": 1,
        "name": "tailwatchd",
        "display_name": "TailWatch Daemon",
        "enabled": 1
      },
      {
        "monitored": 0,
        "installed": 0,
        "name": "tomcat",
        "display_name": "Tomcat Server",
        "enabled": 1
      }
    ]
  },
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "servicestatus"
  }
}




<result>
    <data>
        <service>
            <monitored>0</monitored>
            <installed>0</installed>
            <name>clamd</name>
            <display_name>ClamAV Daemon</display_name>
            <enabled>1</enabled>
        </service>
        <service>
            <monitored>1</monitored>
            <installed>1</installed>
            <name>cpanellogd</name>
            <running>1</running>
            <display_name>cPanel Log and Bandwidth Processor</display_name>
            <enabled>1</enabled>
        </service>
        <service>
            <monitored>0</monitored>
            <installed>1</installed>
            <name>cpdavd</name>
            <display_name>cPanel DAV Daemon</display_name>
            <enabled>1</enabled>
        </service>
        <service>
            <monitored>1</monitored>
            <installed>1</installed>
            <name>cpsrvd</name>
            <running>1</running>
            <display_name>cPanel Dns Admin Cache</display_name>
            <enabled>1</enabled>
        </service>
        <service>
            <monitored>0</monitored>
            <installed>1</installed>
            <name>crond</name>
            <display_name>Cron Daemon</display_name>
            <enabled>1</enabled>
        </service>
        <service>
            <monitored>0</monitored>
            <installed>1</installed>
            <name>dnsadmin</name>
            <display_name>service_dnsadmin_pretty_name</display_name>
            <enabled>1</enabled>
        </service>
        <service>
            <monitored>0</monitored>
            <installed>1</installed>
            <name>entropychat</name>
            <display_name>Entropy Chat Server</display_name>
            <enabled>1</enabled>
        </service>
        <service>
            <monitored>0</monitored>
            <installed>1</installed>
            <name>exim</name>
            <display_name>Exim Mail Server</display_name>
            <enabled>1</enabled>
        </service>
        <service>
            <monitored>1</monitored>
            <installed>1</installed>
            <name>ftpd</name>
            <running>1</running>
            <display_name>Ftp Server</display_name>
            <enabled>1</enabled>
        </service>
        <service>
            <monitored>0</monitored>
            <installed>1</installed>
            <name>httpd</name>
            <display_name>Apache Web Server</display_name>
            <enabled>1</enabled>
        </service>
        <service>
            <monitored>1</monitored>
            <installed>1</installed>
            <name>imap</name>
            <running>1</running>
            <display_name>IMAP Server</display_name>
            <enabled>1</enabled>
        </service>
        <service>
            <monitored>0</monitored>
            <installed>1</installed>
            <name>ipaliases</name>
            <display_name>IP Aliases</display_name>
            <enabled>1</enabled>
        </service>
        <service>
            <monitored>0</monitored>
            <installed>1</installed>
            <name>mailman</name>
            <display_name>Mailman</display_name>
            <enabled>1</enabled>
        </service>
        <service>
            <monitored>0</monitored>
            <installed>1</installed>
            <name>mysql</name>
            <display_name>MySQL Server</display_name>
            <enabled>1</enabled>
        </service>
        <service>
            <monitored>1</monitored>
            <installed>1</installed>
            <name>named</name>
            <running>1</running>
            <display_name>DNS Server</display_name>
            <enabled>1</enabled>
        </service>
        <service>
            <monitored>0</monitored>
            <installed>1</installed>
            <name>pop</name>
            <display_name>POP3 Server</display_name>
            <enabled>1</enabled>
        </service>
        <service>
            <monitored>0</monitored>
            <installed>0</installed>
            <name>postgresql</name>
            <display_name>PostgresSQL Server</display_name>
            <enabled>1</enabled>
        </service>
        <service>
            <monitored>1</monitored>
            <installed>1</installed>
            <name>queueprocd</name>
            <running>1</running>
            <display_name>TaskQueue Processor</display_name>
            <enabled>1</enabled>
        </service>
        <service>
            <monitored>0</monitored>
            <installed>1</installed>
            <name>rsyslogd</name>
            <display_name>rsyslogd</display_name>
            <enabled>1</enabled>
        </service>
        <service>
            <monitored>0</monitored>
            <installed>1</installed>
            <name>spamd</name>
            <display_name>Apache SpamAssassin™ Server</display_name>
            <enabled>1</enabled>
        </service>
        <service>
            <monitored>0</monitored>
            <installed>1</installed>
            <name>sshd</name>
            <display_name>SSH Daemon</display_name>
            <enabled>1</enabled>
        </service>
        <service>
            <monitored>0</monitored>
            <installed>0</installed>
            <name>syslogd</name>
            <display_name>System Logger Daemon</display_name>
            <enabled>1</enabled>
        </service>
        <service>
            <monitored>0</monitored>
            <installed>1</installed>
            <name>tailwatchd</name>
            <display_name>TailWatch Daemon</display_name>
            <enabled>1</enabled>
        </service>
        <service>
            <monitored>0</monitored>
            <installed>0</installed>
            <name>tomcat</name>
            <display_name>Tomcat Server</display_name>
            <enabled>1</enabled>
        </service>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>servicestatus</command>
    </metadata>
</result>



Parameters

ParameterTypeDescriptionPossible valuesExample
servicestring

The service for which to view the status.

If you do not specify a value, the function will return the status for all of your server's services.

  • apache_php_fpm
  • clamd
  • cpanel-dovecot-solr
  • cpanel_php_fpm
  • cpanellogd
  • cpdavd
  • cpgreylistd
  • cphulkd
  • cpsrvd
  • crond
  • dnsadmin
  • exim
  • exim-altport
  • ftpd
  • httpd
  • imap
  • ipaliases
  • lmtp
  • mailman
  • mysql
  • named
  • nscd
  • p0f
  • pop
  • postgresql
  • queueprocd
  • rsyslogd
  • spamd
  • sshd
  • syslogd
  • tailwatchd
  • tomcat

For more information about these services, read our Service Manager documentation.


crond

Returns

ReturnTypeDescriptionPossible valuesExample
servicehash

A hash of service information.


This hash contains the name, display_name, enabled, installed, monitored, and running parameters.

In cPanel & WHM version 76 and later, certain server profiles disable specific services. For example, a Mail Node profile's ftpd service would return a 0 value for the enabled, installed, and monitored returns.


 

name

string

The service's short name.

The function returns this value in the service hash.

  • apache_php_fpm
  • clamd
  • cpanel-dovecot-solr
  • cpanel_php_fpm
  • cpanellogd
  • cpdavd
  • cpgreylistd
  • cphulkd
  • cpsrvd
  • crond
  • dnsadmin
  • exim
  • exim-altport
  • ftpd
  • httpd
  • imap
  • ipaliases
  • lmtp
  • mailman
  • mysql
  • named
  • nscd
  • p0f
  • pop
  • postgresql
  • queueprocd
  • rsyslogd
  • spamd
  • sshd
  • syslogd
  • tailwatchd
  • tomcat

For more information about these services, read our Service Manager documentation.


crond

display_name

string

The service's full name.

The function returns this value in the service hash.

A string value.Cron Daemon

enabled

Boolean

Whether the service is enabled.

The function returns this value in the service hash.

  • 1 — Enabled.
  • 0 — Disabled. In cPanel & WHM version 76 and later, if a server profile disables a service, this returns a 0 value.
1

installed

Boolean

Whether the service is installed.

The function returns this value in the service hash.

  • 1 — Installed.
  • 0 — Uninstalled. In cPanel & WHM version 76 and later, if a server profile disables a service, this returns a 0 value.
1

monitored

Boolean

Whether the server monitors the service.

The function returns this value in the service hash.

  • 1 — Monitored.
  • 0 — Not monitored. In cPanel & WHM version 76 and later, if a server profile disables a service, this returns a 0 value.
1

running

Boolean

Whether the service currently runs on the server.

The function does not return this parameter if the server does not monitor the service.

The function returns this value in the service hash.

  • 1 — Running.
  • 0 — Not running.


1