Giter Club home page Giter Club logo

dmerg's Introduction

dmerg

Command line utility to merge the standard output and the kernel ring buffer.

By default dmerg collects kernel logs from the systemd journal. Only members of the groups "systemd-journal", "adm", and "wheel" can read all journal files. Alternatively, dmerg can be told to use dmesg output. In such case, beware of dmesg time not being in sync with the system clock. Unless otherwise told, dmerg picks kernel log messages with a date that is newer than the time of its execution. dmesg messages showing a clock that is late, will delay the starting point of kernel message collection.

Options

~$ ./dmerg -h
dmerg 0.1.0

USAGE:
    dmerg [FLAGS] [OPTIONS]

FLAGS:
    -c, --console-off    Do not write to the standard output
    -d, --dmesg          Use dmesg instead of journald
    -f, --full           Include full kernel log output
    -h, --help           Prints help information
    -V, --version        Prints version information

OPTIONS:
    -o, --output <output>    Write output to <output> instead of a random file

Example

~$ for i in {1..10}; do echo $i; sleep 1; done | ./dmerg
2021-09-17T18:41:02.668895+0000 1
2021-09-17T18:41:03.663459+0000 2
2021-09-17T18:41:04.672363+0000 3
2021-09-17T18:41:05.055183+0000 test kernel: Unloaded Memory Tracer
2021-09-17T18:41:05.079075+0000 test kernel: Memory Tracer
2021-09-17T18:41:05.674361+0000 4
2021-09-17T18:41:06.674690+0000 5
2021-09-17T18:41:06.350965+0000 test kernel: Unloaded Memory Tracer
2021-09-17T18:41:06.375967+0000 test kernel: Memory Tracer
2021-09-17T18:41:07.678787+0000 6
2021-09-17T18:41:07.343006+0000 test kernel: Unloaded Memory Tracer
2021-09-17T18:41:07.368014+0000 test kernel: Memory Tracer
2021-09-17T18:41:08.683783+0000 7
^C
+ Output written to dmerged.Td8j7omccwVump41

~$ cat dmerged.Td8j7omccwVump41
2021-09-17T18:41:02.668895+0000 1
2021-09-17T18:41:03.663459+0000 2
2021-09-17T18:41:04.672363+0000 3
2021-09-17T18:41:05.055183+0000 test kernel: Unloaded Memory Tracer
2021-09-17T18:41:05.079075+0000 test kernel: Memory Tracer
2021-09-17T18:41:05.674361+0000 4
2021-09-17T18:41:06.350965+0000 test kernel: Unloaded Memory Tracer
2021-09-17T18:41:06.375967+0000 test kernel: Memory Tracer
2021-09-17T18:41:06.674690+0000 5
2021-09-17T18:41:07.343006+0000 test kernel: Unloaded Memory Tracer
2021-09-17T18:41:07.368014+0000 test kernel: Memory Tracer
2021-09-17T18:41:07.678787+0000 6
2021-09-17T18:41:08.683783+0000 7

dmerg's People

Contributors

cpey avatar

Watchers

 avatar

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.