<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=2710&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / Log file reading issues]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=2710</link>
		<description><![CDATA[The most recent posts in Log file reading issues.]]></description>
		<lastBuildDate>Thu, 07 Mar 2019 16:08:32 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: Log file reading issues]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=14682#p14682</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>dxrobertson wrote:</cite><blockquote><div><p>... exactly why the text editors are having trouble reading the log file.</p></div></blockquote></div><p>I see ...</p><div class="quotebox"><cite>dxrobertson wrote:</cite><blockquote><div><p>...&#160; x00 is whats called the string terminating character, it defines the end of a string of text.</p></div></blockquote></div><p>Sort of like the CR that&#039;s important to have in sudoers.d filers, else <span class="bbc">visudo.c</span> will complain?</p><div class="quotebox"><cite>dxrobertson wrote:</cite><blockquote><div><p> ... it encounters the x00 and stops displaying text.</p></div></blockquote></div><p>Seems a better (more reasonable) behaviour than Pluma.&#160; </p><div class="quotebox"><cite>dxrobertson wrote:</cite><blockquote><div><p>Another good text editor as well as very useful all around tool is mc.</p></div></blockquote></div><p>Midnight Commander?<br />Memories of the trusty NC under DOS come to mind. =-)</p><p>Thanks for the heads-up, I&#039;ll give it a try - didn&#039;t know it was available for Linux .</p><p>There&#039;s quite a bit of text editors for Linux out there but I find that, if you&#039;re not a programmer (my case), they (as well as hex editors) tend to be a bit too much.</p><div class="quotebox"><cite>dxrobertson wrote:</cite><blockquote><div><p>... x00 being in the log file was definitely caused by the ungraceful shutdown ...</p></div></blockquote></div><p>Indeed ...</p><p>To try, I added a second <span class="bbc">s</span> to the script to test.</p><div class="codebox"><pre><code>#!/bin/sh
# Shutdown system without the use of shutdownhelper 
#
PATH=/sbin:/bin:/usr/sbin:/usr/bin:
for i in s u s o; do echo $i | sudo tee /proc/sysrq-trigger; sleep 2; done  # halt</code></pre></div><p>The first time I tried it, I got the freeze+fans act for the first time using this script.<br />Obviously, right before/coincidentally with the shutdown ie: <span class="bbc">o</span>:</p><div class="codebox"><pre><code>s
u
sudo: unable to open log file: /var/log/sudo.log: read only file system
s
sudo: unable to open log file: /var/log/sudo.log: read only file system</code></pre></div><p>... and the fan at full blast.</p><div class="quotebox"><cite>dxrobertson wrote:</cite><blockquote><div><p>Sorry, I cant help much ...</p></div></blockquote></div><p>It&#039;s all right, you have been very helpful.&#160; =-)</p><div class="quotebox"><cite>dxrobertson wrote:</cite><blockquote><div><p> ... since it seems to be ethernet, did you try disabling wake on lan?</p></div></blockquote></div><p>I used to think it was <em>all</em> ethernet (the problematic on board e1000e) related.<br />But no.</p><p>Once I managed to get WoL disabled, the reboot after shutdown was solved (it was part one of a two part shutdown problem). </p><p>WoL <em>is</em> disabled, gave me a hard time to get that done as there&#039;s no BIOS option for the in the Ultra 24 and the DOS utility Intel says you MUST use to disable WoL does not disable it permanently as ethtool can enable it again from within Linux, so I added a script to <span class="bbc">/etc/networks/interfaces</span> to try to keep it disabled.</p><div class="codebox"><pre><code>  post-up /sbin/ethtool -s eth0 wol d
  post-down /sbin/ethtool -s eth0 wol d</code></pre></div><p>So why the MUST use the DOS utility if it does not disable WoL in the BIOS or the controller EEPROM? Go figure ...<br />In any case, Intel tech support for the e1000e was absolutely useless.</p><p>The thing is that with WoL and EEE=0 disabled the problem is still there.&#160; &#160;8-/</p><p>Thank you very much for your help.</p><p>Best,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Thu, 07 Mar 2019 16:08:32 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=14682#p14682</guid>
		</item>
		<item>
			<title><![CDATA[Re: Log file reading issues]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=14679#p14679</link>
			<description><![CDATA[<div class="quotebox"><cite>Altoid wrote:</cite><blockquote><div><p>On the hexadecimal view pane, these <span class="bbc"> ..................</span> are represented as sets of zeroes sepatated by a space just like the rest of the hex strings.</p><p>ie: <span class="bbc">0000 0000 0000 0000</span>&#160; &#160; </p><p>These strings are identified as hexadecimal 00, octal 000, binary 00000000.</p></div></blockquote></div><p>OK, thats exactly why the text editors are having trouble reading the log file.&#160; x00 is whats called the string terminating character, it defines the end of a string of text.&#160; Leafpad is doing its job; it encounters the x00 and stops displaying text.&#160; Pluma appears to be too anal; seems to be scanning the file for invalid text before displaying anything.&#160; </p><p>Another good text editor as well as very useful all around tool is mc.&#160; It will display ALL of the text, including non-text, and its internal editor allows you to modify the non-text characters.&#160; Very useful.</p><p>The x00 being in the log file was definitely caused by the ungraceful shutdown, this often happens.</p><p>Sorry, I cant help much with the actual hardware problem nor with more shutdown info.&#160; A long shot, since it seems to be ethernet, did you try disabling wake on lan?</p>]]></description>
			<author><![CDATA[dummy@example.com (dxrobertson)]]></author>
			<pubDate>Thu, 07 Mar 2019 15:07:39 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=14679#p14679</guid>
		</item>
		<item>
			<title><![CDATA[Re: Log file reading issues]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=14678#p14678</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>dxrobertson wrote:</cite><blockquote><div><p>... caused by ascii &quot;non-text&quot; codes being in the text log file.<br />...&#160; text terminating x00 null byte.</p></div></blockquote></div><p>I see ...</p><div class="quotebox"><cite>dxrobertson wrote:</cite><blockquote><div><p>Leafpad is very susceptible to this.</p></div></blockquote></div><p>Pluma even more so, as it does not show me <em>anything</em> and then <em>complains</em> when I attempt to open the file.&#160; =-)<br />On the other hand, Leafpad just refuses to show me the offending &quot;non text&quot;.</p><p>I&#039;m glad this is not a Leafpad issue as I like it better than Pluma, can&#039;t say why.</p><div class="quotebox"><cite>dxrobertson wrote:</cite><blockquote><div><p>... install a hex editor such as hexedit ...<br />... view exactly the base ascii codes and thus whats causing the problem.</p></div></blockquote></div><p>I installed GHex 3.18.3 and found that between this string:</p><div class="codebox"><pre><code>Mar  4 15:42:46 devuan kernel: [  576.219397] EXT4-fs (sdb1): re-mounted. Opts: (null)</code></pre></div><p>... and this string:</p><div class="codebox"><pre><code>Mar  4 15:45:07 devuan liblogging-stdlog:  [origin software=&quot;rsyslogd&quot; swVersion=&quot;8.24.0&quot; x-pid=&quot;1977&quot; x-info=&quot;http://www.rsyslog.com&quot;] start</code></pre></div><p>... there is a long string of <span class="bbc"> ..................</span> which for some reason the editor would not copy into the clipboard.</p><p>On the hexadecimal view pane, these <span class="bbc"> ..................</span> are represented as sets of zeroes sepatated by a space just like the rest of the hex strings.</p><p>ie: <span class="bbc">0000 0000 0000 0000</span>&#160; &#160; </p><p>These strings are identified as hexadecimal 00, octal 000, binary 00000000.</p><div class="quotebox"><cite>dxrobertson wrote:</cite><blockquote><div><p>...&#160; the #### stuff is at (prior to) a reboot?</p></div></blockquote></div><p>Yes.</p><div class="codebox"><pre><code>Mar  4 15:42:40 devuan kernel: [  570.124482] sysrq: SysRq : Emergency Sync
Mar  4 15:42:40 devuan kernel: [  570.155699] Emergency Sync complete
Mar  4 15:42:46 devuan kernel: [  576.133524] sysrq: SysRq : Emergency Remount R/O
Mar  4 15:42:46 devuan kernel: [  576.219397] EXT4-fs (sdb1): re-mounted. Opts: (null)</code></pre></div><div class="quotebox"><cite>dxrobertson wrote:</cite><blockquote><div><p>... system halt ungracefully prior to a reboot?</p></div></blockquote></div><p>Apparently so, I thought it would not happen because the script includes a previous disk sync and unmount/remount as RO. <br />Evidently I&#039;m mistaken and yet another sync maybe needed after the <span class="bbc">u</span>.</p><p>Some background to this: <br />At present I&#039;m attempting to solve a shutdown issue I have with my Ultra 24 WS.</p><p>The issue is basically this:</p><p>---<br />On shutdown, the rig will do one of two things:</p><p>1. shut down properly<br />2. freeze during the shutdown at this point ...</p><div class="codebox"><pre><code>e1000e: EEE Tx LPI Timer
Preparing to enter sleep state S5
Reboot: Power Down</code></pre></div><p>... with the fans blowing at full speed.<br />--- </p><p>This shutdown problem ocurrs in a totally unpredictable manner, I have not been able to reproduce it or been able to link it to anything in particular. </p><p>Unfortunately, unloading the e1000e driver module before shutdown (a well known issue) or inserting a variety of <span class="bbc">reboot=</span> stanzas in the kernel command line have not worked, even when using <span class="bbc">reboot=force</span>.</p><p>Eventually, it would happen again.</p><p>To try to see what was going on, I decided to try shutting down the rig using a script that would (hopefully) isolate each of the stages of the shut down process and give me some feedback, much like I did in my old MS-DOS days by running config.sys and autoexec.bat in steps to weed out start-up issues:</p><div class="codebox"><pre><code>#!/bin/sh
# Shutdown system without the use of shutdownhelper 
#
PATH=/sbin:/bin:/usr/sbin:/usr/bin:
for i in s u o; do echo $i | sudo tee /proc/sysrq-trigger; sleep 2; done  # halt</code></pre></div><p>I think that what we are seeing is the <em>same</em> shutdown problem which does not manifest itself in the same manner as when a normal shutdown command is issued.<br />This because of the <span class="bbc">o</span> in the script directly powers off the system. ie: does not give it a chance to freeze and start blowing fans.</p><div class="quotebox"><blockquote><div><p>... then something else has caused problems; there should not be non-text ascii in the log files.</p></div></blockquote></div><p>I&#039;ll try adding a second sync and see what happens.</p><p>In the meanwhile, do you know a better way to see what is going on during the shutdown process?</p><p>The unmount/mount RO and the sync in the script I cobbled up seem to go ahead without any issues.<br />It would seem that it&#039;s just the shutdown part that is acting up.</p><p>Thanks in advance,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Thu, 07 Mar 2019 13:57:51 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=14678#p14678</guid>
		</item>
		<item>
			<title><![CDATA[Re: Log file reading issues]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=14669#p14669</link>
			<description><![CDATA[<p>This can be caused by ascii &quot;non-text&quot; codes being in the text log file. Often times a text terminating x00 null byte.&#160; Leafpad is very susceptible to this. If you install a hex editor such as hexedit, you can open the log file in it and view exactly the base ascii codes and thus whats causing the problem.</p><p>Could it be that the #### stuff is at (prior to) a reboot?&#160; Did your system halt ungracefully prior to a reboot?&#160; This can cause non-text ascii codes to be written to the log file.</p><p>If you did not have a system abend around this time, then something else has caused problems; there should not be non-text ascii in the log files.</p>]]></description>
			<author><![CDATA[dummy@example.com (dxrobertson)]]></author>
			<pubDate>Wed, 06 Mar 2019 23:24:15 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=14669#p14669</guid>
		</item>
		<item>
			<title><![CDATA[Log file reading issues]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=14667#p14667</link>
			<description><![CDATA[<p>Hello:</p><p>I seem to have an issue with some of the log files in /var/log.</p><p>The affected files are: syslog, messages, kern.log, slim.log and sudo.log.<br />On a previous oportunity, slim.log was not affected.</p><p>My usual way of looking at logfiles is on the terminal with cat ot tail, but every so often I will want to look at them with a text editor such as Pluma or Leafpad.</p><p>The problem at hand is that Pluma will not open them and show a popup with an error.<br />With Leafpad I could open them and see them up to a point.</p><p>ie:<br />While I could see the whole contents of the file in terminal, Leafpad would only show me the part up to where whatever error happened.</p><p>This is the error I get in Pluma:</p><p>---</p><p>Could not open the file /var/log/slim.log.<br />pluma has not been able to detect the character encoding.<br />Please check that you are not trying to open a binary file.<br />Select a character encoding from the menu and try again.</p><p>---</p><p>The available encoding options are:</p><p>&#160; &#160; Automatically Detected<br />&#160; &#160; Unicode (UTF-8)<br />&#160; &#160; Current Locale (ANSI_X3.4-1968)<br />&#160; &#160; Western ISO-8859-15</p><p>The same problem occurs with any of the options.</p><p>With Leafpad I could open the log files and see them up to a&#160; a certain point/line ie: the moment in time where whatever error happened.<br />From then on, nothing was recorded on the file and the only way to see the entire content was via the terminal.</p><p>Pluma will not open a *.txt file created via cat on the terminal either but LibreOffice Writer will open it.</p><div class="codebox"><pre><code>groucho@devuan:~$ cat /var/log/syslog &gt; syslog.txt</code></pre></div><p>I can browse through the whole file.<br />The only strange thing I found when I opened it with Writer was this ...</p><p>---</p><p>Mar&#160; 4 15:42:40 devuan kernel: [&#160; 570.124482] sysrq: SysRq : Emergency Sync<br />Mar&#160; 4 15:42:40 devuan kernel: [&#160; 570.155699] Emergency Sync complete<br />Mar&#160; 4 15:42:46 devuan kernel: [&#160; 576.133524] sysrq: SysRq : Emergency Remount R/O<br />Mar&#160; 4 15:42:46 devuan kernel: [&#160; 576.219397] EXT4-fs (sdb1): re-mounted. Opts: (null)<br />#######################################################################################Mar&#160; 4 15:45:07 devuan liblogging-stdlog:&#160; [origin software=&quot;rsyslogd&quot; swVersion=&quot;8.24.0&quot; x-pid=&quot;1977&quot; x-info=&quot;http://www.rsyslog.com&quot;] start<br />Mar&#160; 4 15:45:07 devuan kernel: [&#160; &#160; 0.000000] Linux version 4.9.0-8-amd64 (debian-kernel@lists.debian.org) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) ) #1 SMP Debian 4.9.144-3.1 (2019-02-19)</p><p>---</p><p>... which on the terminal is seen in this manner:</p><div class="codebox"><pre><code>Mar  4 15:42:40 devuan kernel: [  570.124482] sysrq: SysRq : Emergency Sync
Mar  4 15:42:40 devuan kernel: [  570.155699] Emergency Sync complete
Mar  4 15:42:46 devuan kernel: [  576.133524] sysrq: SysRq : Emergency Remount R/O
Mar  4 15:42:46 devuan kernel: [  576.219397] EXT4-fs (sdb1): re-mounted. Opts: (null)
Mar  4 15:45:07 devuan liblogging-stdlog:  [origin software=&quot;rsyslogd&quot; swVersion=&quot;8.24.0&quot; x-pid=&quot;1977&quot; x-info=&quot;http://www.rsyslog.com&quot;] start
Mar  4 15:45:07 devuan kernel: [    0.000000] Linux version 4.9.0-8-amd64 (debian-kernel@lists.debian.org) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) ) #1 SMP Debian 4.9.144-3.1 (2019-02-19)</code></pre></div><p>Seems the difference is the string of ###.<br />This string was the point up to which Leafpad would show the file&#039;s content, something Pluma won&#039;t do.</p><p>It would seem that the system is writing something to the log files that for some reason a text editor cannot read and (Leafpad at least) probably cannot save, which is why it stops showing anything from that point on.</p><p>Any idea as to what the system could be writing?</p><p>Thanks in advance.</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Wed, 06 Mar 2019 21:23:33 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=14667#p14667</guid>
		</item>
	</channel>
</rss>
