When you do a "who -a", you get every entry in utmp. Entries like:
admin network Feb 7 20:23 . 28745 id=11:0 term=0 exit=3
admin network Feb 8 14:18 . 3666 id=66:0 term=0 exit=0
exist only to record the exit code of the terminated process.
Stopping unix from recording this information would require a modification to init at least and maybe login depending on how information you want to suppress.
Below basic help for the command "who" can be seen. If I do a "who -d" to see all the dead processes, this is what I get :
# who -d|sort
LOGIN network Feb 4 21:07
LOGIN network Feb 10 09:21
LOGIN network Feb 11 13:33
LOGIN pts/1 Feb 8 12:25
admin network Feb 4 17:56
admin network Feb 5 14:44
admin network Feb 7 17:36
admin network Feb 7 20:23
admin network Feb 8 14:18
admin network Feb 8 16:57
admin network Feb 8 18:00
admin network Feb 9 16:22
admin network Feb 11 12:33
admin network Feb 11 15:39
admin network Feb 11 17:09
admin network Feb 11 20:08
admin network Feb 12 09:12
admin network Feb 12 09:33
admin network Feb 12 11:53
admin network Feb 12 12:03
admin network Jan 30 12:57
admin network Jan 30 18:25
admin network Jan 31 18:26
admin ttyp1 Feb 12 09:44
admin ttyp2 Feb 12 08:13
admin ttyp6 Feb 12 10:03
admin ttyp7 Feb 11 18:22
admin ttypf Feb 11 17:09
admin ttyq0 Feb 11 14:35
bcheckrc . Jan 30 11:49
cat . Jan 30 11:49
rc . Jan 30 11:50
sh . Feb 12 08:58
sh . Feb 12 08:58
sh . Feb 12 08:58
sh . Jan 30 11:49
What I want to do is get rid of all the sessions before today(12/02/02), how can I do that ?
Cheers !
Usage: who [-rbtpludAasHTqRm] [am i] [utmp_like_file]
r run level
b boot time
t time changes
p processes other than getty or users
l login processes
u useful information
d dead processes
A accounting information
a all (rbtpludA options)
s short form of who (no time since last output or pid)
H print header
T status of tty (+ writable, - not writable, x exclusive open, ? hung)
q quick who
R print host name
How can I kill the admin ones with the dash(-). I try to grep network but nothing shows up. If I grep ttyp3 for example I get the session and I can kill it. I want to kill the ones that have a - (dash) next to them but the proccess ID does not show up.
Sorry if I confuse you, let me know so I can provide more information if you need. Any help will be much appreciated.
even if I kill ALL the admin proccess (everything, inlcuding vuesessions, ttyX, whatever) and do a "w" I still get "admin" logged in.
Doing a "ps -ef |grep admin" after that there is absolutely NOTHING.
I am logged in as root.
I don't want to reboot all the time.
Any ideas please?
You wrote:
even if I kill ALL the admin proccess (everything, inlcuding vuesessions, ttyX, whatever) and do a "w" I still get "admin" logged in.
Doing a "ps -ef |grep admin" after that there is absolutely NOTHING.
I can think of couple of things but need more info:
If there is no processes associated with the admin userid, then you may just have a bug in the who command and how it is getting information. What OS is this? Have you checked for this as a problem with the OS?
What is the LOGIN_AUTO on the admin processes you posted? Is it possible this is a self-spawing processes? How soon after you kill off everything does it come back (the ones with - at the end)
Ask yourself - are they doing anything, hurting the system in any way? What is the big deal (especially since you don't see them in a process status (ps -ef). Stop using who - problem solved.
1) The operating system I am using is HP-UX B.10.20 A on 9000/785.
I don't think there is a bug with the "who" command.
2) The LOGIN_AUTO on the admin processes are remote "telnet" sessions to optical multiplexers used for provisioning.
3) The problem is that after a certain number of connected users the system hungs and no more users can log in. This is the reason I am trying to kill any inactive "admin" sessions that migh have left.
People using "exceed" to connect and sometimes (in the case of an error) they just have to close the window down without logging out properly. This leaves inactive sessions at the background without really people being connected. Also these sessions are associated with the appropriate "semaphores" which I have to manually kill all the time. (man ipcs)