UPDATE!:colorful output

UPDATE: checkout lnav (colorful less)

first let’s get some color into the terminal

# apt based
apt install ccze
# rpm based
yum install ccze

for debugging problems with your system it might be interesting to know what is happening in real time in your log files.

unfortunately there are also binary files in /var/log

this command will follow all file changes under /var/log and output the changes to your screen

maximum verbose logging output, show only newly added lines, show changes to all log files

it will also output nicely list of all files it follows changes

it will exclude archived.tar.gz log files

you might want to hit Ctrl+L to clear the screen from time to time…

you can download the script here: mon_logs_all.sh.txt

# without color but: you can scroll it :)
find /var/log/ -type f \( -name "*" \) ! -path '*.gz*' -exec tail -n0 -f "$file" {} +

# with color: no scroll :(
find /var/log/ -type f \( -name "*" \) ! -path '*.gz*' -exec tail -n0 -f "$file" {} + | ccze


journalctl may be used to query the contents of the systemd(1) journal as written by systemd-journald.service(8).

If called without parameters, it will show the full contents of the journal, starting with the oldest entry collected.

If one or more match arguments are passed, the output is filtered accordingly.

-x, --catalog
# very detailed output (black and white)
# go to end of log hit "Shift+G"
# go to start of log type: "gg"
journalctl -lx _SYSTEMD_UNIT=docker.service

Augment log lines with explanation texts from the message catalog.
This will add explanatory help texts to log messages in the output
where this is available.

These short help texts will explain the context of an error or log event, possible solutions, as well as pointers to support forums, developer documentation, and any other relevant manuals.

Note that help texts are not available for all messages, but only for selected ones. For more information on the message catalog, please refer to the Message Catalog Developer Documentation[4].




systemctl may be used to introspect and control the state of the „systemd“ system and service manager. Please refer to systemd(1) for an introduction into the basic concepts and functionality this tool manages.

systemctl status docker
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2018-08-22 19:04:26 CEST; 14h ago
     Docs: http://docs.docker.com
 Main PID: 3699 (dockerd-current)
    Tasks: 80
   Memory: 68.5M
   CGroup: /system.slice/docker.service