Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a problem of killing or closing a login session. Its kind of hard to kill it, since its not showing on the pid list or anything.
Its "showed" 3 places:
* finger: cereal Aleks *pts/9 Aug 7 15:47 (host.name)
* w: one of the 9 users current users.
* users: one of the users displayed.
I have had several of these zombie-pts but they are supposed to be removed by the kernel right ?
Its not in /dev/pts
btw: Its slack 7.2
Anyone knows how i get this out of the system without rebooting ? its kind of irritating !
The thing is that i want that "login session" to be removed from the stats when running "w" , "finger" and "users"
Its a login i cant kill. Its some file or something i need to remove i think.
Its not on the ps list. Its a zombie without a ID.
What does the star mean in this anyways?
cereal Aleksander *pts/9 Aug 7 15:47 (host.name)
its allso printing when running "finger" :
finger: /dev//pts/9: No such file or directory
finger: /dev//pts/14: No such file or directory
finger: /dev//pts/27: No such file or directory
Uhm... I don't understand - you want to kill off a login shell yeah?? Thats the only way to stop a logged in use showing in the output of finger or w or whatever, mind you this will often kill all the processes that a user is running.
And yeah, ps -ef should show everything, observe, getty's waiting for logins, and my bash login shell as root:
As for Zombie's - a zombie has a PID as every processes must have one!! A zombie is just a process that has been killed, its just waiting around while some resources clean up before its removed by the kernel, hence the name - its not alive, but its still hanging around.
If you are getting errors about /dev/ it normally means you have special files that point to things that don't exist. Have you got "Unix98 PTY Support" in your kernel???
But its not that simple. I know how to kill / find pids in the system.
I have asked 50 ppl soon, and the best answar i got was:
Quote:
ex: skill -KILL pts/*
for the pts to show in the pid list it should allso be showed in /dev/pts .
I heard it could be something wrong with lastlogin og wtmp, and their the reson i get this "zombies". Its wrong to call them that, buts that what it is. Its a thing not living but is showed.
Where does all programs get the info about this ?
It has to be a proc file? I wont reboot!
U see what i mean now? Its _NOT_ on the pid list, so i cant kill it with any pid nr. Its something in a file or something.
Yeah - I'd agree that is may be a problem with wtmp. Try erasing and recreating it if you want, I think it's probably best to kick any users off the system first though. You should just be able to use
Code:
rm wtmp && touch wtmp && chmod 644
I've only ever bother to clear my wtmp file once and didn't get any hassles, mind you I can't say I've investigated any potential problems it can cause.
As for the star (in an earlier post) - I would *guess* that was your point of login, so the pts is linked to a login shell, not just a shell spawned later in the session. (Linux differentiates between the two)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.