All Projects → tianyuanhao → kernel-syslog

tianyuanhao / kernel-syslog

Licence: GPL-2.0 license
📝 Kernel module that can be used as a replacement for syslog, logger or logwrapper

Programming Languages

c
50402 projects - #5 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to kernel-syslog

U Root
A fully Go userland with Linux bootloaders! u-root can create a one-binary root file system (initramfs) containing a busybox-like set of tools written in Go.
Stars: ✭ 1,816 (+4808.11%)
Mutual labels:  embedded, kernel, initramfs
InitWare
The InitWare Suite of Middleware allows you to manage services and system resources as logical entities called units. Its main component is a service management ("init") system.
Stars: ✭ 164 (+343.24%)
Mutual labels:  systemd, init, init-system
InitKit
Neo-InitWare is a modular, cross-platform reimplementation of the systemd init system. It is experimental.
Stars: ✭ 364 (+883.78%)
Mutual labels:  systemd, init, init-system
nosystemd.org
Website for arguments against systemd and further resources
Stars: ✭ 49 (+32.43%)
Mutual labels:  systemd, init, init-system
Frosted
Frosted: Free POSIX OS for tiny embedded devices
Stars: ✭ 194 (+424.32%)
Mutual labels:  embedded, kernel
Awesome Canbus
🚛 A curated list of awesome CAN bus tools, hardware and resources
Stars: ✭ 73 (+97.3%)
Mutual labels:  embedded, logger
go-init
A minimal init system for containers with pre/post hooks
Stars: ✭ 36 (-2.7%)
Mutual labels:  init, init-system
Elks
Embeddable Linux Kernel Subset
Stars: ✭ 376 (+916.22%)
Mutual labels:  embedded, kernel
init
KISS Linux - Init Framework
Stars: ✭ 85 (+129.73%)
Mutual labels:  init, init-system
sysdweb
Control systemd services through Web or REST API
Stars: ✭ 65 (+75.68%)
Mutual labels:  journal, systemd
w1-gpio-cl
Command line configured kernel mode 1-wire bus master driver. w1-gpio standard Linux module enhancement/substitution.
Stars: ✭ 17 (-54.05%)
Mutual labels:  embedded, kernel
Mylinux
myLinux is a small UNIX like OS for embedded systems based on Westermo NetBox
Stars: ✭ 53 (+43.24%)
Mutual labels:  embedded, kernel
Paper collection
Academic papers related to fuzzing, binary analysis, and exploit dev, which I want to read or have already read
Stars: ✭ 710 (+1818.92%)
Mutual labels:  embedded, kernel
Embox
Modular and configurable OS for embedded applications
Stars: ✭ 576 (+1456.76%)
Mutual labels:  embedded, kernel
logback-journal
systemd journal appender for Logback
Stars: ✭ 25 (-32.43%)
Mutual labels:  journal, systemd
buddy-linux
Do you remember "Wubi Ubuntu Installer"? This project is both a replacement and an improvement of Wubi. You will be able to install your Debian (or derived) distribution on a PC without repartitioning it, simply by using a secondary/external boot device (like a USB drive).
Stars: ✭ 17 (-54.05%)
Mutual labels:  systemd, initramfs
pfSense-pkg-WireGuard
This is a port of the original WireGuard UI bits as implemented by Netgate in pfSense 2.5.0 to a package suitable for rapid iteration and more frequent updating on future releases of pfSense.
Stars: ✭ 194 (+424.32%)
Mutual labels:  kernel, kernel-module
Tock
A secure embedded operating system for microcontrollers
Stars: ✭ 3,258 (+8705.41%)
Mutual labels:  embedded, kernel
Lwext4
ext2/ext3/ext4 filesystem library for microcontrollers
Stars: ✭ 270 (+629.73%)
Mutual labels:  embedded, journal
tini
A tiny but valid `init` for containers
Stars: ✭ 7,757 (+20864.86%)
Mutual labels:  init, init-system

Kernel logger

Kernel logger is a kernel module that can be used as a replacement for logger or logwrapper.

Its log is similar to systemd's journal and can be read by dmesg or journalctl.

Use cases

  • You need to record the logs of initramfs and hope that journald can keep these logs.
  • You want a logger, but do not want or cannot make any changes to a program.
  • You find it annoying to type logger again and again in a shell script.

Here is a very suitable use case.

Why not kmsg or logger

  • kmsg could not add a tag
  • logger needs a backend

Quick start

  1. Compile and load this module
make
sudo insmod logger.ko
  1. Run a shell command to test it
vagrant@ubuntu-focal:/vagrant$ echo "This is just a test" > /dev/logger
vagrant@ubuntu-focal:/vagrant$
vagrant@ubuntu-focal:/vagrant$ dmesg | grep "This is just a test"
[   55.750168] bash[1289]: This is just a test
vagrant@ubuntu-focal:/vagrant$
vagrant@ubuntu-focal:/vagrant$ journalctl -b | grep "This is just a test"
Mar 04 02:13:46 ubuntu-focal bash[1289]: This is just a test

Usage in shell script

Just add the following to the beginning of your shell script:

exec > /dev/logger 2>&1

License

This project is licensed under GPL-2.0.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].