pg_log directory within the data directory. Use the command to locate the most recent logs:tail -n 100 /path/to/your/pg_log/logfile.log
top, htop, df -h, and free -m can be used to quickly assess system health.pg_stat_activity and pg_stat_database views:SELECT * FROM pg_stat_activity;
SELECT * FROM pg_stat_database;
SELECT * FROM pg_locks pl
JOIN pg_stat_activity psa ON pl.pid = psa.pid
WHERE NOT granted;
SELECT * FROM pg_stat_user_tables WHERE last_autovacuum > current_date - INTERVAL '1 day';
iostat or vmstat to investigate disk read/write speeds and see if there's any abnormal activity.free -m and vmstat to check memory usage and swap activity.ping, traceroute, or mtr can help diagnose network problems.(Perfect for DevOps & SREs)
(Perfect for DevOps & SREs)



