Proc run timings

[problem]

You want to ascertain how long your script takes to run, displaying thousands of seconds and including CPU utilization.

[/problem]

[solution]

Just use the time command.

Really simple and an excellent way to see how long your scripts take. Plus showing the anticipated load on the system.

[/solution]

[example]

[marcus@bree marcus]$ time ps
PID TTY TIME CMD
27973 pts/0 00:00:00 bash
28120 pts/0 00:00:00 ps

real 0m0.025s
user 0m0.010s
sys 0m0.020s

[/example]

[reference]

[tags], Unix Coding School[/tags]

[/reference]

If you have found my website useful, please consider buying me a coffee below 😉

Leave a Reply

Your email address will not be published. Required fields are marked *