[sclug] Performance tuning

Matt matt at bodgit-n-scarper.com
Thu Nov 17 10:11:46 UTC 2005


* David Kerrawn (sclug) <sclug at kerrawn.co.uk> [2005-11-17 04:10:03]:
> > 
> > Tuning is a problem because I cannot find a way of summing the time
> > spent executing various scripts or programs.
> > 
> > What I really need is a bash option that will sum the total time
> > taken by all the scripts and programs that are executed by it and
> > its child processes (and print these value out when the top level
> > shell terminates).
> > 
> > Short of editing the source of bash I cannot think of any way of
> > obtaining the information I am after.  Does anybody have any ideas?
> > An accuracy of +/-10% would be good enough.
> 
> I've knocked something up using LD_PRELOAD to overload the standard
> execve and waitpid functions. It outputs a timestamp, pid and filename
> and can send this to a file specified by an environment variable
> (PROFILE) or stdout if PROFILE is not set. You won't have to change
> any script code. Once you have the raw times you should be able to
> knock up some code to get the times you require.
> 

Can't you do a similar thing with the BSD process accounting?

Matt
-- 
"I don't care who's it is, it's floating!"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://lists.tmdg.co.uk/pipermail/sclug/attachments/20051117/d7edf78b/attachment.bin


More information about the Sclug mailing list