Sunday 21 May 2017

Step by Step method to enable SAR (System Activity Reporter) on Solaris Server

When you work on Solaris operating system, you need to managed the performance of the operating system. If the performance are very good then your server behave normal and run the long time without any issue.

Sometime your Solaris server performance is not good and memory and resource utilization get very high, then you need to find out what is the cause of this high utilization and if you are working on client project then your client must want the report.

So on Solaris server we are used SAR (System Activity Reporter) to generate all the report related to server health.

SAR (System Activity Reporter) is used to troubleshoot the performance issue on Sun Solaris Servers. Using SAR (System Activity Reporter) we can troubleshoot or monitored the disk, memory or CPU performance issues on the Solaris operating system servers.

Step by step procedure to enable SAR (System Activity Reporter):

⏩ By default SAR utility are installed on the Solaris 11 operating system. If you want to check the current service status of SAR, then you need to run the below command.

!-[solaris]# svcs status sar
disabled        May_22  svc:/system/sar:default

You can used also below command to check the current status of SAR services.

!-[solaris]# svcs -a | grep -i sar
disabled        May_22  svc:/system/sar:default

In above command output, if you see currently the sar service is disable so in the next step we need to enable this service

⏩ In this step, you need to enable the SAR services which is disable on the my solaris server.

!-[solaris]# svcadm enable svc:/system/sar:default

Using above command the SAR service has been started, if you want to check the current status please run the below command.

!-[solaris]# svcs status sar
enabled        May_22  svc:/system/sar:default

⏩ We will make a setup for automatic data collection, once we enable the sar service. The default script for SAR utility are located the below directory location.

/usr/lib/sa/sa1➤ This is a shell script to collect and store data in the binary file /var/adm/sa/sadd, where dd is the current day.

/usr/lib/sa/sa2➤ This is a  shell script for generating daily report in the file /var/adm/sa/sardd, where dd is current day.

As these above script are used normally to collect the automatically data from Solaris Server. If you required the daily report or weekly report then you need to add both the script in crontab file which is describe in next step.

⏩ If you required the SAR report regularly then you need to make an entry of above script on the crontab file.

!-[solaris]# crontab -e

Using these command you can edit the existing file and make an entry of above script according to your requirement when you want to generate the report.

Please comment on my post, if you have any query related to this sar topic.

No comments:

Post a Comment