{"id":2934,"date":"2014-03-27T00:06:32","date_gmt":"2014-03-26T16:06:32","guid":{"rendered":"http:\/\/rmohan.com\/?p=2934"},"modified":"2014-03-27T00:06:32","modified_gmt":"2014-03-26T16:06:32","slug":"ibm-ihs-rotate-logs","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=2934","title":{"rendered":"IBM Ihs rotate logs"},"content":{"rendered":"<p>httpd.conf<\/p>\n<p>CustomLog &#8220;|\/opt\/IBM\/HTTPServer\/bin\/rotatelogs -l \/opt\/IBM\/HTTPServer\/logs\/access_log.%Y-%m-%d-%H_%M_%S 86400&#8221; common<\/p>\n<p>ErrorLog &#8220;|\/opt\/IBM\/HTTPServer\/bin\/rotatelogs -l \/opt\/IBM\/HTTPServer\/logs\/error_log.%Y-%m-%d-%H_%M_%S 86400&#8221;<\/p>\n<p>ErrorLog \/usr\/IBMHttpServer\/logs\/error_log<br \/>\nErrorLog &#8220;|\/usr\/IBMHttpServer\/bin\/rotatelogs<br \/>\n\/data\/httparch\/error_log.%d-%b-%Y-%H-%M 86400 -360&#8221;<\/p>\n<p>#<br \/>\n# LogLevel: Control the number of messages logged to the error_log.<br \/>\n# Possible values include: debug, info, notice, warn, error, crit,<br \/>\n# alert, emerg.<br \/>\n#<br \/>\nLogLevel debug<\/p>\n<p>#<br \/>\n# The following directives define some format nicknames for use with<br \/>\n# a CustomLog directive (see below).<br \/>\n#<br \/>\nLogFormat &#8220;%h %l %u %t \\&#8221;%r\\&#8221; %&gt;s %b \\&#8221;%{Referer}i\\&#8221; \\&#8221;%{User-Agent}i\\&#8221;&#8221;<br \/>\ncombined<br \/>\nLogFormat &#8220;%h %l %u %t \\&#8221;%r\\&#8221; %&gt;s %b&#8221; common<br \/>\nLogFormat &#8220;%{Referer}i -&gt; %U&#8221; referer<br \/>\nLogFormat &#8220;%{User-agent}i&#8221; agent<\/p>\n<p>#<br \/>\n# The location and format of the access logfile (Common Logfile Format).<br \/>\n# If you do not define any access logfiles within a<br \/>\n# container, they will be logged here. Contrariwise, if you *do*<br \/>\n# define per-\u00a0access logfiles, transactions will be<br \/>\n# logged therein and *not* in this file.<br \/>\n#<br \/>\nCustomLog \/usr\/IBMHttpServer\/logs\/access_log common<br \/>\nCustomLog &#8220;|\/usr\/IBMHttpServer\/bin\/rotatelogs<br \/>\n\/data\/httparch\/access_log.%d-%b-%Y-%H-%M 86400 -360&#8221; common<\/p>\n<p>The piped portions should be on one line, it seems the post cut the line<br \/>\nin half.<\/p>\n<p>access_log works correctly, appending to the access_log and piping to an<br \/>\naccess_log in a different location everyday starting at midnight. So I<br \/>\nhave a daily access_log\u00a0<a id=\"KonaLink3\" href=\"http:\/\/fixunix.com\/websphere\/210372-rotate-logs.html#\" target=\"undefined\">file<\/a>\u00a0and one big access_log file.<\/p>\n<p>error_log on the other hand. What it does is create the daily log, but<br \/>\ndoes not append to the regular error_log. Since I implemented this, the<br \/>\nlarge error_log has not been written to, but the daily logs are created.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>httpd.conf<\/p>\n<p>CustomLog &#8220;|\/opt\/IBM\/HTTPServer\/bin\/rotatelogs -l \/opt\/IBM\/HTTPServer\/logs\/access_log.%Y-%m-%d-%H_%M_%S 86400&#8221; common<\/p>\n<p>ErrorLog &#8220;|\/opt\/IBM\/HTTPServer\/bin\/rotatelogs -l \/opt\/IBM\/HTTPServer\/logs\/error_log.%Y-%m-%d-%H_%M_%S 86400&#8221;<\/p>\n<p>ErrorLog \/usr\/IBMHttpServer\/logs\/error_log ErrorLog &#8220;|\/usr\/IBMHttpServer\/bin\/rotatelogs \/data\/httparch\/error_log.%d-%b-%Y-%H-%M 86400 -360&#8221;<\/p>\n<p># # LogLevel: Control the number of messages logged to the error_log. # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. # LogLevel debug<\/p>\n<p># # The following directives define some format [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2934"}],"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=2934"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2934\/revisions"}],"predecessor-version":[{"id":2935,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2934\/revisions\/2935"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2934"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2934"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2934"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}