Pages: Welcome | Projects

Docker on logs

2016/6/16
Tags: [ Ideas ] [ GNU/Linux ]

A number of things are changing in the setup of my computer. I have put my hands on a third display at work, so I switched back to i3wm. I think that a tiling window manager is what it takes to get the best out of one's screen estate.

As a consequence I've found myself with a lot of free visual space to allocate for my shells, and I started to keep a terminal open on tail -f /var/log/messages. It turns out there's countless thing you can learn from it!

I'll put here some stuff I've found out.

Fingerprint recognition device

i.e. detect useless functions

On my laptop there's a fingerprint recognition device. I believe that is a perfectly useless device (together with the touchscreen). I've read someone's the idea of using it to detect your user name instead of your password, and I agree on the fact that is the real good use of it. A concept somewhat similar to “wireless encryption was meant for privacy, not for authentication”.

That said, the operating system recognizes it, and systemd supports it as fprintd.service. I have to say I was confused by the service name, I was thinking of formatted printing on a directory. WTF?

Anyway, I disabled that useless peripheral, and here we go, more control on what the machine is doing.

Docker logs the whole stdout

i.e. detect leaks

By default, on Fedora 23, any traffic on the standard I/O within a docker container will be reported in Syslog. The logfile growing rate gets high, which is not a big problem, but if you ever happen to visualize credentials in your container, that gets straight on the log file too. Even if the disk is encrypted, this is not something I want.

Since on my machine I use docker only for tests, the easy fix is simply disabling this log. The /etc/sysconfig/docker file contains by default this setting:

OPTIONS='--selinux-enabled --log-driver=journald'

Which according to this document can be changed as follows:

OPTIONS='--selinux-enabled --log-driver=none'

ZSH completion

i.e. detect system issues

My system used to log an error every time I pressed TAB on my shell.

This is something I've noticed some time ago, and unfortunately I cannot recall what was wrong specifically. It boiled down to getting rid of some line in some system script. It was easy to fix, anyway.

Tl;Dr

Syslog is your friend. True story.