/[projects]/smsdaemon/plugins/HostStatusPlugin.cpp
ViewVC logotype

Annotation of /smsdaemon/plugins/HostStatusPlugin.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 149 - (hide annotations) (download)
Sun Dec 7 20:58:41 2008 UTC (15 years, 5 months ago) by torben
File size: 576 byte(s)
Refactoring / rename:
        IGsmModem -> ISmsTransceiver
        GsmModem -> ModemTransceiver
        DebugGsmModem -> DebugTransceiver

Move DebugTransceiver to its own files.


1 torben 137 #include "HostStatusPlugin.h"
2 torben 149 #include "ISmsTransceiver.h"
3 torben 137 #include "Sms.h"
4     #include "util.h"
5    
6    
7     using namespace std;
8    
9     HostStatusPlugin::HostStatusPlugin()
10     : Plugin("hoststatus", "returns an sms with host server status")
11     {
12     }
13    
14 torben 149 void HostStatusPlugin::Execute(ISmsTransceiver& modem, SMS& sms)
15 torben 137 {
16     string message;
17     string out;
18    
19 torben 138 Util::my_system("hostname", &out);
20     message += out;
21    
22 torben 137 Util::my_system("uptime", &out);
23     message += out;
24    
25     Util::my_system("df -h | grep dev | awk '{ print $6 \" \" $5}'", &out);
26     message += out;
27    
28 torben 142 modem.SendSms(sms.GetSender(), message, true);
29 torben 137
30     }

  ViewVC Help
Powered by ViewVC 1.1.20