Skip to content

Tag: ping

Python Subprocess ping -h Returns Exit Status 2

I want to capture ping -h output using Python, it results in exit status 2. I am working on a Linux host. This is the output The command seems to execute normally on the shell. What is the cause of this error? How can I fix it? Answer Following Barmar solution It is a normal behavior for ping, but the

How to be notified when IP is up?

I would like to ping a IP-Adress an want to be notified. System: Linux Fedora. Has anybody a idea or a Software? Answer Use this shell script. Found on http://jeromejaglale.com/doc/unix/shell_scripts/ping Put the ping in a loop or run the script with cron. Instead of echoing you can send a notification.