Page MenuHomeFreeBSD

Enhance top(1) to filter on multiple usernames

Authored by gahr on Aug 3 2017, 11:32 AM.



Currently, top(1) interactive mode features a 'u' command to filter the view so
that only processes owned by a given username are displayed.

This changeset enhances the filtering to support the two additional formats
"+username" and "-username". This allows to display processes owned by a set of
usernames. Additionally to resetting the default (pass-all) filter with a
single "+", this changeset allows for the same behaviour with a single "-".

The maxium allowed number of usernames is currently hard-coded to 8 with a
macro. I am open to i) change the number or ii) make it dynamic at runtime, if
any is desired.

Test Plan

No automatic test plan. Manual UI testing was performed.

Diff Detail

rS FreeBSD src repository - subversion
Lint Not Applicable
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Aug 3 2017, 11:35 AM
gahr edited edge metadata.

Fix style(9) in usr.bin/top/machine.c

This revision now requires review to proceed.Aug 3 2017, 11:46 AM
This revision is now accepted and ready to land.Aug 3 2017, 11:52 AM
This revision was automatically updated to reflect the committed changes.