Can you use Proc::ProcessTable
to get extended ps like data to find what you need?
I personally like to use unbuffered logs that log enough
data to make it easy to track and watch things. That way
I also have a historical reference I can look back on to
investigate problems. The framework I'm using now (self
built) has standard logging and statistics for each process
that you mostly just get by using the packages of the
framework. We have verbose and debug levels
that can be used to control the level and type of output.
Those can be set either globally or at the package level.
There are command line options that are tied to those
settings.