{"id":339,"date":"2013-09-06T09:03:21","date_gmt":"2013-09-06T08:03:21","guid":{"rendered":"http:\/\/www.nax.cz\/?p=339"},"modified":"2013-09-06T09:03:21","modified_gmt":"2013-09-06T08:03:21","slug":"weblogic-servername-out-log-rotation","status":"publish","type":"post","link":"https:\/\/nax.cz\/?p=339","title":{"rendered":"weblogic SERVERNAME.out log rotation"},"content":{"rendered":"<p>Yesterday, there was a problem on one of the dev weblogic servers I am managing. It simply run out of space. The reason was, that log file in $WEBLOGIC_DOMAIN\/servers\/logs\/$MANAGEDSERVER.out grew until it filled up all the disk space. It was obvious that I need to setup some logrotate solution.<\/p>\n<p>This particular log is created by nodemanager which redirects stdout of a managed server to that file. There is no configuration of this in gui what so ever. You can find lot o posts like <a href=\"http:\/\/srikanth-myjavaj2eeblog.blogspot.de\/2011\/12\/servernameout-file-in-weblogic.html\">this one<\/a> which suggests to use cron to call logrotate unix utility. That works fine, but it is not very elegant solution. I just add, that if you don&#8217;t have root permission on the host, you can setup crontab specific for a user like this:<br \/>\n<code><br \/>\n$ crontab -e<br \/>\n00 * * * * \/usr\/sbin\/logrotate -s \/tmp\/nodemanager_loglotate_status \/opt\/weblogic\/wls\/nodemanager\/logrotate.conf<br \/>\n<\/code><\/p>\n<p>There seems to be a better approach &#8211; <a href=\"http:\/\/docs.oracle.com\/middleware\/1212\/wls\/NODEM\/overview.htm#NODEM154\">directly configure log rotation in nodemanager.properties<\/a>:<\/p>\n<p><code><br \/>\n$ cat nodemanager.properties<br \/>\n...<br \/>\n# managed1.out log rotation<br \/>\nRotationType=SIZE<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yesterday, there was a problem on one of the dev weblogic servers I am managing. It simply run out of space. The reason was, that log file in $WEBLOGIC_DOMAIN\/servers\/logs\/$MANAGEDSERVER.out grew until it filled up all the disk space. It was obvious that I need to setup some logrotate solution. This particular log is created by [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[],"class_list":["post-339","post","type-post","status-publish","format-standard","hentry","category-weblogic"],"_links":{"self":[{"href":"https:\/\/nax.cz\/index.php?rest_route=\/wp\/v2\/posts\/339","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nax.cz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nax.cz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nax.cz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nax.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=339"}],"version-history":[{"count":0,"href":"https:\/\/nax.cz\/index.php?rest_route=\/wp\/v2\/posts\/339\/revisions"}],"wp:attachment":[{"href":"https:\/\/nax.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=339"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nax.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=339"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nax.cz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=339"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}