Also only some small hints (and also still in TODO):
Command | Explanation | Distro |
---|---|---|
yum list postgresql | Show available packages (all) | RedHat, CentOS |
yum search plproxy | search for available packages | RedHat, CentOS |
rpm -qa|grep postgresql | Shows which postgresql packages are installed. | RedHat, CentOS |
yum list installed|grep postgres | Simillar result using yum | RedHat, CentOS |
apt-cache search | show available packages | Ubuntu |
dpkg --get-selections | grep postgresql | Installed packages of PostgreSQL on Ubuntu | Ubuntu |
chkconfig --list|grep postgres|cut -d' ' -f1 | shows name of postgresql service | RedHat, CentOS 5 |
chkconfig|grep postgres|cut -d' ' -f1 | shows name of postgresql service | RedHat, CentOS - 6/7 |
On ubuntu PostgreSQL usually runs as service "postgresql" without number of the version. | Ubuntu | |
sudo apt-get --purge remove postgresql | Clean your machine from postgresql | Ubuntu |
sudo apt-get --purge remove snap snapd | Clean postgresql if it was installed using snap | Ubuntu |
service $( chkconfig|grep postgres|cut -d' ' -f1) status | find the name of postgresql service and shows its status - do not be surprised if you see message about "postmaster" with port number | RedHat, CentOS |
service postgresql-9.3 restart | As root - restarts postgres server running as service - if you know directly the name of the service | all |
service $( chkconfig|grep postgres|cut -d' ' -f1) status | As root - finds the name of postgresql service an restarts it. This work directly only on RedHat, CentOS | RedHat, CentOS |
vmstat 1 10 | shows 10 lines immediate statistics of cpu, mem, swap, buffer etc | all |
cat /proc/swaps | shows infos about swaps on machine | all |
cat /proc/meminfo | shows full memory info | all |
free -m | shows immediate memory and swap statistics | all |
cat /etc/*release | shows you Distro and Version and sometimes more info about Linux you are working on | all |
uname -a | Shows Linux kernel info | all |
ulimit -a | shows per-user process limits in linux | all |
lshw | Info about all hardware - sometimes very long list so you would want to limit it. | all |
lshw -class storage | Shows info about all disks / disk arrays | all |
iostat | Shows immediate statistics of reads / writes for all disks. May not be installed but is available for all distros. | all |
htop | Very useful shows in dynamic screen usage of CPUs, memory, swap and top processes. May not be installed but it is available. | all |