I'm trying to write a program to process the BSD-style process accounting file under Linux (/var/account/pacct).
When we start a script with either ./script_name
or bash script_name
, the process accounting record actually gets written out the the command bash
. Presumably because that's the actual program doing the running.
What we'd like to see is the command script_name
. Does anyone know of a way to get the script name written to the accounting file rather than the bash executable?