Services State

Information on the server services, such as DNS service, FTP service, Mail service and so on, and their current state is held by the services_state node, which is presented by complex type servicesState (plesk_server.xsd). The node is structured as follows:

  • The srv node is required. It wraps the collection of data describing particular service . Data type: none.
  • The id node is required. It holds the service identifier. Data type: string.
  • The title node is required. It holds the service name. Data type: string.
  • The state node is required. It holds the current state of the service. Data type: string. Allowed values: running | stopped | none.
  • The error node is required if an error occurred while the service running. The node contains the text of the service error. Data type: string.

 

A response packet received from server can look as follows:

<packet version="1.4.2.0">
<server>
<get>
   <result>
      <status>ok</status>
      <services_state>
         <srv>
            <id>web</id>
            <title>Web Server (Apache)</title>
            <state>running</state>
         </srv>
         <srv>
            <id>smtp</id>
            <title>SMTP Server (QMail)</title>
            <state>running</state>
         </srv>
         <srv>
            <id>mail</id>
            <title>IMAP/POP3 Server (Courier-IMAP)</title>
            <state>running</state>
         </srv>
         <srv>
            <id>dns</id>
            <title>DNS Server (BIND)</title>
            <state>running</state>
         </srv>
         <srv>
            <id>tomcat</id>
            <title>Tomcat</title>
            <state>running</state>
         </srv>
         <srv>
            <id>postgresql</id>
            <title>PostgreSQL</title>
            <state>stopped</state>
         </srv>
         <srv>
            <id>spamassassin</id>
            <title>SpamAssassin</title>
            <state>running</state>
         </srv>
         <srv>
            <id>drweb</id>
            <title>Dr.Web antivirus</title>
            <state>stopped</state>
         </srv>
      </services_state>
   </result>
</get>
</server>
</packet>