Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm trying to track the amount of time the process takes for when I move around my data and upgrade my web app. From the command line, how would I track the amount of time elapsed from when the pg_restore command starts to when it finishes?

share|improve this question
    
See also: unix.stackexchange.com/questions/16615/… . –  landroni Mar 6 at 16:11

1 Answer 1

The same way you'd time any other shell command: use the time command.

$ time pg_restore ...
real    1m0.000s
user    1m0.000s
sys     0m0.000s

Here, real is the elapsed wall clock time, which is probably the only meaningful value, since most of the work is being done in a separate process (the PostgreSQL server).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.