LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   How to check the System Performance of Yesterday ? (http://www.linuxquestions.org/questions/linux-server-73/how-to-check-the-system-performance-of-yesterday-4175475116/)

Senthilv 08-29-2013 02:02 AM

How to check the System Performance of Yesterday ?
 
Hai,

I want to check the system performance of yesterday timing like 5.00 PM to 6.00 PM ?
like cpu utilization.

Is it Possible ?

druuna 08-29-2013 02:44 AM

Quote:

Originally Posted by Senthilv (Post 5017998)
I want to check the system performance of yesterday timing like 5.00 PM to 6.00 PM ?
like cpu utilization.

Is it Possible ?

The sar package can do this:
- Linux and Unix sar command
- sar - examples

If sar hasn't been set up yet then you cannot get info about earlier events (I'm not sure if your question is actually about yesterday). It must be active in order to get information.

Habitual 08-29-2013 11:07 AM

if, when sysstat is installed (this is the package that contains 'sar', use
Code:

sar -f /var/log/sa/sa28 -s 17:00:00 -e 18:00:00
This of course presuming that sar is installed and collecting.

Ubuntu:
Code:

apt-get install -y sysstat
sed -i 's/false/true/' /etc/default/sysstat
/etc/init.d/sysstat start

CentOS:
Code:

yum install -y sysstat
sed -i 's/7/30/' /etc/sysconfig/sysstat # Optional, but I prefer 30 days of collected data, Default is 7 days
grep -v "#" /etc/cron.d/sysstat
/etc/init.d/sysstat start

/var/log/sa/sa28 would be yesterday's dd using
Code:

date +"%d" --date="1 days ago"
or just try something like
Code:

sar -f /var/log/sa/sa$(date +"%d" --date="1 days ago") -s 17:00:00 -e 18:00:00


All times are GMT -5. The time now is 07:12 AM.