Page MenuHomeFreeBSD

Enhance top(1) to filter on multiple usernames
ClosedPublic

Authored by gahr on Aug 3 2017, 11:32 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 14 2024, 12:03 AM
Unknown Object (File)
Feb 3 2024, 8:02 PM
Unknown Object (File)
Jan 14 2024, 7:22 AM
Unknown Object (File)
Jan 13 2024, 3:50 AM
Unknown Object (File)
Dec 23 2023, 5:08 AM
Unknown Object (File)
Dec 16 2023, 5:27 AM
Unknown Object (File)
Nov 15 2023, 9:25 AM
Unknown Object (File)
Nov 11 2023, 8:22 AM
Subscribers

Details

Summary

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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 10835
Build 11227: arc lint + arc unit

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.