I want to measure the time it takes to backup a PostgresSql database, I know I can do time pg_dump ....
, but what if I already launched the pg_dump command?.
The process already took more than half an hour, and I don't want to break it right know. I'm pretty sure it will take one more hour (and I'll be at home at that time). I would like to know tomorrow how much time it took.
You are writing this to file, do you? File modification time would be your answer.
Just show start time
Or timestamp
Or secs elapsed
find the pid of your process, say it 999
run this:
in a shell. the above will quit when your process is done.
you can sleep more if granularity you want is bigger.