I'm trying to develop a "backup service" that should start if i can't reach a specific pc.
The backup service should check if the machine is alive (ping isn't a solution because the remote machine can be natted).
Maybe a failed ssh connection can tell me if the machine is down\\not reachable.
The idea is:
If (!EndPointIsAlive){
//start backup
}else{
//wait x and retry
}
NAT is no argument against ping as I stated in my comment. In my oppionion you try to re-invent the wheel. I advise you to check the SNMP protocol and SNMP traps, which fulfill just you needs.
Traps are trigger based events which are sent to a management machine, where an alarm is raised.
You would instantly know, if and which machine just went down.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.