I've been enabled sar in solaris.
Quote:
bash-3.00# svcs -a|grep sar
online Nov_18 svc:/system/sar:default
in crontab:
Quote:
#crontab -e sys
0 * * * 0-6 /usr/lib/sa/sa1
20,40 8-17 * * 1-5 /usr/lib/sa/sa1
5 18 * * 1-5 /usr/lib/sa/sa2 -s 8:00 -e 18:01 -i 1200 -A
and target dir where binar files is situated:
Quote:
bash-3.00# ls -la /var/adm/sa/
total 3134
drwxrwxr-x 2 adm sys 512 Dec 2 13:22 .
drwxrwxr-x 9 root sys 512 Nov 26 03:10 ..
-rw-r--r-- 1 sys sys 180576 Dec 1 23:00 sa01
-rw-r--r-- 1 sys sys 102600 Dec 2 13:20 sa02
-rw-r--r-- 1 sys sys 45144 Nov 25 23:00 sa25
-rw-r--r-- 1 sys sys 180576 Nov 26 23:00 sa26
-rw-r--r-- 1 sys sys 180576 Nov 27 23:00 sa27
-rw-r--r-- 1 sys sys 180576 Nov 28 23:00 sa28
-rw-r--r-- 1 sys sys 98496 Nov 29 23:00 sa29
-rw-r--r-- 1 sys sys 98496 Nov 30 23:00 sa30
-rw-r--r-- 1 sys sys 54501 Dec 1 18:05 sar01
-rw-r--r-- 1 root root 0 Nov 25 16:04 sar25
-rw-r--r-- 1 sys sys 54501 Nov 26 18:05 sar26
-rw-r--r-- 1 sys sys 54501 Nov 27 18:05 sar27
-rw-r--r-- 1 sys sys 54501 Nov 28 18:05 sar28
-rw-r--r-- 1 root root 196449 Dec 1 12:48 sar_all
1.But sar indexing files as day(by default) from 1 to 30(31), how to add total date as prefix instead day prefix?
2.in my script for sar statistic i do command:
Quote:
#!/usr/bin/bash
sar -A -f /var/adm/sa/sa01 >> /var/adm/sa/sar_all_month
.....
....
....
....
sar -A -f /var/adm/sa/sa31 >> /var/adm/sa/sar_all_month
Somebody suggest me about that What variables and iterations are suitable in that case? Instead 30 lines for every day statistic.
Please help.