logontime(8)

โœจ NAME โœจ

logontime โ€” the lil tool that shows you how much cumulative logon time each person has racked up, straight out of wtmp ๐Ÿ’– (it's in the hxtools family, section 8, so yes bestie we're in sysadmin territory ๐Ÿ‘‘)


๐ŸŒธ SYNTAX ๐ŸŒธ

logontime [-t]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

okay so here's the tea โ˜• โ€” logontime goes and peeks at the output of last -ax (which means it depends on /var/log/wtmp being there and being readable, no cap), and then it does the math and calculates the cumulative logon time for each user ๐Ÿงฎโœจ

so like. every time someone logged in, every time they logged out, all of it gets added up into one big number per person. it's giving "who has been living on this machine" energy ๐Ÿ’€

by default it hands you the users sorted alphabetically, because it's polite like that ๐ŸŽ€


๐Ÿ’… OPTIONS ๐Ÿ’…

  • -t โ€” sort by logon time instead of alphabetically. so the biggest time-havers go first ๐Ÿ”ฅ the way that this is literally the only flagโ€ฆ iconic, honestly.

๐ŸŒˆ SEE ALSO ๐ŸŒˆ

  • hxtools(7) โ€” the whole hxtools friend group, go say hi ๐Ÿซถ

quick reminder bestie: this thing reads /var/log/wtmp, so if that file's not there or you can't read it, it's not gonna have a good time ๐Ÿ˜ญ

mwah ๐Ÿ’‹ this one's from the hxtools collection, dated 2008-02-06 โ€” yeah she's an older queen but she still slays, periodt ๐Ÿ’–โœจ๐ŸŽ€

๐Ÿ“ฆ where this page comes from