Finding users logged on time and space useage


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Finding users logged on time and space useage
# 1  
Old 04-06-2009
Finding users logged on time and space useage

I need to find what users are currently logged onto the system that is easy just a simple who | awk '{ print $1 }' (thats all I need for the part), but I also need to find how long they have been logged on and the total amount of file space they are using.

Thanks in advance, I have been looking in my book/web for answers to the second parts and couldn't find any. Either that or I just overlooked it.
# 2  
Old 04-06-2009
Take a look at the "last" command. It will report who is logged in, if they're currently logged on, and will report the total time they were logged in.
As for diskuse, if your users are restricted to keeping their files in their $HOME, it's easy to run a du /home/login_name to find their disk usage. If you're using disk quota's, its even easier. Otherwise you'll need to run "find" and look for all files owned by user and sum up their total usage.
# 3  
Old 04-06-2009
Thanks a bunch. If I have any other questions I will be sure to ask.
# 4  
Old 04-07-2009
To get the login time from "who". It also gives idle time but you would need to do some shell arithmetic to work out how long they have been logged in.
who -u
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Homework & Coursework Questions

Sort current logged in users by log in time (supposedly to be very easy but I'm missing something)

1. The problem statement, all variables and given/known data: Show all users who are currently logged in, sorted from earliest to latest log in time. The log in time includes the month, day, and time. 2. Relevant commands, code, scripts, algorithms: finger, who, sort, pipe, head, tail, ... (8 Replies)
Discussion started by: vtmd
8 Replies

2. Shell Programming and Scripting

Finding out users logged in between 10:00AM and 11:00AM

Hi All, I have a specific requirement wherein I want a list of users who have logged in between 10:00 AM and 11:30 AM. Thanks, vini (4 Replies)
Discussion started by: vini kumar
4 Replies

3. Red Hat

Current logged in users

I have 2 systems. (1) RHEL5 and (2) winXP pro from xpPRO putty i ssh into rhel5 : user root from xpPRO i ftp into rhel5 : user abc123 when i run #uptime it only shows 1 user when i do #ps -u abc123 : it shows vsftpd deamon PID is there a command that can be used to show all currently... (4 Replies)
Discussion started by: dplinux
4 Replies

4. UNIX for Dummies Questions & Answers

How many users are logged in?

How do I find this out? I have a feeling its a simple command such as who, but I just don't know what it is. I've had a search on here but either I can't put it into the right search criteria or there isn't a topic on it. Thanks. EDIT: Delete this thread, as I posted it I noticed the... (0 Replies)
Discussion started by: chris_rabz
0 Replies

5. 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

6. UNIX for Dummies Questions & Answers

How to do a login time and date list of users never logged on?

Hello, I'm trying to do a list of user that never connected to a couple of servers. I want to do a diff between the servers lists, and print out only the users that never has logged on each server. Here my first step : SERVER01: # finger `egrep -v -e "^\s*#" /etc/passwd | awk '{ print $1 }' |... (4 Replies)
Discussion started by: gogol_bordello
4 Replies

7. Linux

Swap space useage 100%

How can i check that which process and path of particular file is using highst Swap space ? (2 Replies)
Discussion started by: bryanabhay
2 Replies

8. 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

9. 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

10. UNIX for Dummies Questions & Answers

Finding last time users logged in

I would like to find out the last time all users have logged in or out. I tried the last command, but it could not find the wtmp file in /var/adm (I searched in othe directories also). This is an AIX rs6000 4.2.1 system. We are moving our applications from this system to an AIX 5.2 system and I... (11 Replies)
Discussion started by: jyoung
11 Replies
Login or Register to Ask a Question