• 0 Posts
  • 8 Comments
Joined 5 days ago
cake
Cake day: July 27th, 2026

help-circle



  • I entrust you with this horror, go figure out what to blame.

    shutdown-analyze.sh
    #! /usr/bin/env bash
    shutdown_start=$(journalctl -b -1 -u systemd-logind --grep="System is (powering down|rebooting)" --output=cat --no-pager --output-fields=_SOURCE_REALTIME_TIMESTAMP)
    shutdown_start=$((shutdown_start / 1000000))
    units=$(journalctl -b -1 --since=@$shutdown_start --output=cat --no-pager --output-fields=UNIT JOB_TYPE=stop CODE_FUNC=job_emit_start_message)
    
    for u in $units; do
        stopping_start=$(journalctl -b -1 --since=@$shutdown_start -u "$u" --output=cat --no-pager --output-fields=_SOURCE_REALTIME_TIMESTAMP JOB_TYPE=stop CODE_FUNC=job_emit_start_message _SYSTEMD_UNIT=init.scope)
        stopping_end=$(journalctl -b -1 --since=@$shutdown_start -u "$u" --output=cat --no-pager --output-fields=_SOURCE_REALTIME_TIMESTAMP JOB_TYPE=stop CODE_FUNC=job_emit_done_message _SYSTEMD_UNIT=init.scope)
        duration_human=$(systemd-analyze timespan $((stopping_end - stopping_start))us | tail -1 | sed 's/.*: //')
        printf "%s\t%10s %s\n" $((stopping_end - stopping_start)) "$duration_human" "$u"
    done | sort -rn | cut -f 2
    

  • Speaking about Gentoo, you don’t “have to” compile everything, but let’s just say it’s strongly encouraged. Most of the compilation is automated though, think AUR on steroids. If you don’t want to touch anything, you can go with defaults for all the software and you’ll get basically what you get on any other distro.

    The thing is, though, if you are not being a little funny with your software, why the hell are you running Gentoo? So, it’s entirely optional, but it’s the main reason one would use Gentoo, otherwise you get a stock standard system with stupidly long updates.

    I can’t speak for Nix, though, I haven’t touched it myself, but from what I know from those around me running it, it’s pretty much the same thing, unless you want something cool, you don’t have to suffer.