SSHPING(8)
๐ SSHPING(8) โ the ssh-based ping test utility โจ
okay so bestie, welcome to sshping(8) โ yes it's a whole manual section, yes she's iconic. Quick vibe check: this page lives in section 8 of the manual, and the utility itself is described as an ssh-based ping test utility. Now let's get into it ๐ซถ
๐ธ NAME ๐ธ
sshping โ measure character-echo latency and bandwidth for an interactive ssh session. no cap, that's the whole job ๐
๐ฆ SYNOPSIS ๐ฆ
sshping [options] [user@]addr[:port]
โจ DESCRIPTION โจ
sshping is an SSH-based, ping-like utility that measures interactive character echo latency and file transfer upload/download throughput. literally ping but make it ssh ๐
and before you ask: it's pronounced "shipping" ๐ข (iykyk)
๐ PARAMETERS ๐
userโ the username you log in to the remote system as. if you leave it out, it defaults to the current username on your local system, so it's giving "i'm me and that's the vibe" ๐โโ๏ธaddrโ the IP name or address of the target system. the main character of the whole operation ๐portโ the tcp port number for the ssh daemon on the target system. it must be a number โ service names like"ssh"are not supported, so don't try it, she will not be amused ๐. default is22.
โญ OPTIONS โญ
short and long forms of options take the same arguments as shown. no funny business, same arguments either way ๐ซก
-b,--bindaddr IPโ bind to this source address ๐-c,--count NCHARSโ number of characters to echo, default1000๐ข-d,--delimitedโ use delimiters in big numbers, e.g.1,234,567โ so your eyes don't fall out reading raw nanoseconds ๐-e,--echocmd CMDโ useCMDfor the echo command; default:cat > /dev/null. for the character echo test, this command is issued to the remote system (sshpingadds the newline) so that anything "typed" is echoed back. cute, right? ๐-f,--config-file Fโ read and parse the ssh configuration fileFfor options. โ ๏ธ depending upon which version of libssh you have, you may not see any error if the fileFis missing or had bad syntax. so you should check for the existance of fileFin your script before passing it here โ fr fr, do the check. seessh_config(5)for details of the file's contents. default is~/.ssh/config๐-h,--helpโ print usage and exit. the classic "what does anything do" button ๐โโ๏ธ-H,--human-readableโ use flesh-friendly units ๐ (yes, flesh-friendly. she said what she said.)-i,--identity FILEโ identity file, ie ssh private keyfile ๐ keep it secret, keep it safe-p,--password PWDโ use passwordPWD(can be seen, use with care) ๐ bestie that's a whole security caveat, treat it with respect-P,--ping-summaryโ append measurements in ping-like round-trip-time line format, e.g.rtt min/avg/max/mdev = 1.371/2.095/2.505/0.389 ms๐-r,--runtests e|sโ run these tests,e=echo,s=speed; defaultes=both. pick your fighter or run 'em both ๐ช-s,--size MBโ for the transfer speed test (the scp test), send/receiveMBmegabytes; default=8 MB๐ฆ-t,--time SECSโ time limit for the echo test. we'll stop the test soon after this number of seconds, or the--couontnumber of characters, whichever comes first. (yes,--couont. treasure the typo, she's canon now ๐) timing starts after the ssh login and shell creation โฑ๏ธ-v,--verboseโ show more output, use twice for lots:-vv๐ฃ๏ธ๐ฃ๏ธ-z,--remote FILEโ path and name of a remote file that we can write to, for the upload test; and that we will read back, for the download test. the default is to create the1MBdummy file/tmp/sshping-PID.tmpand repreatedly transfer that file--sizetimes ๐
๐ OUTPUT FIELDS ๐
๐ Connection
ssh-Login-Time
Time in nanoseconds to establish the tcp network connection, authenticate, and form the ssh session, then start an ssh channel, launch a remote shell, login to the remote system and read back any logon banners. โณ
if an interactive password is needed to login, the time to supply the password is included as well โ so type fast! ๐โโ๏ธ๐จ
๐ฌ Character Echo Tests
The character echo test issues a single byte to the remote system, then waits for it to be echoed back. It checks that the returned character is correct, then notes the wallclock time elapsed for the round-trip. This is repeated with a different character until either the test time limit is expired or the character count limit is reached. ๐
Since only a subset of the printable ASCII character set is used, bytes == characters. one byte, one character, no math needed ๐งฎ
Minimum-Latency
Fastest (lowest) round-trip time for a character echo, in nanoseconds. the speedrun champion ๐ฅ
Median-Latency
The median round-trip time for a character echo. The median is not the same as the average; think of this as the "typical" latency. You probably want this number when you think average. ๐ yes bestie, this is the one you actually want
Average-Latency
The average (mean) round-trip time for a character echo, in nanoseconds. ๐
Average-Deviation
The standard deviation on the average latency. It quantifies how varied the latency is for each character's echo. A lower number indicates a tighter grouping of latencies, a higher number indicates more variation in the latencies. "One" standard deviation is the average plus or minus this amount. ๐ข lowkey the drama meter for your network
Maximum-Latency
The slowest (highest) round-trip time for a character echo, in nanoseconds. the one that made you go "girl what happened" ๐ญ
Echo-Count
The number of bytes echoed during the test. ๐ข
๐ Transfer Speed Test
The file transfer speed test measures the upload and download throughput rate, in bytes per second (Bps), using the scp subsystem. This is the subsystem typically used when copying files over ssh. ๐
For the upload test, a random 1MB file is copied to the target system ("uploads" it), measuring the time required for the transfer. The file is repeatedly copied to get transfer sizes greater than 1MB as given by --size. By default the target file is /tmp/sshping-PID.tmp but this can be changed with --remote. โฌ๏ธ
For the download test, the file just-uploaded is copied down repeatedly, 1MB at a time, as-if it were separate files to simulate downloading multiple files. The --size value again is used to determine the number of copies pulled. โฌ๏ธ (yes, "as-if". she's doing her best ๐
)
Upload-Size
Number of bytes uploaded during the test. ๐ค
Upload-Rate
Throughput speed for the upload transfer, in Bytes/second. ๐๏ธ
Download-Size
Number of bytes downloaded during the test. ๐ฅ
Download-Rate
Throughput speed for the download transfer, in Bytes/second. ๐ฌ
๐ EXAMPLES ๐
here's what it looks like when she eats and leaves no crumbs ๐ฅ
# bin/sshping -d cheyenne.example.com
ssh-Login-Time: 1,835,377,610 ns
Minimum-Latency: 548,993 ns
Median-Latency: 698,494 ns
Average-Latency: 704,123 ns
Average-Deviation: 72,839 ns
Maximum-Latency: 1,075,017 ns
Echo-Count: 1,000 B
Upload-Size: 8,000,000 B
Upload-Rate: 9,371,579 B/s
Download-Size: 8,000,000 B
Download-Rate: 5,493,034 B/s
like, look at those commas slaying thanks to -d ๐
๐ง AUTHOR ๐ง
Written by Uncle Spook. https://github.com/spook/sshping โ give the icon a follow, periodt ๐
๐ LICENSE ๐
Copyright (c) 2017-2019 by Uncle Spook
MIT License
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
aaand that's the page, bestie ๐ซถ this edition of the sshping manual is v0.1.4, dated 2018-03-13, so she's vintage and we love her for it. go measure some latency, you absolute icon ๐๐
๐ฆ where this page comes from
- opensuse-leap 16.0: sshping 0.1.4+git20230317-bp160.1.13 ยท MIT
- opensuse-leap 16.0: sshping 0.1.4+git20230317-bp160.1.13 ยท MIT
- opensuse-leap 16.0: sshping 0.1.4+git20230317-bp160.1.13 ยท MIT
- opensuse-leap 16.0: sshping 0.1.4+git20230317-bp160.1.13 ยท MIT
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms