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
    2
    ·
    edit-2
    8 hours ago

    I missed this part during my first read:

    This screen allows you to customise which fields are displayed in the currently selected window. Use cursor keys (or Alt + j and k) to move up and down this list, d to toggle whether a field is displayed and s to choose the field by which the window is sorted.

    and when I tried it, it seemed like my commands weren’t doing anything… so in case anyone else finds this helpful…

    How to sort columns in top.

    • Launch top
    • Press f (not SHIFT+F)
    • Use arrow keys or alt+j / alt+k to select a column
    • Press s to sort by the column you’ve currently selected
      • note: you won’t get any obvious feedback, this is normal… I guess
      • look at the top line: whose current sort field is $COLUMN_NAME
      • this line will change when you press s
    • Press q to exit the Fields Management screen
    • Selected column should now be sorted from largest to smallest

    At this point, top may not look like it sorted the selected column. It may be helpful to tell top to highlight the currently sorted column. Press x to do this.

    Now it should be easier to tell which column was sorted.