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…

  • paequ2@lemmy.today
    link
    fedilink
    arrow-up
    39
    ·
    edit-2
    21 hours ago

    Wow. wat. This is top??

    top

    The only reason I use htop is because I never bothered to learn top. I’m totally down to avoid downloading and installing another utility though. The time to learn top is TODAY!

    • Ephera@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      10
      ·
      20 hours 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
        2
        ·
        4 hours 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.

      • utopiah@lemmy.ml
        link
        fedilink
        arrow-up
        2
        ·
        8 hours 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
          ·
          8 hours 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
            1
            ·
            edit-2
            35 minutes 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
          ·
          10 hours 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…

      • Shadow@lemmy.ca
        link
        fedilink
        arrow-up
        13
        ·
        edit-2
        20 hours ago

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

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

      • IsoKiero@sopuli.xyz
        link
        fedilink
        English
        arrow-up
        2
        ·
        14 hours 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.