1. Home
  2. Docs
  3. Forum
  4. How to include systemlogs in your post.

How to include systemlogs in your post.

by joekamprad

In the majority of cases, simply describing your issue will not provide enough information for someone to identify it’s cause and advise you on how to resolve it. It is important to include any system logs that may be relevant to your issue to ensure that neither your time nor the other person’s time is wasted. The following is a list of the most common system logs and where/how to obtain them. The logs are listed in the order of importance.

Systemd Journal:

The systemd journal can only be accessed using the journalctl command. You can export your system’s journal from the last three boots using these commands:

su

journalctl -b -0 > /tmp/journal

journalctl -b -1 > /tmp/journal.last

journalctl -b -2 > /tmp/journal.2last

exit

Now you can open the 3 files under /tmp wit any texteditor.

If you want them posted into forum you can just pastebin them:

cat /tmp/journal | curl -F 'f:1=<-' ix.io
cat /tmp/journal.last | curl -F 'f:1=<-' ix.io
cat /tmp/journal .2last| curl -F 'f:1=<-' ix.io

Learn more about the pastebin command further down.

Xsession:

Your session log is located in your /home directory:

~/.xsession-errors

~/.xsession-errors.old

Xorg (X11):

You can find your Xorg logs here:

/var/log/Xorg.0.log

/var/log/Xorg.0.log.old

Lightdm:

LightDM’s logs can be found here:

/var/log/lightdm/lightdm.log

/var/log/lightdm/x-0-greeter.log

Other log providers and options:

journalctl --since "10 minutes ago"

To get journal from timespan (works also with hours seconds, days)

For problems after new installation:

installer (calamares) log is saved inside home folder of the liveuser: /home/liveuser/endeavour-install.log you can send this to Pastebin like this from a terminal:

cat ~/endeavour-install.log | curl -F 'f:1=<-' ix.io

After the command sends the logfile it gives out a short URL looking like this one:

http://ix.io/1Rmn

A good way to get information about a particular program:

journalctl -f /usr/bin/"Executable" 

And nice to poste a pastebin the smart way:

"command" | curl -F 'f:1=<-' ix.io

System summery and bootlog example:

lspci > log.txt && lsusb >> log.txt && journalctl -b -0 >> log.txt && cat log.txt | curl -F 'f:1=<-' ix.io

Other systemd logs/analyze:

systemd-analyze blame

will show times of systemd stuff needed to proceed on bootup

https://www.freedesktop.org/software/systemd/man/systemd-analyze.html

Pastebinit:

install pastebinit with package manager or sudo pacman -S pastebinit

the command should be passed like this:

journalctl -b -0 > ~/journal.txt && pastebinit -i ~/journal.txt -b lpaste.net

where you can change journalctl -b -0 with any other command like dmesg from below, his will write to a txt file: ~/journal.txt under your home you can change this name (journal) to something related to the command you pass..

pastebinit will autoupload this to the pastebin service you can choose (list all aviable by pastebinit -l

then it gives the link to it as output, so that you can just copy t to paste inside a post.

System summary and boot-journal example:

lspci > log.txt && lsusb >> log.txt && journalctl -b -0 >> log.txt && pastebinit -i log.txt -b lpaste.net

This will give out a link (like this:http://lpaste.net/7802695579456241664) you can post onto the forum, this will include all the output of:

lspci (list your pci devices) lsusb (same for usb) and dmesg (bootup messages) and make it aviable.

The dmesg command:

An alternative to the above command (or if your system is not using systemd) is the good old dmesg command. This is potentially less informative than journalctl above, but not if you have filtered it as I advised you to. So they are essentially equivalent.

dmesg

Again, If you look in its man page or type invoke dmesg --help you’ll learn about the always useful -l flag, which filters dmesg potentially long output to print only certain message levels. And the -r flag which prints the message level. So, likewise many of us will thank you if you do the following instead of the above:

dmesg -rl warn,err,crit

Or at the very least:

dmesg -r

Trivia: The dmesg command is basically the same as journalctl with the -k flag added to it

Hardware Information Systems:

INXI: smxi.org

inxi -Fxxc0

Or to autopastebin it and get an url to post:

inxi -Fxxc0 | curl -F c=@- https://ptpb.pw/?u=1

Final Note:

Very important! Do not paste only the printed contents of the command.

Always show also the command you used to get that output.

And better to use a external pastebin if the output is very large, because it is hard to get the over all question visible, inside your post, or for the discussion, if it is interrupted by large logs!

Follow us
Was this article helpful to you? Yes 4 No

How can we help?