1753974 Members
7431 Online
108811 Solutions
New Discussion юеВ

accounting on HP-UX 11.0

 
SOLVED
Go to solution
Manju Kampli
Trusted Contributor

accounting on HP-UX 11.0

Dear friends,

I am looking at setting up accounting to monitor the system usage by the users on the system. Can some guide me how to start, and how to configure and other stuff I should know before doing this.

Thanks in advance
Manju
Never stop "LEARNING"
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor

Re: accounting on HP-UX 11.0

Hi Manju:

I'm not sure exactly what you are interested in tracking. Go to http://docs.hp.com/ and choose "Search this Site". Use the keyword 'accounting'. You will find lots of references to man pages (discrete commands).

...JRF...
Manju Kampli
Trusted Contributor

Re: accounting on HP-UX 11.0

James,

I am looking at monitoring user CPU utilisation and if possible Disk I/O as well.

hope you can provide some info based on the above.

Thanks once again
Manju
Never stop "LEARNING"
James R. Ferguson
Acclaimed Contributor
Solution

Re: accounting on HP-UX 11.0

Hi Manju:

Document #KBRC00002184 provides a good guide:

*** Procedure to start process accounting.

1) Add these lines to your crontab.
#
# Process accounting
#
0 1,6,12,18 * * * /usr/sbin/acct/ckpacct 1000
01 01 1 * * /usr/sbin/acct/monacct
59 03 * * * /usr/sbin/acct/runacct 2>/var/adm/acct/nite/runacct.log

2) Modify /etc/rc.config.d/acct so that process account will start when the system is rebooted:

START_ACCT=1

3) Then turn on process accounting using the command.

# /usr/lib/acct/accton /var/adm/pacct

*** How to stop Process accounting

1) Remove ckpacct/monacct/runacct entries from crontab.

2) Change the line in /etc/rc.config.d/acct to this:

START_ACCT=0

3) This will turn off the kernel process accounting. (pacct should now stop growing)

# /usr/lib/acct/accton

*** Some important files for process accounting:

/var/adm/acct/nite -- Daily summary files created by runacct are kept here.

/var/adm/acct/sum -- Cumulative summary files updated by runacct are kept here.

/var/adm/acct/fiscal -- Periodic (monthly) summary files created by monacct are stored here.

/var/adm/pacct## -- The process accounting daily log file.

/var/adm/acct/nite/statefile -- State that last runacct completed.

/var/adm/acct/nite/active -- Log file of runacct.

/var/adm/acct/nite/lastdate -- Log of when the last date runacct was run.

/var/adm/acct/nite/daycms -- Process usage report.

*** How to restart runacct if it fails

- If the /var/adm/acct/nite/statefile doesn't show "COMPLETE", then runacct failed.

- You may get some details why it failed from the /var/adm/acct/nite/active file.

- Look at the /var/adm/acct/nite/statefile and take note of the last sucessfull state.

- Restart runacct specifying the date and the last state from the statefile. (See man page for runacct for more details)

example:

# /usr/sbin/acct/runacct 0601 MERGE

Regards!

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: accounting on HP-UX 11.0

Hi again:

For disk accounting, take a look at the man pages for 'diskusg (1M)' and 'vxdiskusg (1M)'.

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: accounting on HP-UX 11.0

Hi Manju:

Here's a very good white paper: document #OALWP06950320.

...JRF...