#include "HostStatusPlugin.h" #include "ISmsTransceiver.h" #include "Sms.h" #include "util.h" using namespace std; HostStatusPlugin::HostStatusPlugin() : Plugin("hoststatus", "returns an sms with host server status") { } void HostStatusPlugin::Execute(ISmsTransceiver& modem, SMS& sms) { string message; string out; Util::my_system("hostname", &out); message += out; Util::my_system("uptime", &out); message += out; Util::my_system("df -h | grep dev | awk '{ print $6 \" \" $5}'", &out); message += out; modem.SendSms(sms.GetSender(), message, true); }