Showing results for 
Search instead for 
Did you mean: 

about lastcomm!

Go to solution
Regular Advisor

about lastcomm!

my os is 4.0D
when i execute the lastcomm command
the following message is produced:
# lastcomm
/var/adm/pacct: No such file or directory
the i use the command vi /var/adm/pacct to create the file /var/adm/pacct
the i execute the #lastcomm again
the following message is produced:
lastcomm: insufficient memory to read /var/adm/pacct
what should i do to make lastcomm work correctly?
Ralf Puchner
Honored Contributor

Re: about lastcomm!

use ckpacct to verify pacct, be sure you have configures the machine for accounting.
Help() { FirstReadManual(urgently); Go_to_it;; }
Cortes Albertino
Trusted Contributor

Re: about lastcomm!


You should probably check the files :

12.2.2 Creating qacct and pacct Files
You must create the /var/adm/qacct queueing accounting file and the /var/adm/pacct process accounting database file. Use the nulladm command to create the files.

#nulladm /var/adm/pacct
#nulladm /var/adm/qacct

Be aware of file protections for these two files.

Should be :
You must ensure that the /var/adm/pacct file, is owned by group adm and user adm and has 664 protection. If it does not have the correct ownership, the accton command will not work, and the following message will be displayed:

To enable accounting, you must add the following line to the /etc/rc.config file:


You can use the rcmgr command to set the variable, as follows:

# rcmgr set ACCOUNTING YES

You can start accounting without rebooting your system by using the startup command. Refer to Section 12.3 for more information.


Hope it helps,

Albertino Cortes.