Re: Linux box reboots some times without reasons
From: Unruh (unruh-spam_at_physics.ubc.ca)
Date: 28 Oct 2005 00:39:35 GMT
firstname.lastname@example.org (Moe Trin) writes:
>In the Usenet newsgroup comp.os.linux.misc, in article
><email@example.com>, Unruh wrote:
>>(Moe Trin) writes:
>>>One solution that might work is to change the above script to
>>>ps auxww >>/var/tmp/ps1
>>>ps auxww >>/var/tmp/ps2
>>Not sure at all why this would be better.
>You are not overwriting the "latest" data. With your original scheme,
>a "failure" (power, RAM, what-ever) occurring/detected between the
>'date' command, and the 'ps' results in /tmp/ps1 containing the date, and
>nothing else. Great for pin-pointing when the failure occurred, but not so
>great for troubleshooting.
True, although the chances that the crash occured in the millisec between
the date command and the ps command is not something I would worry about.
The problem of the cache not being written out is much more worrying.
I suppose if you ran this as root, you could always put a
at the end of the write and before the "sleep 10" would at least get rid
of the kernel cache.
>>I suppose doing
>>would make sure that ps1 got flushed out because of the copy.
>Depends on the caching algorithm - that 'read' would likely _come_ from
>cache, but it wouldn't force the write all the way (kernel cache, the
>possible drive controller cache, and finally the cache on the disk).
> Old guy