{"id":881,"date":"2012-01-20T08:41:05","date_gmt":"2012-01-20T08:41:05","guid":{"rendered":"http:\/\/blog.designed79.co.uk\/?p=881"},"modified":"2012-01-20T08:49:27","modified_gmt":"2012-01-20T08:49:27","slug":"track-an-applications-usage-in-mac-os-x-with-opensnoop","status":"publish","type":"post","link":"https:\/\/blog.designed79.co.uk\/?p=881","title":{"rendered":"Track an applications usage in Mac OS X with opensnoop"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" title=\"track mac application usage\" src=\"http:\/\/osxdaily.com\/wp-content\/uploads\/2009\/12\/opensnoop1.JPG\" alt=\"track mac application usage\" width=\"610\" height=\"163\" \/><\/p>\n<p>Using the command line tool \u2018opensnoop\u2019 you can track any\u00a0Mac applications\u00a0(or system process) usage of the file system. This is a very handy tool for administrators and troubleshooting! The simplest way to use it is as follows:<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">sudo opensnoop -n Safari<\/div><\/div>\n<p>You can also track a specific file, and what is accessing it, like so:<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">sudo opensnoop -f \/etc\/hosts<\/div><\/div>\n<p>Tracking\u00a0a specific process is as simple as just specifying the process id:<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">sudo opensnoop -p PID<\/div><\/div>\n<p>opensnoop will keep tracking the file until the process itself is ended, so just hit Control-C in the Terminal to stop opensnoop from running. In case you\u2019re wondering, opensnoop is based on DTrace, a popular UNIX tool.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Using the command line tool \u2018opensnoop\u2019 you can track any\u00a0Mac applications\u00a0(or system process) usage of the file system. This is a very [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-881","post","type-post","status-publish","format-standard","hentry","category-info-on-tech"],"_links":{"self":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/881","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=881"}],"version-history":[{"count":0,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/881\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=881"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=881"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}