I’ve been setting up a new Proxmox server and messing around with VMs, and wanted to know what kind of useful commands I’m missing out on. Bonus points for a little explainer.

Journalctl | grep -C 10 'foo' was useful for me when I needed to troubleshoot some fstab mount fuckery on boot. It pipes Journalctl (boot logs) into grep to find ‘foo’, and prints 10 lines before and after each instance of ‘foo’.

  • Breadhax0r@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    6 hours ago

    Ooooh cool, I think this explains how they have our raid monitor set up at work! I keep forgetting to poke through the script

    • Lettuce eat lettuce@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      2 hours ago

      Yeah, it’s a neat little tool. I used it recently at my work. We had a big list of endpoints that we needed to make sure were powered down each night for a week during a patching window.

      A sysadmin on my team wrote a script that pinged all of the endpoints in the list and returned only the ones that still were getting a response, that way we could see how many were still powered on after a certain time. But he was just manually running the script every few minutes in his terminal.

      I suggested using the watch command to execute the script, and then piping the output into the sort command so the endpoints were nicely alphabetical. Worked like a charm!