CatBus;194064 Wrote: 
>   My server has been obnoxiously well-behaved for the past few days, so
> there's nothing to see.

It knows you are watching it.

The trick is to sneak up on it.

When you are bored (and it is not looking):
du /tmp
du /var/tmp
du /var/log

Look for something growing or suspiciously large.

I often do:  ls -lt /var/log  (sort by time... if a file is huge but
hasn't been touched in a while I don't really care.. it's the recent
stuff I care about).

You may also want to watch 'df' output... du goes through files and
directories, looks at what is in the directories, adds those files...

The catch is that it misses 'real' tmpfile()'s.  A unix trick is to
open a file, then delete it.  You can still play around with the
contents of the file since you have an open file descriptor to it...
but it doesn't show up anywhere on the file system.

df will show it (since it just asks the kernel, "hey, look at the map
of unused diskblocks, and tell me what is there" instead of enumerating
everything), but du won't have a clue that the file is there.

(The advantage to that trick is that if the process dies unexpectedly,
the tmpfile is automatically freed up, just as RAM from a process
exiting is.  The disadvantage is figuring out "what the heck, i have a
10G partition, du says I should have 2G free, but df says it is
full...")


-- 
snarlydwarf
------------------------------------------------------------------------
snarlydwarf's Profile: http://forums.slimdevices.com/member.php?userid=1179
View this thread: http://forums.slimdevices.com/showthread.php?t=34229

_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/unix

Reply via email to