Fping – A Command-Line Tool to Ping Hosts In Parallel on Ubuntu
Fping is a program to send ICMP echo probes to network hosts, it is similar to ping hence, it allows users to check if a remote host is up or down.Using Fping command, we can check multiple hosts at a time. This article describes “How to install Fping command and uses of Fping command”
Installing Fping command
To install Fping command, use the following command –
$ sudo apt-get install fping
The sample output should be like this –
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: gtk2-engines-pixbuf libbs2b0 libopusfile0 libpyside1.2 libqmmp-misc libqmmpui0 libshiboken1.2 libsidplayfp libtidy-0.99-0 linux-headers-4.2.0-27 linux-headers-4.2.0-27-generic linux-image-4.2.0-27-generic linux-image-extra-4.2.0-27-generic linux-signed-image-4.2.0-27-generic php7.0-opcache python-beautifulsoup python-feedparser python-html2text python-magic python-oauth2 python-pyside.qtcore python-pyside.qtgui python-pyside.qtnetwork python-pyside.qtwebkit python-pysqlite2 python-regex python-sqlalchemy python-sqlalchemy-ext python-support python-unity-singlet python-utidylib Use 'apt-get autoremove' to remove them. The following NEW packages will be installed: fping 0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded. Need to get 30.7 kB of archives. .........................................................
Usage of Fping command
To run Fping, use the following command –
$ fping tutorialspoint.com
The sample output should be like this –
tutorialspoint.com is alive
To test multiple sites, use the following command –
$ fping www.tutorialspoint.com www.google.com
The sample output should be like this –
www.tutorialspoint.com is alive www.google.com is alive
If host list are stored in a file, use the following command –
$ fping < hosts.txt
The sample output should be like this –
www.tutorialspoint.com is alive www.google.com is alive
To get more information about fping, use the following command –
$ fping -help
The sample output should be like this –
Usage: fping [options] [targets...] -a show targets that are alive -A show targets by address -b n amount of ping data to send, in bytes (default 56) -B f set exponential backoff factor to f -c n count of pings to send to each target (default 1) -C n same as -c, report results in verbose format -D print timestamp before each output line -e show elapsed time on return packets -f file read list of targets from a file ( - means stdin) (only if no -g specified) -g generate target list (only if no -f specified) (specify the start and end IP in the target list, or supply a IP netmask) (ex. fping -g 192.168.1.0 192.168.1.255 or fping -g 192.168.1.0/24) -H n Set the IP TTL value (Time To Live hops) -i n interval between sending ping packets (in millisec) (default 25) -l loop sending pings forever -m ping multiple interfaces on target host -n show targets by name (-d is equivalent) -p n interval between ping packets to one target (in millisec) (in looping and counting modes, default 1000) -q quiet (don't show per-target/per-ping results) -Q n same as -q, but show summary every n seconds -r n number of retries (default 3) -s print final stats -I if bind to a particular interface -S addr set source address -t n individual target initial timeout (in millisec) (default 500) -T n ignored (for compatibility with fping 2.4) -u show targets that are unreachable -O n set the type of service (tos) flag on the ICMP packets -v show version targets list of targets to check (if no -f specified)
Congratulations! Now, you know “How to install Fping tool and usage of Fping tool on Linux”. We’ll learn more about these types of commands in our next Linux post. Keep reading!
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP