Section: admin
Priority: optional
Maintainer: Proxmox Support Team <support@proxmox.com>
-Build-Depends: debhelper-compat (= 13), libsystemd-dev, pkg-config
+Build-Depends: debhelper-compat (= 13), libsystemd-dev, pkg-config, scdoc,
Standards-Version: 4.6.2
Package: proxmox-mini-journalreader
Architecture: any
-Depends: ${misc:Depends}, ${shlibs:Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends},
Description: Minimal systemd Journal Reader
A minimal application to read the last X lines of the systemd journal or the
last X lines before a cursor.
SOURCES=mini-journalreader.c
BIN_DIR ?= $(DESTDIR)/usr/bin
+MAN1_DIR ?= $(DESTDIR)/usr/share/man/man1
LIBS := libsystemd
CFLAGS += -Werror -Wall -Wextra -Wl,-z,relro -g -O2
gcc $< -o $@ $(CFLAGS) $(LDFLAGS)
.PHONY: install
-install: $(PROGRAM) proxmox-mini-journalreader.1
+install: $(PROGRAM) mini-journalreader.1
install -d -m 0755 $(BIN_DIR)
install -m 0755 $(PROGRAM) $(BIN_DIR)
+ install -d -m 0755 $(MAN1_DIR)
+ install -m 0644 mini-journalreader.1 $(MAN1_DIR)
+
+mini-journalreader.1: mini-journalreader.scd
+ scdoc < $< > $@
.PHONY: distclean
distclean: clean
.PHONY: clean
clean:
- rm -rf $(PROGRAM)
+ rm -rf $(PROGRAM) mini-journalreader.1
--- /dev/null
+proxmox-mini-journalreader(1)
+
+# NAME
+proxmox-mini-journalreader - read systemd journald logs
+
+# SYNOPSIS
+*proxmox-mini-journalreader* [OPTIONS]
+
+# DESCRIPTION
+Provides access to systemd journald logs, allowing users to fetch log entries
+based on timestamps, cursors, or a specified number of last entries.
+
+# OPTIONS
+*-b* <timestamp>
+ Begin at this UNIX epoch timestamp.
+
+*-e* <timestamp>
+ End at this UNIX epoch timestamp.
+
+*-d* <directory>
+ Specify a custom journal directory.
+
+*-n* <integer>
+ Print the last number of entries logged.
+
+*-f* <cursor>
+ Print starting from this cursor.
+
+*-t* <cursor>
+ Print until (to) this cursor.
+
+*-h*
+ Display the help message.
+
+# NOTES
+. No range option means dump all entries.
+. Range conflicts with -n.
+. -b and -f conflict.
+. -e and -t conflict.
+
+# SEE ALSO
+journalctl(1), systemd-journald.service(8)
+
+# AUTHORS
+The Proxmox Support Team <support@proxmox.com>.