Re: [gentoo-user] Syslog-ng is writing binary

2014-12-28 Thread Stroller

On Sat, 27 December 2014, at 1:45 pm, Peter Humphrey pe...@prh.myzen.co.uk 
wrote:

 On Saturday 27 December 2014 13:10:17 Helmut Jarausch wrote:
 
 I think this was a long standig bug. Version 3.6.2 seems to have fixed
 this.
 
 Ah. Well I'm still on 3.4.8.
 
 Mick, if you don't hear anything from me soonish, it will be safe to remove 
 the binary stuff using the method I mentioned.

If this is bug 406623 then you can remove the spurious binary characters with 
vim.

There are also instructions there on changing your syslogng.conf so they're not 
produced.

However, I'm not sure that this *is* bug 406623, as there seem to be more lines 
of cr@p produced in Mick's log than I recollect.

Stroller.


Re: [gentoo-user] Syslog-ng is writing binary

2014-12-28 Thread Peter Humphrey
On Sunday 28 December 2014 13:32:00 Stroller wrote:
 On Sat, 27 December 2014, at 1:45 pm, Peter Humphrey 
pe...@prh.myzen.co.uk wrote:
  On Saturday 27 December 2014 13:10:17 Helmut Jarausch wrote:
  I think this was a long standig bug. Version 3.6.2 seems to have fixed
  this.
  
  Ah. Well I'm still on 3.4.8.
  
  Mick, if you don't hear anything from me soonish, it will be safe to
  remove the binary stuff using the method I mentioned.
 
 If this is bug 406623 then you can remove the spurious binary characters
 with vim.
 
 There are also instructions there on changing your syslogng.conf so
 they're not produced.
 
 However, I'm not sure that this *is* bug 406623, as there seem to be more
 lines of cr@p produced in Mick's log than I recollect.

