I am searching for a long time on net. But no use. Please help or try to give some ideas how to achieve this. I have finished writing the program, and today when I tested the ping loopback address, after sending the packet, the function recvfrom() received the “first” packet (type 8), and the second recvfrom() received the response packet
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 ping in linux until host is known with X seconds timeout?
Im trying to wait for a device to boot up in my code and i dont want to use sleep to wait for him. my problem is that sometimes the device fail to boot and im stuck in a loop when using: How can i try to ping to the device for X seconds and print “DEAD” or “ALIVE” using
PHP hang issue with passthru()/system() call and output buffering
I do have a strange problem. I’m trying to get around output buffering in PHP to run system() calls and get instant output. It works very well, but for some strange reason, the ping command on “test.de” isn’t presenting instant output as the ping on google.de does. I do see the first line for ‘ping test.de’ in the linux shell
My command line gets colored after I output a colored command in linux terminal
I wanted to have colored ping command output using a shell script. But in the process, I ended up having my command line also colored. Is there any way I can have only my output colored? Here is my bash script: Please see this for example: Answer You need to reset the color after you set it. With tput, this
How to get number of packets received, Average round trip time from ping command if I use popen
I have to ping the given IP address and I need to print the below values in C++. It is fine to use popen and get the output. If I use popen, I will get a file pointer and I need to read on this file pointer to get the whole output and I have to extract the values using
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.