{"id":740,"date":"2009-07-28T06:52:10","date_gmt":"2009-07-27T20:52:10","guid":{"rendered":"http:\/\/nsrd.wordpress.com\/?p=740"},"modified":"2018-12-12T15:54:32","modified_gmt":"2018-12-12T05:54:32","slug":"basics-realtime-rendered-logs-and-other-log-options","status":"publish","type":"post","link":"https:\/\/nsrd.info\/blog\/2009\/07\/28\/basics-realtime-rendered-logs-and-other-log-options\/","title":{"rendered":"Basics \u2013 Realtime rendered logs and other log options"},"content":{"rendered":"<p>NetWorker 7.4 saw the introduction of language-neutral logs \u2013 raw logs, if you will, in the form of changing <em>daemon.log<\/em> to <em>daemon.raw<\/em>. The primary purpose behind this change was to allow customers using one language pack to send a language-neutral log to a support engineer who could then render it locally in a language they could understand.<\/p>\n<p>Many have expressed a dislike for the raw log format \u2013 personally it doesn&#8217;t bother me, because for the most part I work in Unix environments, so commands to extract only portions of the log either before or after rendering are only a few keystrokes away at any time, and well, I&#8217;m a command line person \ud83d\ude42<\/p>\n<p>There is a facility in NetWorker though to turn on what is referred to as a &#8220;realtime rendered log&#8221;. One catch: <em>don&#8217;t<\/em> submit the realtime rendered log to your support provider and <em>don&#8217;t<\/em> rely exclusively on it. In some instances, it&#8217;s known that messages may be dropped from the realtime rendered log that <em>would<\/em> be reported if running a manual <em>nsr_render_log<\/em> against the daemon.raw file.<\/p>\n<p>To setup realtime log rendering, you need to run up nsradmin against the <em>client<\/em> daemon \u2013 either on the NetWorker server or another machine. For example:<\/p>\n<pre>[root@nimrod ~]# nsradmin -p 390113 -s nimrod\nNetWorker administration program.\nUse the \"help\" command for help, \"visual\" for full-screen mode.\nnsradmin&gt; print type: NSR log\n                        type: NSR log;\n               administrator: \"isroot,host=nox\",\n                              \"user=root,host=localhost\",\n                              \"user=root,host=nimrod\";\n                       owner: NMC Log File;\n             maximum size MB: 2;\n            maximum versions: 10;\n        runtime rendered log: ;\n                        name: gstd.raw;\n                    log path: \/opt\/lgtonmc\/logs\/gstd.raw;\n\n                        type: NSR log;\n               administrator: \"isroot,host=nox\",\n                              \"user=root,host=localhost\",\n                              \"user=root,host=nimrod\";\n                      owner: NetWorker;\n            maximum size MB: 2;\n           maximum versions: 10;\n       runtime rendered log: ;\n                       name: daemon.raw;\n                   log path: \/nsr\/logs\/daemon.raw;<\/pre>\n<p>Here, we have two different log entries \u2013 one for NMC and one for NetWorker. If we wanted to just change the NetWorker one, we&#8217;d restrict our selection thusly:<\/p>\n<pre>nsradmin&gt; print type: NSR log; name: daemon.raw\n                        type: NSR log;\n               administrator: \"isroot,host=nox\",\n                              \"user=root,host=localhost\",\n                              \"user=root,host=nimrod\";\n                       owner: NetWorker;\n             maximum size MB: 2;\n            maximum versions: 10;\n        runtime rendered log: ;\n                        name: daemon.raw;\n                    log path: \/nsr\/logs\/daemon.raw;<\/pre>\n<p>To update the log setting to generate a rendered log in realtime, all one would have to do is issue the following command:<\/p>\n<pre>nsradmin&gt; update runtime rendered log: \/nsr\/logs\/daemon.log\n        runtime rendered log: \/nsr\/logs\/daemon.log;\nUpdate? y<\/pre>\n<p>To have any change you make here take effect, you need to stop and restart NetWorker.<\/p>\n<p>However, that&#8217;s not all you can do here \u2013 look at some of those other settings. In particular, &#8220;maximum size MB&#8221; and &#8220;maximum versions&#8221;. Personally I think maximum versions is already at a good value \u2013 that will keep 10 older copies of the daemon.raw file. (I <strong>strongly advocate<\/strong> keeping older copies of log files and ensuring their backups are kept for the lifetime of any backups you may wish to recover from. That way if you have any recovery issues you can, if necessary, recover the server logs from the time the backup was generated.)<\/p>\n<p>The most interesting setting for me is the <em>maximum size MB<\/em>. The process for NetWorker starting a new daemon.raw file works as follows: IF NetWorker is restarted AND the daemon.raw curently exceeds the <em>maximum size MB<\/em> THEN rename the existing daemon.raw file AND start a new one.<\/p>\n<p>In the dim dark days of system capacity allocation where asking for a 2GB drive for a backup server was about as well received as asking the board of directors for their cars so you could host your own demolition derby, a maximum log file size of 2MB was seemingly appropriate.<\/p>\n<p>These days I think it&#8217;s too low. Now there&#8217;s a balancing act here, particularly when you take email and file uploads into consideration. I wouldn&#8217;t make it <em>too<\/em> big, but I would make it bigger \u2013 e.g., 10 MB. Reason? Say you have a problem overnight that causes you to restart your NetWorker server and log a case with your support provider. The first thing they&#8217;ll ask you to do is send through your <em>daemon.raw<\/em>; however, in a lot of restart scenarios where issues have occurred, your log file will have grown big enough to require being recreated, so you have to remember to send <em>both<\/em>. Increasing the default log file size doesn&#8217;t <em>guarantee<\/em> avoiding this, but it does help to ameliorate the possibility.<\/p>\n<p>For convenience then, if you&#8217;re going to make the above changes with your log rendering options, I&#8217;d also suggest considering increasing the maximum size to at least 5 MB or even 10 MB. (Given file compresability, this shouldn&#8217;t pose a problem.)<\/p>\n<p>To do this, you&#8217;d enter the command:<\/p>\n<pre>nsradmin&gt; update maximum size MB: 10\n             maximum size MB: 10;\nUpdate? y<\/pre>\n<p>Again, if making changes here you need to restart the NetWorker services for them to take effect.<\/p>\n<p><strong>NOTE<\/strong>: Windows users will need to type paths for the rendered logs with double-backslashes, and in double-quotes. For instance, assuming a default installation location, the path issued might be:<\/p>\n<pre>nsradmin&gt; update realtime rendered log:&nbsp;\n\"C:\\Program Files\\Legato\\nsr\\logs\\daemon.log\"<\/pre>\n<p>Of course, since changes to this affect logging, which in turn affects the ability to diagnose or monitor the backup system, I strongly urge you to <em>confirm following the changes that logging is working<\/em>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>NetWorker 7.4 saw the introduction of language-neutral logs \u2013 raw logs, if you will, in the form of changing daemon.log&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[6,16],"tags":[267,268,549,785],"class_list":["post-740","post","type-post","status-publish","format-standard","hentry","category-basics","category-networker","tag-daemon-log","tag-daemon-raw","tag-log-size","tag-realtime-rendered-log"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pKpIN-bW","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/740","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/comments?post=740"}],"version-history":[{"count":1,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/740\/revisions"}],"predecessor-version":[{"id":7631,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/740\/revisions\/7631"}],"wp:attachment":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/media?parent=740"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/categories?post=740"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/tags?post=740"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}