Coder Social home page Coder Social logo

journalctl-mode's Introduction

Journalctl-mode

This is a major-mode for emacs to view systemd’s journalctl output in emacs. The output is split into chunks for performance reasons.

Fontification is provided and may be customized.

At the moment it is still in very early development. Please give feedback on any problems that occure.

./journalctl-mode.08.gif

Installation

With use-package

You can install `journalctl-mode` from MELPA, for example with:

(use-package journalctl-mode
:ensure t)

Manual

Clone the project or download `journalctl-mode.el` and put that file to a load-path.

Put down

( require 'journalctl-mode) 

in your .emacs file.

Usage

At the moment there are to functions provided to call journalctl:

  • journalctl: will ask for commandline options like “-xe” and show the output in the ∗journalctl∗ buffer.
  • journalctl-boot: will provide you with the list of boots in the journal. You can choose one and view it in the buffer.
  • journalctl-unit: will provide you with the list of units . You can choose one and view related logs in the buffer.
  • journalctl-user-unit: will provide you with the list of user-units . You can choose one and view related logs in the buffer.

In journalctl-mode you can navigate between the cunks with “n” (next chunk) and “p” (previous chunk). I also redefined C-v and M-v so that it will move to the next chunk, when you have reached the bottom or top of the buffer.

You can add options from journalctl-mode with “+ +” and remove them with “- -“.

There are also some keybindings to add options:

  • ”+ r” : Reverse output (–reverse).
  • ”+ x”: Augment log lines with explanation texts from the message catalog. (–catalog).
  • ”+ s”: Show messages from system services and the kernel only (–system).
  • ”+ u”: Show messages from service of current user only (–user).
  • ”+ k”: Show kernel message only (–dmesg). This applies “-b”.
  • ”+ p” prompt for priority range and show the respective messages (–priority).
  • ”+ S”: Show messages since given date and / or time (–since).
  • ”+ U”: Show messages until given date and / or time (–until).

When you replace the “+” with a “-” for each option (like “- r”) you remove it.

You can edit the current options with “e”.

You can grep on the current output of journalctl with “+ g”. You will be asked for a pattern to grep.

You can remove all filters (grep) with “- -“.

Type “q” to kill the “∗journalctl∗” buffer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.