Have you ever wondered what is the speed of your ssh connection. For example you are connected to a server in Dubai but you live in London and now you want to know what is the speed if you need to scp something. Well the solution to this problem is called PV.
PV is a terminal-based (command-line based) tool in Linux that allows the monitoring of data being sent through pipe. The full form of PV command is Pipe Viewer. PV helps the user by giving him a visual display of the following,
Time Elapsed
Completed Progress (percentage bar)
Current data transfer speed (also referred to as throughput rate)
Data Transferred
ETA (Estimated Time) (Remaining time)
Time Elapsed
Completed Progress (percentage bar)
Current data transfer speed (also referred to as throughput rate)
Data Transferred
ETA (Estimated Time) (Remaining time)
So how to install in debian or ubuntu?
apt install pv
And now how to check you ssh speed? (SSH SPEED TEST)
yes | pv | ssh remote_host "cat >/dev/null"
Code language: JavaScript (javascript)
You will see something like this:
root@webleit:~# yes | pv | ssh remote_host "cat >/dev/null"
64.0KiB 0:00:00 [15.4MiB/s] [ <=>
Code language: PHP (php)
The PV command can be used also used to create a copy progress bar like so
pv access.log > $HOME/Documents/access.log
Code language: PHP (php)
Or for creating a zip file with a progress bar like so
pv access.log | zip>$HOME/Documents/access.zip
Code language: PHP (php)
And much more 🙂