{"id":312,"date":"2014-01-21T16:13:56","date_gmt":"2014-01-21T16:13:56","guid":{"rendered":"http:\/\/francisfisher.me.uk\/problem\/?p=312"},"modified":"2014-01-21T16:13:56","modified_gmt":"2014-01-21T16:13:56","slug":"monitoring-several-log-files-in-one-terminal-window-using-screen","status":"publish","type":"post","link":"https:\/\/francisfisher.me.uk\/problem\/2014\/monitoring-several-log-files-in-one-terminal-window-using-screen\/","title":{"rendered":"Monitoring several log files in one terminal window using screen"},"content":{"rendered":"<p>When debugging website problems I often run tail on \/var\/log\/apache2\/error.log or on \/var\/log\/apache2\/access.log. Today I needed to monitor both at the same time. One solution is to open two terminal windows, however this uses up valuable entries in the alt-tab list. A better solution for this purpose was to create two windows with the screen utility.<\/p>\n<p>There are 3 key commands to use:<\/p>\n<ul>\n<li>\"Ctrl-a |\" which splits the screen into two windows<\/li>\n<li>\"Ctrl-a &lt;tab&gt;\" which sends focus to the next window<\/li>\n<li>\"Ctrl-a c\" which opens a new shell in the current window<\/li>\n<\/ul>\n<p>So after running screen, I ran<br \/>\n<code>tail -f \/var\/log\/apache2\/error.log<\/code><br \/>\nI then pressed \"Ctrl-a\" followed by \"|\" (after releasing the control key) to split the window, \"Ctrl-a\" followed by tab to switch focus into the window I just created, \"Ctrl-a\" followed by \"c\" to start a new shell, and finally:<br \/>\n<code>tail -f \/var\/log\/apache2\/access.log<\/code><\/p>\n<p><a href=\"http:\/\/francisfisher.me.uk\/problem\/wp-content\/uploads\/2014\/01\/Screenshot-from-2014-01-21-161215.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-medium wp-image-313\" alt=\"Split screen monitoring\" src=\"http:\/\/francisfisher.me.uk\/problem\/wp-content\/uploads\/2014\/01\/Screenshot-from-2014-01-21-161215-300x180.png\" width=\"300\" height=\"180\" srcset=\"https:\/\/francisfisher.me.uk\/problem\/wp-content\/uploads\/2014\/01\/Screenshot-from-2014-01-21-161215-300x180.png 300w, https:\/\/francisfisher.me.uk\/problem\/wp-content\/uploads\/2014\/01\/Screenshot-from-2014-01-21-161215-1024x616.png 1024w, https:\/\/francisfisher.me.uk\/problem\/wp-content\/uploads\/2014\/01\/Screenshot-from-2014-01-21-161215.png 1280w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When debugging website problems I often run tail on \/var\/log\/apache2\/error.log or on \/var\/log\/apache2\/access.log. Today I needed to monitor both at the same time. One solution is to open two terminal windows, however this uses up valuable entries in the alt-tab list. A better solution for this purpose was to create two windows with the screen [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/francisfisher.me.uk\/problem\/wp-json\/wp\/v2\/posts\/312"}],"collection":[{"href":"https:\/\/francisfisher.me.uk\/problem\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/francisfisher.me.uk\/problem\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/francisfisher.me.uk\/problem\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/francisfisher.me.uk\/problem\/wp-json\/wp\/v2\/comments?post=312"}],"version-history":[{"count":1,"href":"https:\/\/francisfisher.me.uk\/problem\/wp-json\/wp\/v2\/posts\/312\/revisions"}],"predecessor-version":[{"id":314,"href":"https:\/\/francisfisher.me.uk\/problem\/wp-json\/wp\/v2\/posts\/312\/revisions\/314"}],"wp:attachment":[{"href":"https:\/\/francisfisher.me.uk\/problem\/wp-json\/wp\/v2\/media?parent=312"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/francisfisher.me.uk\/problem\/wp-json\/wp\/v2\/categories?post=312"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/francisfisher.me.uk\/problem\/wp-json\/wp\/v2\/tags?post=312"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}