how to check if postgres is running code example Example: check whether postgres is running or not pgrep -u postgres -fa -- -D