Bug 7253 - [PATCH] Make top(1) ignore itself
Summary: [PATCH] Make top(1) ignore itself
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 3.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dag-Erling Smørgrav
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1998-07-11 19:50 UTC by finrod
Modified: 1998-08-12 11:50 UTC (History)
0 users

See Also:


Attachments
file.diff (4.46 KB, patch)
1998-07-11 19:50 UTC, finrod
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description finrod 1998-07-11 19:50:00 UTC
For obvious reasons, top(1) usually ranks quite high on the list of
processes it displays. However, it is usually totally uninteresting
and quite annoying since it keeps bouncing up and down the list.

This patch adds a command-line switch (-t) and an interactive command
(t) to top(1) which make it ignore itself when listing processes.

How-To-Repeat: 
finrod@niobe ~$ top -b  
last pid:  1852;  load averages:  0.02,  0.06,  0.07    20:42:39
65 processes:  1 running, 64 sleeping

Mem: 40M Active, 12M Inact, 21M Wired, 6264K Cache, 8233K Buf, 45M Free
Swap: 512M Total, 128K Used, 512M Free


  PID USERNAME PRI NICE  SIZE    RES STATE    TIME   WCPU    CPU COMMAND
 1852 finrod    31   0  1084K   808K RUN      0:00  1.56%  0.08% top
  583 finrod     2   0  5532K  4952K select   2:18  0.00%  0.00% emacs
[...]
Comment 1 Poul-Henning Kamp freebsd_committer freebsd_triage 1998-07-22 07:18:35 UTC
State Changed
From-To: open->suspended

This sounds like a good task for Dag-Erling, doesn't it ?  :-) 


Comment 2 Poul-Henning Kamp freebsd_committer freebsd_triage 1998-07-22 07:18:35 UTC
Responsible Changed
From-To: freebsd-bugs->des
Comment 3 Poul-Henning Kamp 1998-07-22 10:05:17 UTC
>Yeah. The reason why I send-pr'ed it is that
>
> a) I'm not sure it's actually worth committing

I think it is.

> b) I'm not sure wether to commit the patch in our tree, or submit it
>    to the author of top, since I've made changes to the generic parts
>    of top, not just the FreeBSD-specific parts.

Ideally you should offer it to the maintainer of top, if they don't
want it or have gone missing, commit it to current.

--
Poul-Henning Kamp             FreeBSD coreteam member
phk@FreeBSD.ORG               "Real hackers run -current on their laptop."
"ttyv0" -- What UNIX calls a $20K state-of-the-art, 3D, hi-res color terminal
Comment 4 Dag-Erling Smørgrav freebsd_committer freebsd_triage 1998-08-12 11:50:23 UTC
State Changed
From-To: suspended->closed