Logs
Contents
Introduction
A utility for viewing detailed event logs for the system.
Designers
Jon McCann
Objectives
- By default, display a record of user session events
- When user is an administrator, also display a record of system events
- Allow the user to go back and investigate a problem later
- View events by type and source
- Identify events as problems to be shown in Oops! ?
- Be able to show user events by default
- Be able to show system events when authorized
Constraints
Relevant Art
GNOME 2
OS X
Windows 7
Discussion
For the unprivileged user case this would replace and enhance the legacy .xsession-errors file, be used for displaying a record/history of Problems (as defined in Problem Reporting), and detailed application logs.
Types of logs
- System update history
- Application update history
- Diagnostics
- Crashes
- Alerts
Tentative Design
Comments
- some services use ASCIIart in log messages, so a fixed width font might be better than proportional
- specifically, for the "raw" report; the summary can of course be pretty and use a proportional font
- full-text search (of all fields in all journal entries) could be quite slow and inefficient
restricting to a handful of well-known fields (for example: _COMM, _EXE and _SYSTEMD_UNIT) would be faster (most useful in the case of a single "search" field)
Logging examples
ASCII art
Spaces are frequently used as indentation to group related kernel log messages.
Jun 13 19:50:29 localhost kernel: MTRR variable ranges enabled: Jun 13 19:50:29 localhost kernel: 0 base 0FFC00000 mask FFFC00000 write-protect Jun 13 19:50:29 localhost kernel: 1 base 000000000 mask F80000000 write-back Jun 13 19:50:29 localhost kernel: 2 base 080000000 mask FC0000000 write-back Jun 13 19:50:29 localhost kernel: 3 base 0C0000000 mask FE0000000 write-back Jun 13 19:50:29 localhost kernel: 4 base 0DC000000 mask FFC000000 uncachable Jun 13 19:50:29 localhost kernel: 5 base 0DB000000 mask FFF000000 uncachable Jun 13 19:50:29 localhost kernel: 6 base 100000000 mask F00000000 write-back Jun 13 19:50:29 localhost kernel: 7 base 200000000 mask FE0000000 write-back Jun 13 19:50:29 localhost kernel: 8 base 21F000000 mask FFF000000 uncachable Jun 13 19:50:29 localhost kernel: 9 base 21E800000 mask FFF800000 uncachable
Same process (Google Hangout browser plugin) emitting log spew to the session manager.
Jul 03 18:08:23 lenovodave /etc/gdm/Xsession[722]: No bp log location saved, using default. Jul 03 18:08:23 lenovodave /etc/gdm/Xsession[722]: [000:000] Browser XEmbed support present: 1 Jul 03 18:08:23 lenovodave /etc/gdm/Xsession[722]: [000:000] Browser toolkit is Gtk2. Jul 03 18:08:23 lenovodave /etc/gdm/Xsession[722]: [000:002] Using Gtk2 toolkit Jul 03 18:08:23 lenovodave /etc/gdm/Xsession[722]: [000:011] Starting client channel. Jul 03 18:08:23 lenovodave /etc/gdm/Xsession[722]: [000:013] Warning(clientchannel.cc:436): Unreadable or no port file. Could not initiate GoogleTalkPlugin connection Jul 03 18:08:23 lenovodave /etc/gdm/Xsession[722]: [000:014] Warning(clientchannel.cc:411): Could not initiate GoogleTalkPlugin connection Jul 03 18:08:23 lenovodave /etc/gdm/Xsession[722]: [000:014] GoogleTalkPlugin not running. Starting new process... Jul 03 18:08:23 lenovodave /etc/gdm/Xsession[722]: [000:014] Warning(optionsfile.cc:47): Load: Could not open file, err=2 Jul 03 18:08:23 lenovodave /etc/gdm/Xsession[722]: [000:014] Warning(pluginutils.cc:251): Failed to get GoogleTalkPlugin path. Trying default. Jul 03 18:08:23 lenovodave /etc/gdm/Xsession[722]: [000:018] Started GoogleTalkPlugin, path=/opt/google/talkplugin/GoogleTalkPlugin Jul 03 18:08:23 lenovodave /etc/gdm/Xsession[722]: [000:019] Waiting for GoogleTalkPlugin to start... Jul 03 18:08:23 lenovodave /etc/gdm/Xsession[722]: sh: lsb_release: command not found Jul 03 18:08:23 lenovodave /etc/gdm/Xsession[722]: [000:928] Starting client channel.
Same process (dconf-editor) emitting log spec to the session manager. Useful prefix should make combining successive messages easier.
Jul 03 18:36:41 lenovodave /etc/gdm/Xsession[722]: ** (dconf-editor:27027): WARNING **: dconf-schema.vala:330: Unknown property on <schema>, extends Jul 03 18:36:41 lenovodave /etc/gdm/Xsession[722]: ** (dconf-editor:27027): WARNING **: dconf-schema.vala:330: Unknown property on <schema>, extends Jul 03 18:36:41 lenovodave /etc/gdm/Xsession[722]: ** (dconf-editor:27027): WARNING **: dconf-schema.vala:330: Unknown property on <schema>, extends
See Also
https://docs.google.com/document/pub?id=1IC9yOXj7j6cdLLxWEBAGRL6wl97tFxgjLUEHIX3MSTs
Well known journal fields: https://docs.google.com/document/pub?id=1MqQpm-ey8yVDPY8QVL155pvivay3Ut09dKxeVyNCrp8
http://cgit.freedesktop.org/systemd/systemd/tree/src/systemd/sd-journal.h
http://cgit.freedesktop.org/systemd/systemd/tree/src/shared/logs-show.c
http://www.youtube.com/watch?v=i4CACB7paLc Lennart Poettering discusses the why?, the what? and the how? of Systemd Journal