Is it possible to get the output of top command for particular time period?

Hi All,

I have faced few questions, please help me in these.
How we can know if our server get restarted yesterday night because of high memory utilization or disk full?
Is it possible to get the top command output for particular time stamp?
How can we know if any user is accessing a file system(for Ex: /opt) when we try to unmount it for extending the size?
And also, Please suggest open source monitoring tools for centos.

sudo top -n 2000 -b -d 120 > output.txt

where -n is for (iterations) -d is duration.

Monitoring tool go with zabbix, but it was bit difficult to configure.

Hello itz_sashi,

Have you investigated the “sar” command? It is part of the sysstat package. It has several components and logs system performance data once every 10 minutes (by default).

I also use a tool called kSar for graphing the sar data.

Kind regards,

You can delay or output performed at particular period of time you may use the TOP command

Syntax of command is given below

# top -hv |  -d 15 -n 15