Menu

#8 process filter (or search) using vi[m]-like /pattern

open
None
5
2016-02-03
2006-12-18
No

Hi,
I would like to have a new interactive command to search for a process name in top. I find it difficult to find specific processes, simply because there are too many, and the prompt window isn't tall enough to view the process.

So as a solution, similar to vi (or vim), less and firefox, the '/pattern' command could be used to filter (or search) the process names using a pattern. This command is initiated using the '/' followed by a pattern, such as 'mozilla' for anything that has "mozilla" or '^m' for anything that starts with "m". Similar to vim and less, this pattern would be a regular expression, as recognized by ed. I suppose 'ESC' could be used to release the filter (similar to how 'ESC' escapes from the help window in top).

Thanks for your consideration of this request!

Discussion

  • William LeFebvre

    • assigned_to: nobody --> wnl
     
  • William LeFebvre

    Logged In: YES
    user_id=687210
    Originator: NO

    This is a great idea! Unfortunately in the current design of top its implementation can only be done in the platform-specific modules, meaning that it would end up being a platform-specific feature.

    Well, I guess with some help from the platform module I could implement it in the system independent code. I will ponder it.

     
  • Valerii Valeev

    Valerii Valeev - 2016-02-03

    I agree, there're tons of questions how to do that over the internet and suggested workarounds usually select only processes running at the moment top is started.

     

Log in to post a comment.