Skip to content

Commit

Permalink
[login] Capture 'last -F' output
Browse files Browse the repository at this point in the history
Invoking the command `last` with the `-F` flag will give
all timestamps expanded so that they are human-readable

Related: RHEL-68128
Closes: #3847

Signed-off-by: Jose Castillo <[email protected]>
Signed-off-by: Pavel Moravec <[email protected]>
  • Loading branch information
jcastill authored and pmoravec committed Nov 20, 2024
1 parent 2f0b286 commit 4f1b3a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sos/report/plugins/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ class Login(Plugin, IndependentPlugin):
profiles = ('system', 'identity')

def setup(self):
self.add_cmd_output("last", root_symlink="last")
self.add_cmd_output("last -F", root_symlink="last")
self.add_cmd_output([
"last reboot",
"last shutdown",
"last -F reboot",
"last -F shutdown",
"lastlog",
"lastlog -u 0-999",
"lastlog -u 1000-60000",
Expand Down

0 comments on commit 4f1b3a9

Please sign in to comment.