LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Fping (https://www.linuxquestions.org/questions/linux-newbie-8/fping-4175580082/)

zied99 05-18-2016 08:22 AM

Fping
 
hello,
I am using fping to show the address ip of hosts alive like this:
Code:

fping -A -d -a -q -g  192.168.1.0/24>file.txt
the result of this command is:
Code:

livebox.home (192.168.1.1)
set-top-box41.home (192.168.1.10)
pc38.home (192.168.1.11)
pc43.home (192.168.1.12)
pc39.home (192.168.1.15)

My problem is that this command display this hosts and take about 28s to stop running.I don't know how can i do to stop this command after it display the hosts.
Please help me.
Thank you in advance for your answers

dab1414 05-18-2016 08:57 AM

Quote:

Originally Posted by zied99 (Post 5547197)
My problem is that this command display this hosts and take about 28s to stop running.


28s seems about normal for this command with number of addresses, and number that are active. If you read "man fping", it will tell you the default is 3 attemps, also with a 500ms timeout, and icmp packet sending interval of 25ms.

Try adding "-r 1" for 1 retry, maybe "-i 10" for shorter interval, perhaps play with "-t n" ( where n is in ms (defaults to 500)).
Do you need to go to 192.168.1.24?, remember each address that is not live will waste approx. 1500ms.

Anyhow hopefully interpreted the manpage some for you...


All times are GMT -5. The time now is 08:20 AM.