Jump to content

Connection accounting utilities

Publication Date: 11/25/2021

1 Environment

  • File Name: reference-connection-accounting-utilities.xml
  • ID: environment-connection-accounting-utilities

This document applies to the following products and product versions:

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

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

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

  • SUSE Linux Enterprise High Performance Computing 15 SP3, 15 SP2, 15 SP1, 15 GA

  • SUSE Linux Enterprise Desktop 15 SP3, 15 SP2, 15 SP1, 15 GA, 12 SP5, 12 SP4, 12 SP3

  • SUSE Linux Enterprise Real Time 15 SP3, 15 SP2, 15 SP1, 15 GA, 12 SP5, 12 SP4, 12 SP3

2 Connection accounting commands

  • File Name: reference-connection-accounting-utilities.xml
  • ID: connection-accounting-utilities

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.

Print this page