Sponsored Content
Top Forums Shell Programming and Scripting How to display what processes, users have opened at a given time Post 302367342 by gabibyte on Monday 2nd of November 2009 09:47:42 AM
Old 11-02-2009
How to display what processes, users have opened at a given time

Hello,

What i have to do is make a top 10 list of users sorted by the number of processes opened at a given time. Can anyone help me with finding out for a given moment, for all users how many processes each had opened?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Users and processes

Hi All, I am trying to write a script to list all users and their processes. I cant seem to find out how to link the PID to the user. For example if i run ps -a I get a nice list of all the processes running and their PID, but no information about which user is running them. If i use w i... (17 Replies)
Discussion started by: Chiefos
17 Replies

2. Shell Programming and Scripting

Displaying the processes of users

Hi guys, I'm writing a script to display all the current logged on users and the processes they're running, output to a file. The output will look similar to this: User1 (Real name not login name) PID TTY TIME CMD 3179 pts/3 00:00:00 vim User2 PID TTY TIME ... (2 Replies)
Discussion started by: olimiles
2 Replies

3. UNIX for Dummies Questions & Answers

Command to find last time file was opened

New to unix .. Is there a simple command or utility that will tell me when the last time a file was opened/used? (3 Replies)
Discussion started by: sbr262
3 Replies

4. UNIX for Dummies Questions & Answers

users and there processes

I am trying to write a script to list all users and their processes. I cant seem to find out how to link the PID to the user. For example if i run ps -a I get a nice list of all the processes running and their PID, but no information about which user is running them. I need the users real name not... (3 Replies)
Discussion started by: iago
3 Replies

5. Shell Programming and Scripting

Processes and Users

Thx for all the help so far, I really appreciate it, this is the last task I have to do then I am no longer a trainee ^^, which means I can use whatever utility I want. :O I need to write a script that does more or less what is shown below. The Users Name PID TTY TIME CMD 12345 pts/3... (22 Replies)
Discussion started by: barbus
22 Replies

6. Shell Programming and Scripting

printing each users by processes

hello All, i am trying to get the each users by with thier processing. I have try it in several ways but i am not getting thier my code is #!bin/bash/ users=`cat /etc/passwd | cut -d':' -f5` onlineusers=`users | tr '.' ' '` $onlineusers | while read `$users` do echo `ps -U $users`... (12 Replies)
Discussion started by: sam4now
12 Replies

7. UNIX for Advanced & Expert Users

same file being opened by two users at a time

I want to avoid a situation where because two users simultaneously open a file and modify and save, leaving the original file in mess. Is there a way in UNIX to warn a user if that particular file is already being used by another user. Thanks in advance (3 Replies)
Discussion started by: paresh n doshi
3 Replies

8. Shell Programming and Scripting

Scripting Help - Display Processes

Hi, I was wondering if somebody could help me as I am struggling with writing a script for a training course. Ive had to write 5 scripts and this is the last one but am struggling with this even though I understand what it is meant to do..... PROBLEM: write a script which will allow you to... (1 Reply)
Discussion started by: isxrc
1 Replies

9. Homework & Coursework Questions

Display info about users (UID GID processes terminal)

I would like to get an opinion for my solution for this task and get feedback about better approach or mistakes I have made. 1. The problem statement, all variables and given/known data: The task is to create a script which prints information about users whose names are specified in the... (2 Replies)
Discussion started by: kornfan
2 Replies

10. UNIX for Beginners Questions & Answers

How to display processes which have been running for more than a X hours?

Hi, Is it possible to display processes which have been running for more than a 5hrs using a variation of the ps -ef command? Regards, Manny (5 Replies)
Discussion started by: mantas44
5 Replies
WHOWATCH(1)						      General Commands Manual						       WHOWATCH(1)

NAME
whowatch - console, interactive, process and users monitoring tool. DESCRIPTION
Whowatch is an console, interactive users and process monitoring tool. It displays information about the users currently logged on to the machine, in real-time. Besides standard informations (login name, tty, host, user's process), the type of the connection (ie. telnet or ssh) is shown. Display of users command line can be switch to tty idle time. Certain user can be selected and his processes tree may be viewed as well as tree of all system processes. Tree may be displayed with additional column that shows owner of each process. In the process tree mode SIGINT and SIGKILL signals can be sent to the selected process. Killing processes is just as simple and fun as deleting lines on the screen. Whowatch has no command line options or configuration file. All actions are performed in real time by pressing following keys: Users list mode: 'up' 'down' cursor movement 'i' toggle between user command line and idle time 'c' full command line on/off. Disabling full command line can save CPU time. It can give you also some additional information about process executable. 'enter' view selected user's processes tree. 't' all system processes (init tree) Tree mode: 'up' 'down' cursor movement 'enter' go back to users list 'o' show processes owners 'c' full command line on/off. Disabling full command line can save CPU time. It can give you also some additional information about process executable. 'Ctrl-I' send INT signal to selected process 'Ctrl-K' send KILL signal to selected process PLUGINS
Whowatch has ability to load plugin during program run. Plugin prints information inside details window. Plugins gives flexibility: if some specific information about process, user or system is needed then separate program could be written to obtain such information. Since there are three kinds of deatils window (process, user and system) maximum three plugins can be loaded. Whowatch has very simple API to write plugins. FILES
Program reads /var/log/wtmp, /var/run/utmp. Under Linux program also reads files from /proc directory. Without read access to these files whowatch funcionality will be limited or program will not even start. SEE ALSO
finger(1) ps(1), pstree(1), top(1), w(1), lsof(8), kill(1) killall(1) BUGS
Because lack of ut_pid in utmp and wtmp structures in *BSD systems, program tries to obtain pid of a login shell by analizing processes controlling terminal and processes names. Under some conditions it may lead to incorrect results ie. there will be incorrect processes tree associated with user's session. AUTHOR
Michal Suszycki <mike@wizard.ae.krakow.pl>, http://wizard.ae.krakow.pl/~mike Tree functions written by Jan Bobrowski <jb@wizard.ae.krakow.pl>, http://wizard.ae.krakow.pl/~jb 27 Feb 2000 WHOWATCH(1)
All times are GMT -4. The time now is 11:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy