{"id":2974,"date":"2014-03-30T17:28:09","date_gmt":"2014-03-30T09:28:09","guid":{"rendered":"http:\/\/rmohan.com\/?p=2974"},"modified":"2014-03-30T17:28:09","modified_gmt":"2014-03-30T09:28:09","slug":"how-to-enable-sar-system-activity-reporter-on-solaris","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=2974","title":{"rendered":"How to enable SAR (System Activity Reporter) on Solaris"},"content":{"rendered":"<p>Solaris 10 comes with a new feature called SMF (Solaris Management Facility), and to<br \/>\nenable SAR, we need to update the SMF database with this information.<\/p>\n<p><code># svcadm enable svc:\/system\/sar:default<\/code><\/p>\n<p>Now lets check if it is really enabled.<\/p>\n<p><code># svcs -x system\/sar<br \/>\nsvc:\/system\/sar:default (system activity reporting package)<br \/>\nState: online since Sun Nov 16 10:07:42 2008<br \/>\nSee: sar(1M)<br \/>\nSee: \/var\/svc\/log\/system-sar:default.log<br \/>\nImpact: None.<\/code><\/p>\n<p>OK. Looks good, but this was only the first part. The second part is, to activate the<br \/>\ntwo shell scripts that comes with SAR:<\/p>\n<p>\/usr\/lib\/sa\/sa1 = a shell script to collect and store data in the binary file \/var\/adm\/sa\/sadd, where dd is the current day<br \/>\n\/usr\/lib\/sa\/sa2 = a shell script that writes a daily report in the file \/var\/adm\/sa\/sardd<\/p>\n<p>To run those scripts regurarly, we need to enable the three lines, in the crontab of the user sys:<\/p>\n<p><code># crontab -l sys<br \/>\n#ident \"@(#)sys 1.5 92\/07\/14 SMI\" \/* SVr4.0 1.2 *\/<br \/>\n#<br \/>\n# The sys crontab should be used to do performance collection. See cron<br \/>\n# and performance manual pages for details on startup.<br \/>\n#<br \/>\n0 * * * 0-6 \/usr\/lib\/sa\/sa1<br \/>\n20,40 8-17 * * 1-5 \/usr\/lib\/sa\/sa1<br \/>\n5 18 * * 1-5 \/usr\/lib\/sa\/sa2 -s 8:00 -e 18:01 -i 1200 -A<\/code><\/p>\n<p>That&#8217;s it. Now the System Activity Reporter is running every 20 minutes,<br \/>\nand at 18:05 o&#8217;clock a daily report is created.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Solaris 10 comes with a new feature called SMF (Solaris Management Facility), and to enable SAR, we need to update the SMF database with this information.<\/p>\n<p># svcadm enable svc:\/system\/sar:default<\/p>\n<p>Now lets check if it is really enabled.<\/p>\n<p># svcs -x system\/sar svc:\/system\/sar:default (system activity reporting package) State: online since Sun Nov 16 10:07:42 2008 [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2974"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2974"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2974\/revisions"}],"predecessor-version":[{"id":2975,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2974\/revisions\/2975"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2974"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2974"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2974"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}