Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
documentation.suse.com / Connection accounting utilities

Connection accounting utilities

Publication Date: 21 Mar 2024

1 Environment

This document applies to the following products and product versions:

  • SUSE Linux Enterprise Server 15 SP5, 15 SP4, 15 SP3, 15 SP2, 12 SP5

  • SUSE Linux Enterprise Server for SAP Applications 15 SP5, 15 SP4, 15 SP3, 15 SP2, 12 SP5

  • SUSE Linux Enterprise High Availability 15 SP5, 15 SP4, 15 SP3, 15 SP2, 12 SP5

  • SUSE Linux Enterprise High Performance Computing 15 SP5, 15 SP4, 15 SP3, 15 SP2

  • SUSE Linux Enterprise Desktop 15 SP5

  • SUSE Linux Enterprise Real Time 15 SP5

2 Connection accounting commands

The GNU accounting utilities provide useful information about system usage, such as user logins and logouts, programs executed, and system resources used.

who

Lists currently logged in users.

w

Shows who is logged in and what they are doing.

last

Shows a list of the most recent logged-in users, including login time, logout time, and their IP addresses.

lastb

Same as last, except that it shows the contents of /var/log/btmp, which contains all the bad login attempts.

lastlog

Reports data maintained in /var/log/lastlog, which is a record of the last time a user logged in.

ac

Available after installing the acct package. Prints the connect time in hours on a per-user basis. This command reads /var/log/wtmp.

dump-utp

Converts raw data from /var/run/utmp or /var/log/wtmp into ASCII-parseable format.

You can also check the /var/log/messages file, or the output of journalctl.