Last Updated: February 25, 2016
·
500
· mriddle

Monitoring command output

Running a background job at work and wanted to monitor this status.
A colleague pointed me towards a nifty tool called watch

The following will repeat the command every 2 seconds by default and display the output:

watch "echo 'select message from execution_log_entries order by created_at desc limit 50' | psql -d atlas2_train"

-Matt

1 Response
Add your response

You can make it more awesome!

psql has the –c 'your sql' so you can cut out the 'echo |' as well - @LukeR

watch has the -d switch to highlight changes with each screen refresh. - @dhodges

over 1 year ago ·