It isn't that bug in my case. I don't (didn't) have any non-printing 
characters at the beginning of the file. I didn't check every character of 
course, but I'd guess that a previous file did have non-printables and 
logrotate re-created a file of the same type.

-- 
Rgds
Peter.




Re: [gentoo-user] Syslog-ng is writing binary

2014-12-27 Thread Mick
On Friday 26 Dec 2014 23:33:33 Peter Humphrey wrote:
 Hello list,
 
 For some time now I've had syslog-ng writing /var/log/messages in a binary
 format:
 
 # file /var/log/messages
 /var/log/messages: data
 # grep syslog-ng /var/log/messages
 Binary file /var/log/messages matches
 
 Yet:
 
 # head /var/log/messages
 Dec 21 03:10:02 wstn run-crons[29014]: (root) CMD (/etc/cron.daily/man-db)
 [...]
 
 Can I use the following method to restore the original text format of
 /var/log/messages?
 
 1.Boot rescue system and mount main system
 2.# cd /mnt/main/var/log
 3.# mv messages messages.bin
 4.# strings messages.bin  messages
 5.# rm messages.bin
 6.Reboot.
 
 I tried steps 1 - 4 and got a text file with very long lines, but I
 chickened out before rebooting.
 
 It would be nice to find a config setting that's changed, but the change
 log is silent and the admin guide gives me a headache :-(


I don't know if this is a matter of changing some setting a in a config file - 
I haven't found any yet.  It seems that upon boot up some binary data is 
written in the otherwise plain text logs:


Dec 22 10:15:21 dell_xps syslog-ng[1526]: syslog-ng starting up; 
version='3.4.8'
Dec 22 10:15:21 dell_xps syslog-ng[1526]: syslog-ng starting up; 
version='3.4.8'
Dec 22 10:15:21 dell_xps syslog-ng[1526]: syslog-ng starting up; 
version='3.4.8'
Dec 22 10:15:21 ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ kernel: Initializing cgroup subsys
 cpuset

Dec 22 10:15:21 
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@^@^@^@^@^@ kernel: Initializing cgroup subsys cpuset
Dec 22 10:15:21 
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@^@^@^@^@^@
[snip ...]

I don't know if this is caused by some systemd infection of our systems! LOL!


If you use 'less -L /var/log/messages' or cat, then you will be able to view 
the logs in text format.  If you need to grep stuff then you can use:

 grep --binary-files=text -i firewall /var/log/messages
[snip ...]

Dec 27 09:24:03 dell_xps firewall: ** All firewall rules applied **
Dec 27 09:24:03 dell_xps firewall: ** All firewall rules applied **


Be careful that using grep like this might cause your terminal to execute some 
of the binary output as a command (check the man page).

-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Syslog-ng is writing binary

2014-12-27 Thread Helmut Jarausch
On 12/27/2014 10:52:04 AM, Mick wrote:
 On Friday 26 Dec 2014 23:33:33 Peter Humphrey wrote:
  Hello list,
  
  For some time now I've had syslog-ng writing /var/log/messages in a
 binary
  format:
  
  # file /var/log/messages
  /var/log/messages: data
  # grep syslog-ng /var/log/messages
  Binary file /var/log/messages matches
  
  Yet:
  
  # head /var/log/messages
  Dec 21 03:10:02 wstn run-crons[29014]: (root) CMD
 (/etc/cron.daily/man-db)
  [...]
  
  Can I use the following method to restore the original text format
 of
  /var/log/messages?
  
  1.  Boot rescue system and mount main system
  2.  # cd /mnt/main/var/log
  3.  # mv messages messages.bin
  4.  # strings messages.bin  messages
  5.  # rm messages.bin
  6.  Reboot.
  
  I tried steps 1 - 4 and got a text file with very long lines, but I
  chickened out before rebooting.
  
  It would be nice to find a config setting that's changed, but the
 change
  log is silent and the admin guide gives me a headache :-(
 
 
 I don't know if this is a matter of changing some setting a in a
 config file - 
 I haven't found any yet.  It seems that upon boot up some binary data
 is 
 written in the otherwise plain text logs:
 
 
 Dec 22 10:15:21 dell_xps syslog-ng[1526]: syslog-ng starting up; 
 version='3.4.8'
 Dec 22 10:15:21 dell_xps syslog-ng[1526]: syslog-ng starting up; 
 version='3.4.8'
 Dec 22 10:15:21 dell_xps syslog-ng[1526]: syslog-ng starting up; 
 version='3.4.8'
 Dec 22 10:15:21 
 ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
 ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
 ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
 ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
 ^@^@^@^@^@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^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
 ^@^@^@^@^@^@^@^@^@^@
 [snip ...]
 
 I don't know if this is caused by some systemd infection of our
 systems! LOL!
 
 
 If you use 'less -L /var/log/messages' or cat, then you will be able
 to view 
 the logs in text format.  If you need to grep stuff then you can use:
 
  grep --binary-files=text -i firewall /var/log/messages
 [snip ...]
 
 Dec 27 09:24:03 dell_xps firewall: ** All firewall rules applied **
 Dec 27 09:24:03 dell_xps firewall: ** All firewall rules applied **
 
 
 Be careful that using grep like this might cause your terminal to
 execute some 
 of the binary output as a command (check the man page).
 
 -- 
 Regards,
 Mick
 

I think this was a long standig bug. Version 3.6.2 seems to have fixed 
this.
Helmut.





Re: [gentoo-user] Syslog-ng is writing binary

2014-12-27 Thread Peter Humphrey
On Friday 26 December 2014 23:33:33 I wrote:
 For some time now I've had syslog-ng writing /var/log/messages in a binary
 format:
 [...]
 Can I use the following method to restore the original text format of
 /var/log/messages?
 
 1.Boot rescue system and mount main system
 2.# cd /mnt/main/var/log
 3.# mv messages messages.bin
 4.# strings messages.bin  messages
 5.# rm messages.bin
 6.Reboot.
 
 I tried steps 1 - 4 and got a text file with very long lines, but I
 chickened out before rebooting.

Never mind. I did as I suggested and rebooted, and so far everything seems 
hunky-dory. Sorry for making a noise.

-- 
Rgds
Peter.




Re: [gentoo-user] Syslog-ng is writing binary

2014-12-27 Thread Peter Humphrey
On Saturday 27 December 2014 13:10:17 Helmut Jarausch wrote:

 I think this was a long standig bug. Version 3.6.2 seems to have fixed
 this.

Ah. Well I'm still on 3.4.8.

Mick, if you don't hear anything from me soonish, it will be safe to remove 
the binary stuff using the method I mentioned.

-- 
Rgds
Peter.




[gentoo-user] Syslog-ng is writing binary

2014-12-26 Thread Peter Humphrey
Hello list,

For some time now I've had syslog-ng writing /var/log/messages in a binary 
format:

# file /var/log/messages
/var/log/messages: data
# grep syslog-ng /var/log/messages   
Binary file /var/log/messages matches   

Yet:

# head /var/log/messages
Dec 21 03:10:02 wstn run-crons[29014]: (root) CMD (/etc/cron.daily/man-db)
[...]

Can I use the following method to restore the original text format of 
/var/log/messages? 

1.  Boot rescue system and mount main system
2.  # cd /mnt/main/var/log
3.  # mv messages messages.bin
4.  # strings messages.bin  messages
5.  # rm messages.bin
6.  Reboot.

I tried steps 1 - 4 and got a text file with very long lines, but I 
chickened out before rebooting.

It would be nice to find a config setting that's changed, but the change log 
is silent and the admin guide gives me a headache :-(

-- 
Rgds
Peter.