Installing Powershell on RHEL

free -g

Check free memory on server

ps aux --sort -%mem | head -10

Top processes by memory utilisation

cat /proc/meminfo|grep -i swap

Swap Usage

grep -i memtotal /proc/meminfo

How to check how much memory is on a Linux Server:

vmstat 1 10

System stats every second for 10 seconds, si (swapin), so(swapout)

sar -W

Swap/Paging for 24 hours period


How to check CPU information on a Linux Server:

mkdir ASE_Suite
tar -xvf ASE_Suite.linuxamd64.tar --directory ASE_Suite

untar into a specific directory example

lsof -i -P -n | grep LISTEN

Check if a port is in use

cp /etc/sudoers /etc/sudoers.bak

vi /etc/sudoers
postgres ALL=(ALL)      ALL

Add above to giver postgress user permission to run sudo commands