[plug] Keeping a running server clean
James Devenish
devenish at guild.uwa.edu.au
Sun Oct 24 10:08:03 WST 2004
Hi,
In message <4179D57D.3040403 at tigris.org>
on Sat, Oct 23, 2004 at 11:52:29AM +0800, Tim White wrote:
> I didn't find any that appeared to clean up stale locks, or /tmp.
With Linux, it is typical that /tmp only gets cleaned upon reboot. This
is nice for desktop machines. In contact, some BSD operating systems
clean /tmp regularly. Most people would not expect /tmp to be flushed on
a regular basis, so what you have experienced is "normal". However,
"stale locks" is not very explanatory. Is this a netware thing? I don't
know anything about netware.
> I also have a user who was logged in over XDMCP Mand had the computer
> crash (client) and so she appears to be logged in according to `who` but
> she has no processes running and that was 3 days ago. Is it possible to
> have this cleaned up as well?
The list of 'current' users is stored in a file called utmp (or utmpx).
The 'login process' (whatever that might be) writes an entry to utmp
when the user logs in, and also when the user logs out. If the user's
processes crash in a very abrupt way, it is possible that the logout
code is never reached. However, this is pretty unusual. It is more
normal that some of the user's processes are still running, and if you
kill them politely (such as with SIGHUP), the logout amendments will be
written to utmp and wtmp. Someone might have written a little utility
that can be used to amend the contents of utmp, but it should not be too
difficult to hack up your own by reading the man pages.
More information about the plug
mailing list