How To Install psacct on Fedora 34
Introduction
In this tutorial we learn how to install psacct
on Fedora 34.
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 Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install psacct.
Install psacct on Fedora 34 Using dnf
Update yum database with dnf
using the following command.
sudo dnf makecache --refresh
The output should look something like this:
Fedora 34 - x86_64 20 kB/s | 6.6 kB 00:00
Fedora 34 openh264 (From Cisco) - x86_64 1.4 kB/s | 989 B 00:00
Fedora Modular 34 - x86_64 68 kB/s | 6.5 kB 00:00
Fedora 34 - x86_64 - Updates 3.5 kB/s | 6.2 kB 00:01
Fedora Modular 34 - x86_64 - Updates 17 kB/s | 5.9 kB 00:00
Metadata cache created.
After updating yum database, We can install psacct
using dnf
by running the following command:
sudo dnf -y install psacct
Install psacct on Fedora 34 Using yum
Update yum database with yum
using the following command.
sudo yum makecache --refresh
The output should look something like this:
Fedora 34 - x86_64 20 kB/s | 6.6 kB 00:00
Fedora 34 openh264 (From Cisco) - x86_64 1.4 kB/s | 989 B 00:00
Fedora Modular 34 - x86_64 68 kB/s | 6.5 kB 00:00
Fedora 34 - x86_64 - Updates 3.5 kB/s | 6.2 kB 00:01
Fedora Modular 34 - x86_64 - Updates 17 kB/s | 5.9 kB 00:00
Metadata cache created.
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 Fedora 34
To uninstall only the psacct
package we can use the following command:
sudo dnf remove psacct
psacct Package Contents on Fedora 34
/etc/logrotate.d/psacct
/usr/bin/ac
/usr/bin/lastcomm
/usr/lib/.build-id
/usr/lib/.build-id/17
/usr/lib/.build-id/17/bee69e17121a3421f143aefb81af61ff1b2e4c
/usr/lib/.build-id/66
/usr/lib/.build-id/66/5d4d10726972b2c4acf2423ec837207ca96cf7
/usr/lib/.build-id/7f
/usr/lib/.build-id/7f/87ae4ee89a0ae7d6ac14ed2e81f04435db94a7
/usr/lib/.build-id/87
/usr/lib/.build-id/87/aad9cd85f2c451fb2ad3562d5a0679f6c99ab6
/usr/lib/.build-id/c7
/usr/lib/.build-id/c7/42e4ba359901320938dc864c3cb988160a822b
/usr/lib/.build-id/c9
/usr/lib/.build-id/c9/273ba3848ad90ced827afebf2532b7d1add063
/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/README
/usr/share/info/accounting.info.gz
/usr/share/licenses/psacct
/usr/share/licenses/psacct/COPYING
/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 Fedora 34 using yum and dnf.