how to query sar(sysstat) for more than one day data points
1
vote
1
answer
1386
views
1. I don't see 'sar' command accepts date-and-time as starttime(-s) or endtime(-e) than just time. So, how to query 'sar' for more than one day's data point with older date and times(-f not going to help here). The output of the 'sar' command should have date value too as well for the data points - instead of just time in hours and minutes.
2. I see sysstat splitting pa data files per day-wise. Is it ok to modify the default sysstat cron entries to collect sysstat(sa1/sa2) data in a single pa file per week.
sysstat config:
cat /etc/sysconfig/sysstat
# sysstat-9.0.4 configuration file.
# How long to keep log files (in days).
# If value is greater than 28, then log files are kept in
# multiple directories, one for each month.
HISTORY=7
# Compress (using gzip or bzip2) sa and sar files older than (in days):
COMPRESSAFTER=10
# Parameters for the system activity data collector (see sadc manual page)
# which are used for the generation of log files.
SADC_OPTIONS="-S DISK"
sysstat cron entries:
cat /etc/cron.d/sysstat
# Run system activity accounting tool every 10 minutes
*/10 * * * * root /usr/lib64/sa/sa1 1 1
# 0 * * * * root /usr/lib64/sa/sa1 600 6 &
# Generate a daily summary of process accounting at 23:53
53 23 * * * root /usr/lib64/sa/sa2 -A
Asked by Murali Mopuru
(63 rep)
Feb 20, 2018, 06:52 AM
Last activity: Feb 28, 2018, 08:30 PM
Last activity: Feb 28, 2018, 08:30 PM