Is there a log file to view linux load history

I am sure whether I can find the information of the load history
information some where in a log file.
Just like what the command "top" tells.
This is because my machine often freeze due to some unknown reasons. I
just want to check if there's a coincide with the high load. Thanks in
advance!
chwang7 [ Fr, 26 Oktober 2007 14:07 ] [ ID #1854889 ]

Re: Is there a log file to view linux load history

On Oct 26, 5:07 pm, Robin <chwa... [at] gmail.com> wrote:
> I am sure whether I can find the information of the load history
> information some where in a log file.
> Just like what the command "top" tells.
> This is because my machine often freeze due to some unknown reasons. I
> just want to check if there's a coincide with the high load. Thanks in
> advance!

There are many approaches to get what you want. The simplest I can
think of is:
top -b -d 300 >> /path/to/topfile &
This command will keep adding the output of top command to the
specified file after every 300 seconds (not the very efficient
approach, of course)

Yogesh
Yogesh Sawant [ Fr, 26 Oktober 2007 16:13 ] [ ID #1854895 ]

Re: Is there a log file to view linux load history

On Oct 26, 3:13 pm, Yogesh Sawant <y.saw... [at] gmail.com> wrote:
> On Oct 26, 5:07 pm, Robin <chwa... [at] gmail.com> wrote:
>
> > I am sure whether I can find the information of the load history
> > information some where in a log file.
> > Just like what the command "top" tells.
> > This is because my machine often freeze due to some unknown reasons. I
> > just want to check if there's a coincide with the high load. Thanks in
> > advance!
>
> There are many approaches to get what you want. The simplest I can
> think of is:
> top -b -d 300 >> /path/to/topfile &
> This command will keep adding the output of top command to the
> specified file after every 300 seconds (not the very efficient
> approach, of course)

alternatively:
cat /proc/loadavg
uptime <-- includes a timestamp.

Greets,
Peter G.

--
Perl combines the power of sh, the clarity of sed, and the
performance
of awk with the simplicity of C.
nephros [ Di, 30 Oktober 2007 10:24 ] [ ID #1857402 ]
Linux » comp.unix.shell » Is there a log file to view linux load history

Vorheriges Thema: find problem !!
Nächstes Thema: Extract