How to check amount of users logged in
Hey guys,
I work at a help desk and whenever I log onto one of our servers and wish to restart the server or software or something I need to make sure no one else is on. So right now I go around the office asking people to make sure, slow eh? ya. So is there a command I can run which will tell me if there is anyone currently logged on to the same server as me? and also is there a command I can do to broadcast a message to everyone logged on like "I'm restarting the software now." If anyone knows that would be great, thanks! :newbie: |
who shows you who is logged in
shutdown has options to restart the server in a certain amount of time and append a warning message. http://www.linuxvalley.it/encycloped...shutdown.8.php |
In addition to who(1) there's w(1); it's a bit shorter to type and gives more information. last(1) also comes to mind.
You can use write(1) to write a message to another person's terminal. Maybe you could write a script that takes the first column of who(1) and uses write(1) to broadcast a message? Lyle |
Thanks darthtux!
That helps alot :) |
and Thanks lyle thats sweet as well :P
|
All times are GMT -5. The time now is 11:53 AM. |