1847300 Members
2778 Online
110264 Solutions
New Discussion

HP-UX accounting

 
Wendy_9
Frequent Advisor

HP-UX accounting

Hi all,

I have encountered a problem for the files under the accounting used directory.

I have made a slightly modification (add a line: cp -p ${_wtmp} ${_sum}/wtmp.${_date}) to /usr/lib/acct/runacct. The file is abled to copy to the /var/adm/acct/sum. But, I have discovered that after restart the system (Halt the system and then power it on), all the files whose name start with wtmp.xxxx under /var/adm/acct/sum have disappeared.

I don't know why?? Is it due to the script of accounting or any other reason?

Hope someone can help me for it

Thanks

Regards,
Wendy
2 REPLIES 2
Steve Steel
Honored Contributor

Re: HP-UX accounting

Hi

Accounting is Turned On when HP-UX enters multi-user mode, the system startup, starts accounting with the following functions:

* acctwtmp :add an initial record to /var/adm/wtmp.


* turnacct on:executes accton with the filename argument /var/adm/pacct

* Removes files left in /var/adm/acct/sum
by runacct.


Seems it clears all out and thus kills your data

from /etc/rc.log
Start accounting
Output from "/sbin/rc2.d/S700acct start":
Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Wendy_9
Frequent Advisor

Re: HP-UX accounting

Hi,

I have execute runacct once a day. Why the files only delete at system restart instead of everyday? Also, I cannot find any line inside runacct to delete the files under /var/adm/acct/sum

Regards,
Wendy