20264 posts

  1. FreeBSD, NetBSD, OpenBSD and DragonFlyBSD: what actually differs

    Same 4.4BSD skeleton, four different answers to what to optimise: kernel locking, filesystems, security models, architecture coverage, and how each project runs Linux binaries.

    8 min
  2. Debugging a systemd service without guessing

    A repeatable path from failed unit to useful evidence using systemctl, journalctl, exit status, and the unit's real runtime context.

    9 min
  3. Write boring shell scripts

    A few conventions that make small Bash automation safer to rerun, easier to debug, and less surprising six months later.

    7 min
  4. Linux load average is not CPU usage

    Why a high load average can point at CPU pressure, blocked I/O, or scheduling pressure—and what to inspect next.

    8 min

Notes

  1. Stop grep matching itself without grep -v grep

    ps aux | grep nginx always lists the grep nginx process too, which is why | grep -v grep is so common. Wrap one character of the pattern in brackets instead:…

    TIL
  2. ldd may run the binary you are inspecting

    ldd is not a parser. It is a shell script that asks the dynamic loader to trace itself — normally by running the loader with --list, and in some versions and…

    TIL
  3. MemoryHigh is a slope, MemoryMax is a cliff

    A container that runs out of memory did not run out of machine memory — it hit a limit recorded under /sys/fs/cgroup, which is why free -h inside the container…

    TIL
  4. Core dumps are free until you need one

    The kernel refuses to write core dumps by default (RLIMIT_CORE starts at 0), which is why production crashes usually leave nothing behind. systemd raises that…

    TIL
  5. Give AI agents privileged access with pkexec

    AI coding agents usually run unprivileged and stall when they need root — installing a package, writing under /etc, restarting a service. Instead of running…

    TIL
  6. Find and kill the process using a TCP port

    When a port is already in use, find who owns it before reaching for a reboot: ss -ltnp shows the PID in the users:(...) column (use sudo to see other users'…

    TIL
  7. perf counts, perf samples — pick the right one

    perf has two modes and they answer different questions. Decide which one you are asking before you collect anything. Count when the question is how much:…

    TIL
  8. Deleted files can still fill a disk

    When df says a filesystem is full but du can't find the space, a process is usually holding a deleted file open. The blocks aren't freed until the last file…

    TIL
  9. Ask the package manager what changed on disk

    Every package manager already stores checksums for the files it installed, which turns "has anything been modified since installation?" into one command…

    TIL
  10. Measure durations with the monotonic clock

    Linux has several clocks, and mixing them up is a reliable way to ship a bug that only appears in production. CLOCK_REALTIME is the wall clock: NTP,…

    TIL