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)
Wed, Dec 4, 7:10 AM
Unknown Object (File)
Nov 18 2024, 1:30 PM
Unknown Object (File)
Oct 12 2024, 4:37 PM
Unknown Object (File)
Oct 5 2024, 7:50 PM
Unknown Object (File)
Oct 3 2024, 2:09 AM
Unknown Object (File)
Oct 2 2024, 9:20 PM
Unknown Object (File)
Oct 1 2024, 2:00 PM
Unknown Object (File)
Sep 30 2024, 6:34 PM
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 Not Applicable
Unit
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.