       // Once a connection has been made, make a subscription and send a message.
        console.log("onConnect");
        client.subscribe("cpu");
        client.subscribe("memory");
      }

      // called when the client loses its connection
      function onConnectionLost(responseObject) {
        if (responseObject.errorCode !== 0) {
          console.log("onConnectionLost:" + responseObject.errorMessage);
        }
      }

      // called when a message arrives
      function onMessageArrived(mess