problem with who -u output


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users problem with who -u output
# 1  
Old 04-20-2005
Java problem with who -u output

I am using sco unix ver 5. who -u output lists the user name, tty,idle time and PID of the process. When I kill the idle process using kill -9 PID, the process is killed and the who -u output doesn't contain the user which is killed. This out of who -u is correct and desirable. But for past week, I am finding that the who -u out put is still showing the killed user process details.
When I use command w, the it shows doesn't show me the killed user logins.
When I use ps -ft ttyp21 (assuming ttyp21 being the killed terminal id) the
out put is blank. So when w command and ps command work correctly, then why the who -u command still shows the killed logins with idle time still incrementing. I think, the /etc/wtmp and /etc/utmp files are not refreshed.
Which command will refresh the wtmp/utmp files and give me correct who -u output ?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Output formatting problem

Hello; I have a simple loop filtering a log: for LU in $(< LU-list-Final) do OUT=$(grep -B1 $LU cibc-src-ip.cap |egrep 'IP 16|IP 19|IP 15' |awk -F">" '{print $1}') if ; then echo " LU $LU was accessed by ===============> $OUT " echo "" fi done The current output snippet looks like... (2 Replies)
Discussion started by: delphys
2 Replies

2. Shell Programming and Scripting

Problem getting the required output

I need a Korn shell script which does the folllowing:- If there is one "|" (pipe) delimited file so, the script should check the 5th field to be blank or not. if it is a blank tht entire line of the file should be redirected to another file. if the 5th field is not blank it should pass that. ... (4 Replies)
Discussion started by: Juhi Kashyap
4 Replies

3. UNIX for Dummies Questions & Answers

Grep output problem

Hi all, Here is my problem: I'm testing a login script for our mac Machines. This script output's in a csv file. The login script looks like this: echo "${computername}|${data1}|${data2}|${data3}" >> file.csv The csv file looks like this: Computername1|data1|data2|data3... (4 Replies)
Discussion started by: mattiasvdm
4 Replies

4. UNIX for Dummies Questions & Answers

Problem adjusting the output

Hi i m running a command watch -n 1 -d netstat -i to see the packet drops every 1 second. but the problem is the output is so long(Due to large number of virtual interfaces) it doesn't fit into the putty prompt. I dont need to monitor each and every network interface I m more interested in... (5 Replies)
Discussion started by: pinga123
5 Replies

5. Shell Programming and Scripting

output problem

#!/bin/gawk -f BEGIN{} {if ($0~/<a/ || $0~/<img/) link=link+1 } {if ($0~/<a/ || $0~/<img/) cnt++ } {if ($0~/<a/ && $0~/http/ ) weblink++ } {if ($0~/<img/) filelink++ } {if ($0~/<a/ && $0!~/http/) downloadlink++ } (8 Replies)
Discussion started by: pantelis
8 Replies

6. Homework & Coursework Questions

problem with output.

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: something is wrong with my output 2. Relevant commands, code, scripts, algorithms: it has something to do... (1 Reply)
Discussion started by: brooksie91
1 Replies

7. Programming

Problem with output

