• HOW TO: Include System Logs When Asking For Help


    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
    

    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
    

    POSTING LOGS TO THE FORUM
    You cannot attach a single log file. Instead you must create an archive that holds all the logs you wish to include and then attach the archive to your post. Here is an example on how to create an archive of a folder named Logs that contains some logs to be attached to a post:

    sudo chmod -R a+rw /tmp/Logs
    tar -cf logs.tar /tmp/Logs
    
  • @lots.0.logs

    Hey guys, I made a shell script to do all the log collecting requested by lot.O.logs. I thought I’d put it up to make things easier.

    It can be viewed here. If you want to use it, just download the shell script (logs.sh) and fill out the two variables at the beginning of the script (backup_dir and user_name - the user name is used to get your xsession logs since you’ll be running the script from root) and place it in “/root” directory and allow execution in properties or via sudo chmod a-rwx logs.sh.

    Whenever you get crashes after that, you can press ctrl-alt-f2, login with user:root and run ./logs.sh to get all the relevant logs copied and compressed in the directory you specified in the script.

    Happy logging!

  • @Fadi-R

    Sorry to bug you, but I tried this and it created an empty folder (hidden files showing).

    First of all I could not put the Logs.sh file in/root (access denied), so I put one in each users home directory: /home/username, and gave the users permissions.

    I also had to find out how to run it because I am not familiar with running scripts, and some newb’s will need to know this:

    sudo bin/bash logs.sh
    

    I even added links in the start menu to run it. So far so good, but when I run it, the terminal pops up and disappears faster than I can see a thing, it creates the directory with the date/time stamp, but there’s nothing in there, no files and no archive at all. What am I missing?

    Could it be due to the seconds of the timestamp, advancing prior to the script finishing, or I do I not have the right lib’s to create the archive?

    I remember from DOS scripts the ECHO command that forced the script to keep the terminal open and list all operations including errors. Since the terminal opens and disappears so fast, I can’t see what went wrong.

    The flazzum you spizz, the zoider you splat!

  • script is from 2015 and i never try that one… but try this : http://kamprad.net/Downloads/logs.sh
    simple change youusernamehere inside to your username and run with sudo sh logs.sh

    [updates once a week] = [90% less problems]
    http://gofccyourself.com
    my-blog#k
    how to add system logs
    i3 GNOME

  • @joekamprad

    Thanks Joe (again). :blush: I will get right on it!

    The flazzum you spizz, the zoider you splat!

  • @Zoidmo see also the WIKI

    [updates once a week] = [90% less problems]
    http://gofccyourself.com
    my-blog#k
    how to add system logs
    i3 GNOME

  • That one worked Joe!

    The flazzum you spizz, the zoider you splat!

  • nice idea about the script. Good work guys!

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • script needs some more investigation but seems to do the job… i just only fix it to get work again… it is from @Fadi-R he write this 2 years ago here…

    [updates once a week] = [90% less problems]
    http://gofccyourself.com
    my-blog#k
    how to add system logs
    i3 GNOME

system logs4 logs7 journalctl4 Posts 9Views 1597
Log in to reply