Monday, March 2, 2009

sar System Activity Reporter

Identifying the bottleneck and fine tuning the system is one of the most important activities which we need to undertake as system administers. SAR will be a very handy tool once you get familiarized to it.
Sar comes as part of 'sysstat' package in linux. First thing you need to do is to make sure that sysstat package is installed in you machine. It may not get installed along with the default packages.
Sysstat toolkit contains other tuning tools like
  • iostat
  • mpstat
rpm -qa grep sysstat
if not installed, install it....!
yum install systat
rpm -ql sysstat



Sadc (system activity data collector) is the program that gathers performance data. It pulls its data out of the virtual /proc filesystem, then it saves the data in a file (one per day) named /var/log/sa/saDD where DD is the day of the month.
Two shell scripts from the sysstat package control how the data collector is run. The first script, sa1, controls how often data is collected, while sa2 creates summary reports (one per day) in /var/log/sa/sarDD. Both scripts are run from cron. In the default configuration, data is collected every 10 minutes and summarized just before midnight
cat /etc/cron.d/sysstat
----------------------
# run system activity accounting tool every 10 minutes
*/10 * * * * root /usr/lib/sa/sa1 1 1
# generate a daily summary of process accounting at 23:5353 23
* * * root /usr/lib/sa/sa2 -A

If the daily summary reports created by the sa2 script are not enough, you can create your own custom reports using sar. The sar program reads data from the current daily data file unless you specify otherwise. To have sar read a particular data file, use the -f /var/log/sa/saDD option. You can select multiple files by using multiple -f options. Since many of sar's reports are lengthy, you may want to pipe the output to a file.
Output of sar


Commonly Used switches

  • -B To check the kernal paging performance
  • -n DEV option tells sar to generate a report that shows the number of packets and bytes sent and received for each interface
  • -W swapping statistics
  • -q queueing statistics
  • -d statistics about block devices
  • -r shows the free memory and swap over time

To have the statistics about the current state of the system, issue the command as below

sar 2 10

The above command provides statistics of system activity at an interval of 2 seconds for 10 times


...... All the best........

Sunday, February 22, 2009

Ugrade AIX 5.2 to 5.3........

Hi,

I just want to upgrade my AIX 5.2-09-00 to 5.3-00-00, from where i can download 5.3 filesets? is it possible to do through smit(Update_all).???

Saturday, February 14, 2009

Migration tool for mail

Trying to migrate all the folders in inboxes to another server? try imapsync

http://freshmeat.net/projects/imapsync/

Friday, November 21, 2008

Windows new line in vi

To have windows new line in vi, use
CTRL+v, then enter

Friday, November 14, 2008

Retrieve deleted file from AIX

Hi all,

By mistake i deleted one file from my AIX 5.3 machine. Is it possible to retrieve it?

Thursday, November 6, 2008

Not able to copy file through tftp

Hi all,
I am trying to copy one file through tftp by using the following command,
uclibc[/]$ tftp -r /root/a.out -g 172.19.60.76
here, 172.19.60.76 is the tftp server.
but i am getting the error "time out"
in server log file(/var/log/messages), i can see the following error message,
Nov 5 17:38:19 localhost xinetd[14059]: START: tftp pid=28430 from=172.19.56.144Nov 5 17:38:19 localhost in.tftpd[28430]: /var/lib/tftpboot: Permission deniedNov 5 17:38:19 localhost xinetd[14059]: Deactivating service tftp due to excessive incoming connections. Restarting in 2 seconds.Nov 5 17:38:19 localhost xinetd[14059]: FAIL: tftp connections per second from=172.19.56.144Nov 5 17:38:21 localhost xinetd[14059]: Activating service tftp