sockperf command not found

In this troubleshooting guide we learn how to fix sockperf command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

sockperf: command not found

or when using sudo you get the following error message

sudo: sockperf: command not found

Solutions to sockperf: command not found

How To Fix sockperf: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu sockperf is provided by sockperf package.

sockperf is:

sockperf is a network benchmarking utility over socket API that was designed for testing performance (latency and throughput) of high-performance systems (it is also good for testing performance of regular networking systems as well). It covers most of the socket API calls and options.

Specifically, in addition to the standard throughput tests, sockperf, does the following:

  • Measure latency of each discrete packet at sub-nanosecond resolution (using TSC register that counts CPU ticks with very low overhead).
  • Does the above for both ping-pong mode and for latency under load mode. This means that measuring latency of single packets even under load of millions Packets Per Second (without waiting for reply of packet before sending subsequent packet on time)
  • Enable spike analysis by providing histogram, with various percentiles of the packets’ latencies (for example: median, min, max, 99% percentile, and more), (this is in addition to average and standard deviation). Also, sockperf provides full log with all packet’s tx/rx times that can be further analyzed with external tools, such as MS-Excel or matplotlib - All this without affecting the benchmark itself.
  • Support MANY optional settings for good coverage of socket API and network configurations, while still keeping very low overhead in the fast path to allow cleanest results.

To fix this problem, we can install more using the command below.

sudo apt-get -y install sockperf

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install sockperf.

sudo apt -y install sockperf

Or if you have aptitude installed you can use the following command.

sudo aptitude install sockperf

Summary

In this tutorial we learn how to fix sockperf command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.