Proc run timings

Problem

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



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.



Example


[[email protected] 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



Reference

[tags], Unix Coding School[/tags]



Previous Post

Leave a Reply

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