0

Is it possible to see logged-in users in iTop, for example to know if one can do an upgrade without blocking anyone?

There are no menu anywhere, I didn't find anything online.

lolesque
  • 103
  • 6

1 Answers1

0

With access to the server, a line you can put as a function (e.g. itoplastlog) in your bashrc:

$ awk '{ split($4,a,":"); print substr(a[1],2) ":" a[2] ":" substr(a[3],0,1) " " $3 }' /var/log/httpd/access.log | uniq | tail
15/Jun/2022:16:5 Alice
15/Jun/2022:16:5 Bob
15/Jun/2022:17:1 Eve

Here /var/log/httpd/access.log is the HTTP server log
$3 is the user login (space-separated)
It only shows the tens digit of the minutes

Save also the second version, more precise (whole minutes) and more noisy:

$ awk '{ split($4,a,":"); print substr(a[1],2) ":" a[2] ":" a[3] " " $3 }' /var/log/httpd/access.log | uniq | tail
15/Jun/2022:16:50 Alice
15/Jun/2022:16:54 Bob
15/Jun/2022:16:55 Bob
15/Jun/2022:16:56 Bob
15/Jun/2022:16:57 Bob
15/Jun/2022:17:10 Eve
15/Jun/2022:17:11 Eve
15/Jun/2022:17:12 Eve
lolesque
  • 103
  • 6