# Instructions to install SAR on your Ubuntu box.
Step 1. Install sysstat
bash> sudo apt-get install sysstat mutt postfix
Step 2. Enable stat collection
bash> sudo vi /etc/default/sysstat
change ENABLED=”false” to ENABLED=”true”
save the file
Step 3. Change the collection interval from every 10 minutes to every 2 minutes.
bash> sudo vi /etc/cron.d/sysstat
Change
5-55/10 * * * * root command -v debian-sa1 > /dev/null && debian-sa1 1 1
To
*/2 * * * * root command -v debian-sa1 > /dev/null && debian-sa1 1 1
save the file
Step 4. Restart sysstat
bash> sudo service sysstat restart
The below step has to run manually at 5:00PM for the next two days.
Step 5. Save the statistics for further analysis to a file and send it via mail to view the same on Ksar
bash> sudo -s
bash> LC_ALL=C sar -A > /tmp/$(date +`hostname`-%d-%m-%y.log) && echo "SAR-`hostname`" | mutt -s "SAR-`hostname`" abc@abc.com -a /tmp/$(date +`hostname`-%d-%m-%y.log)
No comments:
Post a Comment