On Thu, Jun 20, 2002 at 12:40:57PM -0500, Michael D. Schleif wrote: > > We have a third party application that we are running under debian. It > is a complex application that uses many executables, some of which are > not always running, are called by the main executable periodically; but, > the periodicity is not constant nor predictable. > > One of these un-predictable processes is causing us problems. When it > comes to life, always a new pid, it tries to grab *all* of the cpu and > it may live for many minutes. > > We need to quantify our problem to the software developers; but, how can > we do this? > > top is running and we can empirically see the problem, when it occurs > and when we happen to be looking. > > How can we automate this profiling of this process?
How about replacing the executable with a script (and renaming the
original to ${original_name}.real). The script could contain something
along the lines of:
#!/bin/sh
( echo $0 is about to start
for a in "$@"
do
echo -- Parameter: \""$a"\"
done
echo Get Pizza.
) | mail -s "System Gale Warning" [EMAIL PROTECTED]
sleep 600
exec $0.real "$@"
At least this way you will get a "heads-up", so you are prepared before
it suddenly hits you.
Depending on your application, this may provide enough information
(=command line parameters) for you to reproduce the problem at will.
PS: Don't forget to rename things back afterwards :-)
HTH
--
Karl E. Jørgensen
[EMAIL PROTECTED]
www.karl.jorgensen.com
Please read http://www.pantsfullofunix.net before reporting bugs in my code.
It won't help you, but it will make me feel better.
pgpeQV3D1m7vk.pgp
Description: PGP signature