Hey guys, i am having problem with displaying my text. my text file is displayed in such a way and is called test....... Sam Worthington ... Jake SullyasZoe Saldana ... NeytiriasSigourney Weaver ... Dr. Grace AugustineasStephen Lang ... Colonel Miles QuaritchasJoel Moore ... Norm Spellman (as... (1 Reply)
Discussion started by: gregarion
1 Replies

8. Shell Programming and Scripting

output formatting problem

I would like to keep the complete lines in the output, but my script adds carriage returns for each space (e.g. keep BRITISH AIRWAYS on one line in the output): File1= BAW BRITISH AIRWAYS RYR RYAN AIR for i in $(cat File1) do echo $i done Output: BAW BRITISH AIRWAYS RYR... (4 Replies)
Discussion started by: barny
4 Replies

9. Shell Programming and Scripting

Problem in output

When i use the following command to get only the ip address from a file then i get a whole sentence and not only the ip address which i want. here is the script i am using: grep '^\{1,3\}\.\{1,3\}\.\{1,3\}\.\{1,3\}$' for example if this the file content: Many blogs provide commentary or... (2 Replies)
Discussion started by: snake450
2 Replies

10. UNIX for Dummies Questions & Answers

Output Problem

What do I have to do to get the startup and shutdown Info to display on my Graphical Monitor. As of right now, all i get is the log in screen for X windows on HP-UX. I want to see the boot process (3 Replies)
Discussion started by: Eric_Bakken
3 Replies
Login or Register to Ask a Question
KILLALL(1)							   User Commands							KILLALL(1)

NAME
killall - kill processes by name SYNOPSIS
killall [-Z, --context pattern] [-e, --exact] [-g, --process-group] [-i, --interactive] [-n, --ns PID] [-o, --older-than TIME] [-q, --quiet] [-r, --regexp] [-s, --signal SIGNAL, -SIGNAL] [-u, --user user] [-v, --verbose] [-w, --wait] [-y, --younger-than TIME] [-I, --ignore-case] [-V, --version] [--] name ... killall -l killall -V, --version DESCRIPTION
killall sends a signal to all processes running any of the specified commands. If no signal name is specified, SIGTERM is sent. Signals can be specified either by name (e.g. -HUP or -SIGHUP) or by number (e.g. -1) or by option -s. If the command name is not regular expression (option -r) and contains a slash (/), processes executing that particular file will be selected for killing, independent of their name. killall returns a zero return code if at least one process has been killed for each listed command, or no commands were listed and at least one process matched the -u and -Z search criteria. killall returns non-zero otherwise. A killall process never kills itself (but may kill other killall processes). OPTIONS
-e, --exact Require an exact match for very long names. If a command name is longer than 15 characters, the full name may be unavailable (i.e. it is swapped out). In this case, killall will kill everything that matches within the first 15 characters. With -e, such entries are skipped. killall prints a message for each skipped entry if -v is specified in addition to -e, -I, --ignore-case Do case insensitive process name match. -g, --process-group Kill the process group to which the process belongs. The kill signal is only sent once per group, even if multiple processes belonging to the same process group were found. -i, --interactive Interactively ask for confirmation before killing. -l, --list List all known signal names. -n, --ns Match against the PID namespace of the given PID. Use 0 to match against all namespaces. The default is to match against the current PID namespace. -o, --older-than Match only processes that are older (started before) the time specified. The time is specified as a float then a unit. The units are s,m,h,d,w,M,y for seconds, minutes, hours, days, weeks, Months and years respectively. -q, --quiet Do not complain if no processes were killed. -r, --regexp Interpret process name pattern as a POSIX extended regular expression, per regex(3). -s, --signal, -SIGNAL Send this signal instead of SIGTERM. -u, --user Kill only processes the specified user owns. Command names are optional. -v, --verbose Report if the signal was successfully sent. -V, --version Display version information. -w, --wait Wait for all killed processes to die. killall checks once per second if any of the killed processes still exist and only returns if none are left. Note that killall may wait forever if the signal was ignored, had no effect, or if the process stays in zombie state. -y, --younger-than Match only processes that are younger (started after) the time specified. The time is specified as a float then a unit. The units are s,m,h,d,w,M,y for seconds, minutes, hours, days, weeks, Months and years respectively. -Z, --context (SELinux Only) Specify security context: kill only processes having security context that match with given extended regular expres- sion pattern. Must precede other arguments on the command line. Command names are optional. FILES
/proc location of the proc file system KNOWN BUGS
Killing by file only works for executables that are kept open during execution, i.e. impure executables can't be killed this way. Be warned that typing killall name may not have the desired effect on non-Linux systems, especially when done by a privileged user. killall -w doesn't detect if a process disappears and is replaced by a new process with the same PID between scans. If processes change their name, killall may not be able to match them correctly. killall has a limit of names that can be specified on the command line. This figure is the size of an unsigned long multiplied by 8. For most 32 bit systems the limit is 32 and similarly for a 64 bit system the limit is usually 64. SEE ALSO
kill(1), fuser(1), pgrep(1), pidof(1), pkill(1), ps(1), kill(2), regex(3). psmisc 2017-06-12 KILLALL(1)