How To Install psacct on Rocky Linux 8
Introduction
In this tutorial we learn how to install psacct
on Rocky Linux 8.
What is psacct
The psacct package contains several utilities for monitoring process activities, including ac, lastcomm, accton and sa. The ac command displays statistics about how long users have been logged on. The lastcomm command displays information about previous executed commands. The accton command turns process accounting on or off. The sa command summarizes information about previously executed commands.
We can use yum
or dnf
to install psacct
on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install psacct.
Install psacct on Rocky Linux 8 Using dnf
Update yum database with dnf
using the following command.
sudo dnf makecache --refresh
After updating yum database, We can install psacct
using dnf
by running the following command:
sudo dnf -y install psacct
Install psacct on Rocky Linux 8 Using yum
Update yum database with yum
using the following command.
sudo yum makecache --refresh
After updating yum database, We can install psacct
using yum
by running the following command:
sudo yum -y install psacct
How To Uninstall psacct on Rocky Linux 8
To uninstall only the psacct
package we can use the following command:
sudo dnf remove psacct
psacct Package Contents on Rocky Linux 8
/etc/logrotate.d/psacct
/usr/bin/ac
/usr/bin/lastcomm
/usr/lib/.build-id
/usr/lib/.build-id/05
/usr/lib/.build-id/05/e8a018a8131f993119d9beb23c6a8a4a0d46c4
/usr/lib/.build-id/2d
/usr/lib/.build-id/2d/04972e295e5055fb84cc5a8f80e09c0eccd95b
/usr/lib/.build-id/54
/usr/lib/.build-id/54/5a5aed5dcb6b08df443eb01af985e74bffd801
/usr/lib/.build-id/62
/usr/lib/.build-id/62/554a1673a5b2b4f5d6f36ea1520f483f209f21
/usr/lib/.build-id/63
/usr/lib/.build-id/63/839f28227b778da97c4963291936d93239add0
/usr/lib/.build-id/ac
/usr/lib/.build-id/ac/927e00d35936471686d22697e5eeb6cea5a7ac
/usr/lib/systemd/system/psacct.service
/usr/libexec/psacct/accton-create
/usr/sbin/accton
/usr/sbin/dump-acct
/usr/sbin/dump-utmp
/usr/sbin/sa
/usr/share/doc/psacct
/usr/share/doc/psacct/COPYING
/usr/share/doc/psacct/README
/usr/share/info/accounting.info.gz
/usr/share/man/man1/ac.1.gz
/usr/share/man/man1/lastcomm.1.gz
/usr/share/man/man8/accton.8.gz
/usr/share/man/man8/dump-acct.8.gz
/usr/share/man/man8/dump-utmp.8.gz
/usr/share/man/man8/sa.8.gz
/var/account
/var/account/pacct
References
Summary
In this tutorial we learn how to install psacct
on Rocky Linux 8 using yum and dnf.