pgstat command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
pgstat: command not found
or when using sudo you get the following error message
sudo: pgstat: command not found
Solutions to pgstat: command not found
How To Fix pgstat: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu pgstat is provided by pgstat package.
pgstat is:
pgstat is a client utility to gather statistical information from a PostgreSQL instance in real time, and acts like vmstat or sar.
Supported statistics include archiver, bgwriter, connections, databases, tables, tables I/O, indexes, functions, archives wals, temporary files, and pgBouncer.
To fix this problem, we can install more using the command below.
sudo apt-get -y install pgstat
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install pgstat.
sudo apt -y install pgstat
Or if you have aptitude installed you can use the following command.
sudo aptitude install pgstat
Summary
In this tutorial we learn how to fix pgstat command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.