I'm trying to collect some stats on how much time is spent 'waiting' for certain fairly short running tasks so I can justify purchase of some automated tools. I've written bash function wrappers around a few common tasks I do using the GNU time utility along the lines of this:
function something() {
/usr/bin/time -o ~/wastedtime.log -a $path_to_original "$@"
}
I would now like to extend this a little further to a few more scripts & if possible catch the timings for other users on the same machine. I'm using a bash to syslog patch already.
What utilities exist to automatically record the execution times of commands & their arguments?
Sounds like you want the GNU Accounting Utilities, specifically the "sa" command.