LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 08-20-2003, 07:19 PM   #1
CurtisKaj
LQ Newbie
 
Registered: Aug 2003
Posts: 3

Rep: Reputation: 0
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!

 
Old 08-20-2003, 07:43 PM   #2
darthtux
Senior Member
 
Registered: Dec 2001
Location: 35.7480 N, 95.3690 W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070

Rep: Reputation: 45
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
 
Old 08-20-2003, 08:19 PM   #3
lyle_s
Member
 
Registered: Jul 2003
Distribution: Slackware
Posts: 388

Rep: Reputation: 52
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

Last edited by lyle_s; 08-20-2003 at 08:25 PM.
 
Old 08-20-2003, 08:41 PM   #4
CurtisKaj
LQ Newbie
 
Registered: Aug 2003
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks darthtux!

That helps alot
 
Old 08-20-2003, 09:46 PM   #5
CurtisKaj
LQ Newbie
 
Registered: Aug 2003
Posts: 3

Original Poster
Rep: Reputation: 0
and Thanks lyle thats sweet as well :P
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
check amount of memory naijaguy Linux - General 4 10-15-2008 02:11 PM
Make most amount of Linux users in least amount of time studpenguin General 24 02-02-2007 03:42 PM
Control amount of time a user may be logged in. (Parental Control) darrensnospam Mandriva 13 02-18-2006 05:01 PM
What do you think about linux' users amount: increasing or not? Nad0xFF General 2 04-17-2005 09:52 PM
why so many logged in users? alagenchev Linux - Security 2 03-24-2005 06:19 PM


All times are GMT -5. The time now is 01:19 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration