Sponsored Content
Top Forums Shell Programming and Scripting to find the number of users logged in Post 302119452 by shanshine on Wednesday 30th of May 2007 03:15:55 AM
Old 05-30-2007
Quote:
Originally Posted by ennstate
Hope this helps

Code:
 who | awk ' { print $1 }' | sort -ud

Thanks.
Nagarajan G
but it shows
+ who
+ awk '{ print $1 }'
+ sort -ud
these lines also.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how many users logged

in unix what is the syntax to find out how many users are currently logged in (4 Replies)
Discussion started by: trichyselva
4 Replies

2. Post Here to Contact Site Administrators and Moderators

logged out users

how to find out users who logged out within 5 minutes (1 Reply)
Discussion started by: roshni
1 Replies

3. Shell Programming and Scripting

Users Not Logged in

I have searched the forums but have not mangaed to quite find what im looking for. I have used to /etc/passwd command to present me a list of all users the who command to present all users currently logged on, but what i want to know is what command can i use to display users that are registered... (12 Replies)
Discussion started by: warlock129
12 Replies

4. Shell Programming and Scripting

number of users logged in script

My admin needs a shell script in Korn that will show conditions based on users logged in. I have never used the Korn shell and have no clue what I am doing, can anyone help. here are the conditions that need to be returned. if users are below 5 displays should be: performance is high if... (1 Reply)
Discussion started by: vthokiefan
1 Replies

5. Shell Programming and Scripting

Sorting the users logged in according to the number of processes

Is it possible to get a list of users sorted by the number of processes executed by each. I have a HP - UX server with 2800 processes running currently. And I want to know the number of processes owned by each person logged in to that server.something like below: user1 : 150 Processes user2 :... (2 Replies)
Discussion started by: engineer
2 Replies

6. Shell Programming and Scripting

find top 4 users currently logged on can i use grep

For the first 4 users only that are currently logged in output their effective user id. It's not important the order in which each logged in i just want to have the top 4. Same question as here...... (0 Replies)
Discussion started by: whyatepies
0 Replies

7. UNIX for Dummies Questions & Answers

how to find top 3 users currently logged on

For the first 3 users only that are currently logged in output their effective user id. thank you. (6 Replies)
Discussion started by: whyatepies
6 Replies

8. Shell Programming and Scripting

Total number of users logged in a server from uptime

how to find out total number of users logged in a server from uptime . i mean to say i need the total output of unix command . who gives the out put at a particular time . I need at all time from which machine who has connected , (3 Replies)
Discussion started by: amiya.te@gmail
3 Replies

9. Shell Programming and Scripting

Script to find users not logged in for 90 days

Dear All, I need your help in finding out users not logged in to linux system for more than 90 days. I found a script from our forum i am getting error while using that. from the code i have debugged line by line to see where i am getting the problem. i found out the below line i am getting... (5 Replies)
Discussion started by: Sachinlinux
5 Replies

10. UNIX for Advanced & Expert Users

[Tip] How to display the number of logged-in users

In a professional environment with traditional application you often want (or are asked) to report the users. Traditionally there is the who command who | awk '{print $1}'telnetd or sshd register the users in the utmp file, to be shown with who, w, users, finger, pinky, ... In addition they... (1 Reply)
Discussion started by: MadeInGermany
1 Replies
RUSERS(1)						    BSD General Commands Manual 						 RUSERS(1)

NAME
rusers -- who is logged in to machines on local network SYNOPSIS
rusers [-al] [host ...] DESCRIPTION
The rusers command produces output similar to who, but for the list of hosts or all machines on the local network. For each host responding to the rusers query, the hostname with the names of the users currently logged on is printed on each line. The rusers command will wait for one minute to catch late responders. The following options are available: -a Print all machines responding even if no one is currently logged in. -l Print a long format listing. This includes the user name, host name, tty that the user is logged in to, the date and time the user logged in, the amount of time since the user typed on the keyboard, and the remote host they logged in from (if applicable). DIAGNOSTICS
rusers: RPC: Program not registered The rpc.rusersd(8) daemon has not been started on the remote host. rusers: RPC: Timed out A communication error occurred. Either the network is excessively congested, or the rpc.rusersd(8) daemon has terminated on the remote host. rusers: RPC: Port mapper failure - RPC: Timed out The remote host is not running the portmapper (see portmap(8) ), and cannot accomodate any RPC-based services. The host may be down. SEE ALSO
rwho(1) users(1), who(1), portmap(8), rpc.rusersd(8) HISTORY
The rusers command appeared in SunOS. BUGS
The sorting options are not implemented. Linux NetKit (0.17) August 15, 1999 Linux NetKit (0.17)
All times are GMT -4. The time now is 04:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy