{"id":625,"date":"2013-11-09T21:33:02","date_gmt":"2013-11-10T03:33:02","guid":{"rendered":"http:\/\/vostorga.org\/?p=625"},"modified":"2013-11-09T21:33:02","modified_gmt":"2013-11-10T03:33:02","slug":"seeing-what-is-being-written-or-read-in-real-time-in-linux","status":"publish","type":"post","link":"https:\/\/vostorga.org\/?p=625","title":{"rendered":"Seeing what is being written or read in real time in Linux"},"content":{"rendered":"<p>Have you ever wondered which processes\/tasks write or read to disk in Linux?\u00a0 Maybe a real time log?<\/p>\n<p>It&#8217;s quite simple to enable that feature with the following command:<\/p>\n<blockquote><p>echo 1 &gt;\/proc\/sys\/vm\/block_dump<\/p><\/blockquote>\n<p>The output of the command goes to \/var\/log\/messages or \/var\/log\/kernel.log . It depends on the distribution you are using and how your log manager is configured.<\/p>\n<blockquote><p><em>Nov\u00a0 9 21:21:01 hellboy kernel: [140072.428410] bash(31632): READ block 14156776 on md126p4 (8 sectors)<\/em><br \/>\n<em> Nov\u00a0 9 21:21:01 hellboy kernel: [140072.443138] bash(31632): READ block 14156816 on md126p4 (8 sectors)<\/em><br \/>\n<em> Nov\u00a0 9 21:21:57 hellboy kernel: [140127.746763] gnome-shell(5073): WRITE block 120375776 on md126p4 (8 sectors)<\/em><br \/>\n<em> Nov\u00a0 9 21:21:57 hellboy kernel: [140127.765385] gnome-shell(5073): dirtied inode 3627285 (?) on md126p4<\/em><br \/>\n<em> Nov\u00a0 9 21:22:00 hellboy kernel: [140130.602614] nvidia-settings(31743): dirtied inode 689070 (exe) on proc<\/em><\/p><\/blockquote>\n<p>The output shows the timestamp, the process name, the operation being done (read\/write\/dirty inode), block or inode number and the device.<\/p>\n<p>Just to take note, a dirty inode is an inode that has had new data written into it but it has not been flushed to disk.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Have you ever wondered which processes\/tasks write or read to disk in Linux?\u00a0 Maybe a real time log? It&#8217;s quite simple to enable that feature with the following command: echo 1 &gt;\/proc\/sys\/vm\/block_dump The output of the command goes to \/var\/log\/messages or \/var\/log\/kernel.log . It depends on the distribution you are using and how your log [&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-625","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/vostorga.org\/index.php?rest_route=\/wp\/v2\/posts\/625"}],"collection":[{"href":"https:\/\/vostorga.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vostorga.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vostorga.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/vostorga.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=625"}],"version-history":[{"count":1,"href":"https:\/\/vostorga.org\/index.php?rest_route=\/wp\/v2\/posts\/625\/revisions"}],"predecessor-version":[{"id":626,"href":"https:\/\/vostorga.org\/index.php?rest_route=\/wp\/v2\/posts\/625\/revisions\/626"}],"wp:attachment":[{"href":"https:\/\/vostorga.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=625"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vostorga.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=625"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vostorga.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=625"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}