process-accounting

How can you get script name in BSD process accounting file?

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 li...

Is this time related process accounting stats gathering appropriate?

Based on sys/acct.h (V1, not V3) I need to gather some user usage statistics based on a parser that parser the acct file line by line. The parser will run and parse the entire file every N seconds and I need to gather user statistics accumulated since the last run (N seconds back). I'm not sure what will be the most appropriate way to do...