Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Some log files missing in Debian 8

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
swirler
Posts: 166
Joined: 2013-11-24 11:19

Some log files missing in Debian 8

#1 Post by swirler »

Some log files that I'm used to, namely /var/log/boot.log and /var/log/pm-suspend log , aren't there in Debian 8 (Lxde), which I've just installed and currently having a look around.

Why is that? Do I have to manually start logging and/or possibly activate some systemd service that I'm still not familiar with?

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Some log files missing in Debian 8

#2 Post by GarryRicketson »

Good question, I didn't know the answer, cause I had not had any need to look for those files,
and your right they are not there, so I asked "startpage.com"
where is the /var/log/boot.log on debian 8

and
I found this, I think it will explain,
https://wiki.debian.org/bootlogd
it does clear this up to me, but if you need more explanation, feel free to ask.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Some log files missing in Debian 8

#3 Post by Head_on_a_Stick »

swirler wrote:Do I have to manually start logging and/or possibly activate some systemd service that I'm still not familiar with?
systemd has it's own logging system known as journalctl

To enable access to the `journalctl` command, add your user to the "systemd-journal" group:

Code: Select all

# gpasswd -a <user name> systemd-journal
# newgrp systemd-journal
For details on usage, read:

Code: Select all

man 1 journalctl
man 7 systemd.journal-fields
More here:
https://wiki.archlinux.org/index.php/Systemd#Journal & http://0pointer.de/blog/projects/journalctl.html
deadbang

swirler
Posts: 166
Joined: 2013-11-24 11:19

Re: Some log files missing in Debian 8

#4 Post by swirler »

Thanks, I had no idea that to see some logs I had to add my normal user to the systemd-journal group (I really should read more documentation about systemd, there is quite a lot to it).

We'll see if this will make these "missing" log files materialize somehow.

EDIT: I think I now realize what Linus Torvalds meant when he said "personally, I think that the binary logs are a crazy idea".

As for the bootlogd thing, the page goes :
As of Wheezy, the bootlogd package is automatically started as a daemon in the normal way (with a sys-V like init.d script). No config file any more.
therefore, unless something has changed with Debian 8 and systemd, the boot logs should be somewhere.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Some log files missing in Debian 8

#5 Post by GarryRicketson »

therefore, unless something has changed with Debian 8 and systemd, the boot logs should be somewhere
It appears to me, you can view the boot logs just by typing:
As root, IE:

Code: Select all

su
password : 

Code: Select all

 journalctl 
from; https://wiki.archlinux.org/index.php/Systemd#Journal :
systemd has its own logging system called the journal; therefore, running a syslog daemon is no longer required. To read the log, use:

Code: Select all

# journalctl
Of course if you set it up the way, H_O_A_S said in his post, above, then you do not all ways need to be using su, to view them. H_O_A_S knows much more then me on this, I am still looking at the info in the wiki too, trying to "digest" it all,.. but I did try the "journalctl" just now on my Jessie and it gave me the boot logs, for the current session.

swirler
Posts: 166
Joined: 2013-11-24 11:19

Re: Some log files missing in Debian 8

#6 Post by swirler »

Adding my user to systemd-journal group enables me to see the systemd logs easily (I think I shouldn't use root or superuser rights to see these logs), the issue for me is that the journalctl command unleashes an huge logfile where apparently the system throws in almost anything, it's not like having separate boot logs, pm-suspend logs and so on...

Maybe some configuration file for systemd (such as /etc/systemd/journald.conf) would allow me to generate these logs, at least I hope so because when troubleshooting a suspend issue -for instance- having a separate log is much more convenient than sifting through a massive log.

Or maybe it's some script in usr/lib/pm-utils, I've seen that in Ubuntu there are quite a few of them (among which an aptly named 00logging) , whilst in Jessie there are just four scripts and 00logging isn't one of them.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Some log files missing in Debian 8

#7 Post by Head_on_a_Stick »

swirler wrote:the issue for me is that the journalctl command unleashes an huge logfile where apparently the system throws in almost anything
The journal size can be limited and there are *many* options for filtering the journal contents -- read the links I posted above, they explain all of this in great detail.
deadbang

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Some log files missing in Debian 8

#8 Post by GarryRicketson »

The journal size can be limited and there are *many* options for filtering the journal contents -- read the links I posted above, they explain all of this in great detail.
+1
-----
Ok, well I also spent a little time reading more, on the "bootlogd", On Debian 8, bootogd is not installed, but it can be installed.
http://manpages.debian.org/cgi-bin/man. ... &locale=en But like wise , it needs to be read very carefully, there are several "options" to configure. I am using "mate",
not LXDE, but I don't think that matters.
I looked , and "bootlogd" is not installed, but I installed it with "synaptic", I am sure "apt-get install" would work just fine , or better. So any way, now that is is installed, I do have a file called "boot" in my /var/log/

Code: Select all

root@debian8:/var/log# cat boot
(Nothing has been logged yet.)
root@debian8:/var/log# 
 

See the manual, in the link above, I still have not finished configuring it so it logs the boot info, and to be honest
with the:

Code: Select all

journalctl
command, I don't see any reason or need, at least for me. you are the administrator of your system, though, and can configure these things they way you want, to suit your needs.

swirler
Posts: 166
Joined: 2013-11-24 11:19

Re: Some log files missing in Debian 8

#9 Post by swirler »

I'm having a look at the journalctl options, there are indeed many interesting ones, for instance you can easily see detailed boot logs even without the bootlogd package and the output format is very convenient too, with colorized logs and a built-in pager -still, I haven't found out (yet) how to read a suspend log.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Some log files missing in Debian 8

#10 Post by GarryRicketson »

how to read a suspend log on debian 8]
https://startpage.com


I found this:
from: https://wiki.debian.org/SystemdSuspendSedationIn order to see the messages logged by this unit, either use

Code: Select all

 journalctl -u suspend-sedation
,
or look in /var/log/daemon.log for lines containing "suspend-sedtation".
The wiki pages need to be read care full, there is more to it then just this,..at first I thought maybe
they don't mention it, but it is there.

Post Reply