Using the ping.sh attached
Running the script Steps:
Step1: Change the IP address of script ping.sh to the error camera IP.
Step2: update ping.sh to the server /home/admin/
Step3: input command: chmod +x /home/admin/ping.sh
Step4: running the scrip, input command: nohup /home/admin/ping.sh &
Step5: When the problem happened, script will record result to /opt/ping.log
Step6: Stop the scrip input command: PID=$(ps -ef|grep ping.sh | grep -v grep | awk '{print $2}')
kill -9 $PID