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