From 2411171084934607586501c845e59d56331c3c34 Mon Sep 17 00:00:00 2001 From: Malin Freeborn Date: Tue, 18 Jan 2022 16:28:10 +0100 Subject: [PATCH] cleanup --- basics/logs.md | 61 ----------------------- {basics => hardware/keyboard}/keyboard.md | 0 hardware/keyboard/keymaps.md | 16 ------ {basics => system}/swap.md | 0 system/systemd/basics.md | 4 +- 5 files changed, 2 insertions(+), 79 deletions(-) delete mode 100644 basics/logs.md rename {basics => hardware/keyboard}/keyboard.md (100%) delete mode 100644 hardware/keyboard/keymaps.md rename {basics => system}/swap.md (100%) diff --git a/basics/logs.md b/basics/logs.md deleted file mode 100644 index fd2f11d..0000000 --- a/basics/logs.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: "logs" -tags: [ "Documentation", "basics" ] ---- -## Syslog Management Protocols - -Let's look at the programs filling in things on our /var/log/ directory. - -* rsyslog (common) - -* syslog (old) - -* syslog-ng (lots of content-based filtering) - -* klogd (kernel-focussed) - -# `rsyslog` - -The config rests in /etc/rsyslog.conf, which then references /etc/rsyslog.d/. - -# Systemd -This thing makes its own logs with journald, and the journal's own logging system writes to /var/log/journal/ directory, which is then filled with nonsense. - -You can obtain nonsense in systemd's own format by entering: - -journalctl -e - -This thing generates so much nonsense it can crash your system, but can at least be checked with: - -> journalctl --disk-usage - -... in case you can't remember the `du` command. - -You can limit the nonsense by editing the /etc/systemd/journald.conf file, and finding `#SystemMaxFileSize=` - -# Logger - -You can log things at any time with the logger: - -> logger Server is being a dick! - -Put things into a specific log with `-p`. They can enter into, e.g., lpr (printer) log file with a priority of "critical", with: - -> logger -p lpr.crit Help! - -Logfiles rotate around and eventually get deleted. Rotation means they get compressed. - -Edit the config in /etc/logrotate.conf. - -A few apps have their own special log rotation rules, kept in /etc/logrotate.d/. - -The major variables to change are `weekly`, which compresses log files weekly, and `rotate 4`, which keeps 4 weeks worth of backlogs before deletion. - -# Force Log Rotation - -> sudo systemctl kill --kill-who=main --signal=SIGUSR2 systemd-journald.service - -or just - -> sudo systemctl restart systemd-journald.service - diff --git a/basics/keyboard.md b/hardware/keyboard/keyboard.md similarity index 100% rename from basics/keyboard.md rename to hardware/keyboard/keyboard.md diff --git a/hardware/keyboard/keymaps.md b/hardware/keyboard/keymaps.md deleted file mode 100644 index 90dcfa7..0000000 --- a/hardware/keyboard/keymaps.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: "keymaps" -tags: [ "Documentation", "hardware" ] ---- -Find easy-to-read keymapping lists in `/usr/share/X11/xkb/keycodes/symbols/pc`. - -If this doesn't work, try keymaps. - -Keymaps codes can be found in `/usr/share/X11/xkb/keycodes/evdev`. -Swap the numbers to swap symbols. - -Check keymap with: - -> setxkbmap -print -verbose 10 - - diff --git a/basics/swap.md b/system/swap.md similarity index 100% rename from basics/swap.md rename to system/swap.md diff --git a/system/systemd/basics.md b/system/systemd/basics.md index d4f667a..ddde16c 100644 --- a/system/systemd/basics.md +++ b/system/systemd/basics.md @@ -1,6 +1,6 @@ --- -title: "basics" -tags: [ "Documentation", "system" ] +title: "systemd" +tags: [ "Documentation", "systemd" ] --- > systemctl list-units