August 31, 2008

Tiny script for real time pg_log tracking

If your pg-logs are writing to /path/to/pg_log/dir/ and you want to track ERRORs in real time try this tiny shell script

cd /path/to/pg_log/dir/;
while true; do
cat `ls | tail -n 2` | grep ERROR | tail -n 100;
sleep 30;

No comments:

Post a Comment