Always thought top was one of those programs frozen in time since the 70s, but apparently, it has a feature set comparable to htop and the like. The default configuration just doesn’t show much of it…

  • Ephera@lemmy.mlOP
    link
    fedilink
    English
    arrow-up
    11
    ·
    2 days ago

    Yeah, I would often just grab htop because I had no idea how to read the CPU usage out of top.
    For example, for me it says:

    %Cpu(s):  0,4 us,  0,4 sy,  0,0 ni, 98,8 id,  0,0 wa,  0,3 hi,  0,0 si,  0,0 st
    

    Now that I look at it, I can guess that us and sy are supposed to be user and system time. And I guess id is supposed to be idle.
    I have no guess what the other numbers might be, though. And well, I would often like to see the CPU usage per core.
    Now I know that I can just press 1t and get effectively the same view as in htop.

    I might learn top’s filtering workflow, too. But so far, I always killed processes with ps -ef | grep <process-name> and then kill <pid>, which isn’t particularly more cumbersome, so will see…

    • paequ2@lemmy.today
      link
      fedilink
      arrow-up
      3
      ·
      1 day ago

      I would often just grab htop because I had no idea how to read the CPU usage out of top.

      lol, same! 1t gets me 90% of the functionality I use in htop.

    • Shadow@lemmy.ca
      link
      fedilink
      arrow-up
      12
      ·
      edit-2
      2 days ago

      Wa is IO Wait. CPU time burned spent waiting for disk

      Hi is hardware irq, similar concept but for hardware devices.

    • utopiah@lemmy.ml
      link
      fedilink
      arrow-up
      2
      ·
      1 day ago

      I always killed processes with ps -ef | grep <process-name> and then kill <pid>

      you could check pgrep <process-name> too

      • Ephera@lemmy.mlOP
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 day ago

        That is a good tip. Unfortunately, I am too fish to understand it. 🙃

        I just type ps and in 9 out of 10 cases, my shell suggests ps -ef | grep <process-name>. So, it’s actually less for me to type than “pgrep”…

        • utopiah@lemmy.ml
          link
          fedilink
          arrow-up
          2
          ·
          edit-2
          1 day ago

          Far from me to try to bash a suggestion’s on one’s head but ^rpg or ^r<process-name> (for reverse-i-search) is probably quite fast, obviously depends entirely on your typical usage. Hard to do less than 2 keystrokes I admit.

      • Ephera@lemmy.mlOP
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 day ago

        Ah, that was a brainfart. I do use pkill primarily. I just use the other command, when I’m not sure what the process is called…

    • IsoKiero@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      3
      ·
      2 days ago

      I always killed processes with ps -ef | grep <process-name>

      From top man-page global commands:

      • k :Kill-a-task

             You will be prompted for a PID and then the signal to send.