03-16-2010
I might suggest that you approach this differently.
If the user is logged out, there will be no tty listed in ps - it will be a question mark.
Secondly - hanging processes like this are almost always some badly written app - don't you already know what the process name is??
Another often useful clue for these things is that they sometimes accumulate much more CPU time than would be normal (again, badly written to start with and they go insane when disconnected from their pty).
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
There is a file having a list of running PIDs and another file having a list of registered PIDs. How can we check if the number of running PIDs are less or more than the registered PIDs, comparing the total no. in each and also each value.
Request you to pls give your inputs.
Thanks a... (2 Replies)
Discussion started by: marconi
2 Replies
2. Shell Programming and Scripting
Hi,
There is a file having a list of running PIDs (pid_process) and another file having a list of registered PIDs (pid_regieter).
I want to check if:-
a) there is at least one running PID that does not correspond to a
registered PID (listing the PID not registered in the file)
... (1 Reply)
Discussion started by: marconi
1 Replies
3. Shell Programming and Scripting
Hi
Suppose i have a set of files like this
set1
a.cpp@@main/5
b.cpp@@main/6
set 2
m.cpp@@main/51
n.hpp@@main/51
a.cpp@@main/15
b.cpp@@main/2
there may be files with same name in 2 sets. i need to list the files in set1 which have last numeric field less than the same file in... (15 Replies)
Discussion started by: skyineyes
15 Replies
4. Shell Programming and Scripting
set 1
./abc@@/main/61
./def.cpp@@/main/13
./fgh.cpp@@/main/16
./ijk.cpp@@/main/12
./mln.cpp@@/main/9
./uvw.cpp@@/main/30
set2
./eww@@/main/61
./def.cpp@@/main/13
./xxx.cpp@@/main/26
./kkk.cpp@@/main/72
./qqq.cpp@@/main/19
./fgh.cpp@@/main/16
I have two sets with filenames in... (13 Replies)
Discussion started by: skyineyes
13 Replies
5. UNIX for Dummies Questions & Answers
Hi All,
I have two solaris servers.
Please tell me what all parameters i can check to find out the difference between two servers.
how to differentiate based on H/W,S/W etc
like i have two servers
spdwa013 $ uname -an
SunOS spdwa013 5.8 Generic_117350-61 sun4u sparc SUNW,Sun-Fire-480R
... (1 Reply)
Discussion started by: usha rao
1 Replies
6. Solaris
I am trying to determine the root cause of a java process that dies trying to startup during it's cron job.
I did go ahead and change the time that it starts up in the cron file and now it starts successfully.
However is there a way to determine what PID a process was attempting to get when... (5 Replies)
Discussion started by: vedder191
5 Replies
7. Shell Programming and Scripting
Hi there !!!
I am writing a script to kill the pids on different linux boxes :cool:
the output of my command gives the pids running on that box, but how can I kill all the pids without looping? :confused:
Code:
ssh $i ps -fu $USER | grep ManServer | grep -v grep | awk '{print $2}' | kill
... (4 Replies)
Discussion started by: prany_cool
4 Replies
8. Shell Programming and Scripting
I have 2 csv files say file1 and file2. Based on 2 columns, I want to check if the values of file1 is present in file 2 or not. If it's not present then it should create a file with the values which are not present. Basically I want the minus between 2 files but based on 2 columns but the output... (2 Replies)
Discussion started by: Gangadhar Reddy
2 Replies
9. Shell Programming and Scripting
im looking for a portable way to get the PID of the script that is running, and to get every other PIDs that are spawned from it.
and by ever other PIDs, i presume, that would be "child processes".
however, i want to shy away from using any command that is not available on every single unix... (1 Reply)
Discussion started by: SkySmart
1 Replies
LEARN ABOUT DEBIAN
whowatch
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)