{"id":1321,"date":"2005-11-19T17:10:55","date_gmt":"2005-11-20T00:10:55","guid":{"rendered":"http:\/\/www.andreaswacker.com\/blog\/2005\/11\/19\/sar-under-os-x-1043\/"},"modified":"2005-11-19T17:10:55","modified_gmt":"2005-11-20T00:10:55","slug":"sar-under-os-x-1043","status":"publish","type":"post","link":"https:\/\/www.andreaswacker.com\/blog\/2005\/11\/19\/sar-under-os-x-1043\/","title":{"rendered":"sar under OS X 10.4.3"},"content":{"rendered":"<p>what a weird hack! OS X comes with the sar command, which I found to be very helpful to look at what a machine is doing.<br \/>\nJust running<br \/>\n<code>sar<\/code><\/p>\n<p>Will look for todays performance. You have to collect it first. Traditionally this gets done via a cron job. OS X really likes to use <a href=\"http:\/\/developer.apple.com\/macosx\/launchd.html\"> launchd <\/a> instead. But I need to get some work done, I don&#8217;t have the time to learn another propriatary solution for a very common problem: Running things periodically. So I stick with cron. Not sure why it is running on some of the systems and not on others. If you follow this make sure cron shows up in a <code> ps ax | grep cron<\/code> command. If it does then you could enable daily performance traces reportable by &#8220;sar&#8221; by adding<br \/>\n<code><br \/>\n# run system activity accounting tool every 10 minutes<br \/>\n*\/10 * * * * root \/usr\/lib\/sa\/sa1 1 1<br \/>\n# generate a daily summary of process accounting at 23:53<br \/>\n53 23 * * * root \/usr\/lib\/sa\/sa2 -A<br \/>\n<\/code><br \/>\nto <code>\/etc\/crontab<\/code>. If cron runs then it will reread the file automatically. The remaining problem for me and under<br \/>\nOS X 10.4.3 was that sa1 overwrote instead of appended the performance data. A really terrible hack that fixed this was to change the lines in <code>\/usr\/lib\/sa\/sa1<\/code> from<br \/>\n<code><br \/>\n        exec ${ENDIR}\/sadc 1 1 ${DFILE}<br \/>\n<\/code><br \/>\nto<br \/>\n<code><br \/>\n        exec ${ENDIR}\/sadc 1 1 >>${DFILE}<br \/>\n<\/code><\/p>\n<p>This works, but generates error messages like:<br \/>\n<code><br \/>\nsar: drivepath sync code error -4<br \/>\n<\/code><br \/>\nwhen I retrieve the daily performance data.<\/p>\n<p>This is good enough for me. All I am after is to find out what that 30TB Xsan has been doing.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>what a weird hack! OS X comes with the sar command, which I found to be very helpful to look at what a machine is doing. Just running sar Will look for todays performance. You have to collect it first. Traditionally this gets done via a cron job. OS X really likes to use launchd [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>sar under OS X 10.4.3 - Andreas Wacker<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.andreaswacker.com\/blog\/2005\/11\/19\/sar-under-os-x-1043\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"sar under OS X 10.4.3 - Andreas Wacker\" \/>\n<meta property=\"og:description\" content=\"what a weird hack! OS X comes with the sar command, which I found to be very helpful to look at what a machine is doing. Just running sar Will look for todays performance. You have to collect it first. Traditionally this gets done via a cron job. OS X really likes to use launchd [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.andreaswacker.com\/blog\/2005\/11\/19\/sar-under-os-x-1043\/\" \/>\n<meta property=\"og:site_name\" content=\"Andreas Wacker\" \/>\n<meta property=\"article:published_time\" content=\"2005-11-20T00:10:55+00:00\" \/>\n<meta name=\"author\" content=\"1\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@_andreaswacker\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"1\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/2005\/11\/19\/sar-under-os-x-1043\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/2005\/11\/19\/sar-under-os-x-1043\/\"},\"author\":{\"name\":\"1\",\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/691b5221b886b3b09742e476a16e5631\"},\"headline\":\"sar under OS X 10.4.3\",\"datePublished\":\"2005-11-20T00:10:55+00:00\",\"dateModified\":\"2005-11-20T00:10:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/2005\/11\/19\/sar-under-os-x-1043\/\"},\"wordCount\":213,\"publisher\":{\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/c1f46a348eafeb52ee54843dce18442a\"},\"articleSection\":[\"Apple\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/2005\/11\/19\/sar-under-os-x-1043\/\",\"url\":\"https:\/\/www.andreaswacker.com\/blog\/2005\/11\/19\/sar-under-os-x-1043\/\",\"name\":\"sar under OS X 10.4.3 - Andreas Wacker\",\"isPartOf\":{\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/#website\"},\"datePublished\":\"2005-11-20T00:10:55+00:00\",\"dateModified\":\"2005-11-20T00:10:55+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/2005\/11\/19\/sar-under-os-x-1043\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.andreaswacker.com\/blog\/2005\/11\/19\/sar-under-os-x-1043\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/2005\/11\/19\/sar-under-os-x-1043\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.andreaswacker.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"sar under OS X 10.4.3\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/#website\",\"url\":\"https:\/\/www.andreaswacker.com\/blog\/\",\"name\":\"Andreas Wacker\",\"description\":\"weblog\",\"publisher\":{\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/c1f46a348eafeb52ee54843dce18442a\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.andreaswacker.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/c1f46a348eafeb52ee54843dce18442a\",\"name\":\"Andreas Wacker\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.andreaswacker.com\/blog\/wp-content\/uploads\/2024\/06\/awfavion.png\",\"contentUrl\":\"https:\/\/www.andreaswacker.com\/blog\/wp-content\/uploads\/2024\/06\/awfavion.png\",\"width\":248,\"height\":248,\"caption\":\"Andreas Wacker\"},\"logo\":{\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/www.andreaswacker.com\",\"https:\/\/www.instagram.com\/_andreaswacker\/\",\"https:\/\/x.com\/_andreaswacker\",\"https:\/\/www.youtube.com\/channel\/UCWwFtVC_HATVr-R5EiNmhHw\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/691b5221b886b3b09742e476a16e5631\",\"name\":\"1\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"caption\":\"1\"},\"url\":\"https:\/\/www.andreaswacker.com\/blog\/author\/1\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"sar under OS X 10.4.3 - Andreas Wacker","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.andreaswacker.com\/blog\/2005\/11\/19\/sar-under-os-x-1043\/","og_locale":"en_US","og_type":"article","og_title":"sar under OS X 10.4.3 - Andreas Wacker","og_description":"what a weird hack! OS X comes with the sar command, which I found to be very helpful to look at what a machine is doing. Just running sar Will look for todays performance. You have to collect it first. Traditionally this gets done via a cron job. OS X really likes to use launchd [&hellip;]","og_url":"https:\/\/www.andreaswacker.com\/blog\/2005\/11\/19\/sar-under-os-x-1043\/","og_site_name":"Andreas Wacker","article_published_time":"2005-11-20T00:10:55+00:00","author":"1","twitter_card":"summary_large_image","twitter_site":"@_andreaswacker","twitter_misc":{"Written by":"1","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.andreaswacker.com\/blog\/2005\/11\/19\/sar-under-os-x-1043\/#article","isPartOf":{"@id":"https:\/\/www.andreaswacker.com\/blog\/2005\/11\/19\/sar-under-os-x-1043\/"},"author":{"name":"1","@id":"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/691b5221b886b3b09742e476a16e5631"},"headline":"sar under OS X 10.4.3","datePublished":"2005-11-20T00:10:55+00:00","dateModified":"2005-11-20T00:10:55+00:00","mainEntityOfPage":{"@id":"https:\/\/www.andreaswacker.com\/blog\/2005\/11\/19\/sar-under-os-x-1043\/"},"wordCount":213,"publisher":{"@id":"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/c1f46a348eafeb52ee54843dce18442a"},"articleSection":["Apple"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.andreaswacker.com\/blog\/2005\/11\/19\/sar-under-os-x-1043\/","url":"https:\/\/www.andreaswacker.com\/blog\/2005\/11\/19\/sar-under-os-x-1043\/","name":"sar under OS X 10.4.3 - Andreas Wacker","isPartOf":{"@id":"https:\/\/www.andreaswacker.com\/blog\/#website"},"datePublished":"2005-11-20T00:10:55+00:00","dateModified":"2005-11-20T00:10:55+00:00","breadcrumb":{"@id":"https:\/\/www.andreaswacker.com\/blog\/2005\/11\/19\/sar-under-os-x-1043\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.andreaswacker.com\/blog\/2005\/11\/19\/sar-under-os-x-1043\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.andreaswacker.com\/blog\/2005\/11\/19\/sar-under-os-x-1043\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.andreaswacker.com\/blog\/"},{"@type":"ListItem","position":2,"name":"sar under OS X 10.4.3"}]},{"@type":"WebSite","@id":"https:\/\/www.andreaswacker.com\/blog\/#website","url":"https:\/\/www.andreaswacker.com\/blog\/","name":"Andreas Wacker","description":"weblog","publisher":{"@id":"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/c1f46a348eafeb52ee54843dce18442a"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.andreaswacker.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/c1f46a348eafeb52ee54843dce18442a","name":"Andreas Wacker","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/www.andreaswacker.com\/blog\/wp-content\/uploads\/2024\/06\/awfavion.png","contentUrl":"https:\/\/www.andreaswacker.com\/blog\/wp-content\/uploads\/2024\/06\/awfavion.png","width":248,"height":248,"caption":"Andreas Wacker"},"logo":{"@id":"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/www.andreaswacker.com","https:\/\/www.instagram.com\/_andreaswacker\/","https:\/\/x.com\/_andreaswacker","https:\/\/www.youtube.com\/channel\/UCWwFtVC_HATVr-R5EiNmhHw"]},{"@type":"Person","@id":"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/691b5221b886b3b09742e476a16e5631","name":"1","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","caption":"1"},"url":"https:\/\/www.andreaswacker.com\/blog\/author\/1\/"}]}},"_links":{"self":[{"href":"https:\/\/www.andreaswacker.com\/blog\/wp-json\/wp\/v2\/posts\/1321"}],"collection":[{"href":"https:\/\/www.andreaswacker.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.andreaswacker.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.andreaswacker.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.andreaswacker.com\/blog\/wp-json\/wp\/v2\/comments?post=1321"}],"version-history":[{"count":0,"href":"https:\/\/www.andreaswacker.com\/blog\/wp-json\/wp\/v2\/posts\/1321\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.andreaswacker.com\/blog\/wp-json\/wp\/v2\/media?parent=1321"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.andreaswacker.com\/blog\/wp-json\/wp\/v2\/categories?post=1321"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.andreaswacker.com\/blog\/wp-json\/wp\/v2\/tags?post=1321"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}