mirror of
https://github.com//cppla/ServerStatus
synced 2025-07-10 19:55:58 +08:00
update
This commit is contained in:
parent
a1689acbf0
commit
7316dbdddb
@ -310,15 +310,19 @@ void CMain::WatchdogMessage(int ClientNetID, double load_1, double load_5, doubl
|
|||||||
if (expression.value() > 0)
|
if (expression.value() > 0)
|
||||||
{
|
{
|
||||||
int ClientID = ClientNetToClient(ClientNetID);
|
int ClientID = ClientNetToClient(ClientNetID);
|
||||||
printf("node info: %s\n", Client(ClientID)->m_aUsername);
|
time_t currentStamp = (long long)time(/*ago*/0);
|
||||||
printf("node info: %s\n", Client(ClientID)->m_aName);
|
if ((currentStamp-Client(ClientID)->m_AlarmLastTime) > 1800)
|
||||||
printf("node info: %s\n", Client(ClientID)->m_aType);
|
{
|
||||||
printf("node info: %s\n", Client(ClientID)->m_aHost);
|
Client(ClientID)->m_AlarmLastTime = currentStamp;
|
||||||
printf("node info: %s\n\n", Client(ClientID)->m_aLocation);
|
printf("node info: %s\n", Client(ClientID)->m_aUsername);
|
||||||
printf("watchdog name: %s\n", Watchdog(ID)->m_aName);
|
printf("node info: %s\n", Client(ClientID)->m_aName);
|
||||||
printf("watchdog rule: %s\n", Watchdog(ID)->m_aRule);
|
printf("node info: %s\n", Client(ClientID)->m_aType);
|
||||||
|
printf("node info: %s\n", Client(ClientID)->m_aHost);
|
||||||
|
printf("node info: %s\n\n", Client(ClientID)->m_aLocation);
|
||||||
|
printf("watchdog name: %s\n", Watchdog(ID)->m_aName);
|
||||||
|
printf("watchdog rule: %s\n", Watchdog(ID)->m_aRule);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ID++;
|
ID++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -675,3 +679,4 @@ int main(int argc, const char *argv[])
|
|||||||
|
|
||||||
return RetVal;
|
return RetVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,10 +38,11 @@ class CMain
|
|||||||
char m_aPassword[128];
|
char m_aPassword[128];
|
||||||
int m_aMonthStart; //track month network traffic. by: https://cpp.la
|
int m_aMonthStart; //track month network traffic. by: https://cpp.la
|
||||||
|
|
||||||
int64_t m_LastNetworkIN;
|
int64_t m_LastNetworkIN; //restore month traffic info.
|
||||||
int64_t m_LastNetworkOUT;
|
int64_t m_LastNetworkOUT; //restore month traffic info.
|
||||||
int64 m_TimeConnected;
|
int64_t m_TimeConnected;
|
||||||
int64 m_LastUpdate;
|
int64_t m_LastUpdate;
|
||||||
|
int64_t m_AlarmLastTime; //record last alarm time.
|
||||||
|
|
||||||
struct CStats
|
struct CStats
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user