mirror of
https://github.com//cppla/ServerStatus
synced 2025-05-15 12:59:49 +08:00
add two logs
This commit is contained in:
parent
d75d5438a3
commit
503037c7e2
@ -24,7 +24,6 @@ services:
|
|||||||
|
|
||||||
networks:
|
networks:
|
||||||
serverstatus-network:
|
serverstatus-network:
|
||||||
name: serverstatus-network
|
|
||||||
ipam:
|
ipam:
|
||||||
config:
|
config:
|
||||||
- subnet: 172.23.0.0/24
|
- subnet: 172.23.0.0/24
|
||||||
|
@ -543,7 +543,7 @@ void CMain::offlineAlarmThread(void *pUser)
|
|||||||
time_t currentStamp = (long long)time(/*ago*/0);
|
time_t currentStamp = (long long)time(/*ago*/0);
|
||||||
if ((currentStamp-pClients->m_AlarmLastTime) > pWatchDogs[ID].m_aInterval)
|
if ((currentStamp-pClients->m_AlarmLastTime) > pWatchDogs[ID].m_aInterval)
|
||||||
{
|
{
|
||||||
printf("客户端下线, Client disconnects and sends alert information\n");
|
printf("客户端下线且超过阈值, Client disconnects and sends alert information\n");
|
||||||
pClients->m_AlarmLastTime = currentStamp;
|
pClients->m_AlarmLastTime = currentStamp;
|
||||||
CURL *curl;
|
CURL *curl;
|
||||||
CURLcode res;
|
CURLcode res;
|
||||||
@ -588,6 +588,8 @@ void CMain::offlineAlarmThread(void *pUser)
|
|||||||
}
|
}
|
||||||
curl_global_cleanup();
|
curl_global_cleanup();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
printf("客户端下线但未超过阈值,No alarm if the threshold is not exceeded\n");
|
||||||
}
|
}
|
||||||
ID++;
|
ID++;
|
||||||
}
|
}
|
||||||
@ -596,6 +598,7 @@ void CMain::offlineAlarmThread(void *pUser)
|
|||||||
{
|
{
|
||||||
printf("网络波动,No alarm information is sent due to network fluctuations\n");
|
printf("网络波动,No alarm information is sent due to network fluctuations\n");
|
||||||
}
|
}
|
||||||
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
int CMain::ReadConfig()
|
int CMain::ReadConfig()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user