Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #87370 > unrolled thread
| Started by | Skip Montanaro <skip.montanaro@gmail.com> |
|---|---|
| First post | 2015-03-13 10:17 -0500 |
| Last post | 2015-03-15 10:23 +0100 |
| Articles | 10 — 3 participants |
Back to article view | Back to comp.lang.python
Pexpect idea - but can I handle curses? Skip Montanaro <skip.montanaro@gmail.com> - 2015-03-13 10:17 -0500
Re: Pexpect idea - but can I handle curses? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-03-13 16:54 +0100
Re: Pexpect idea - but can I handle curses? Skip Montanaro <skip.montanaro@gmail.com> - 2015-03-13 11:20 -0500
Re: Pexpect idea - but can I handle curses? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-03-13 18:03 +0100
Re: Pexpect idea - but can I handle curses? Skip Montanaro <skip.montanaro@gmail.com> - 2015-03-13 12:25 -0500
Re: Pexpect idea - but can I handle curses? Christian Gollwitzer <auriocus@gmx.de> - 2015-03-13 23:47 +0100
Re: Pexpect idea - but can I handle curses? Skip Montanaro <skip.montanaro@gmail.com> - 2015-03-13 19:14 -0500
Re: Pexpect idea - but can I handle curses? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-03-14 20:19 +0100
Re: Pexpect idea - but can I handle curses? Skip Montanaro <skip.montanaro@gmail.com> - 2015-03-14 20:05 -0500
Re: Pexpect idea - but can I handle curses? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-03-15 10:23 +0100
| From | Skip Montanaro <skip.montanaro@gmail.com> |
|---|---|
| Date | 2015-03-13 10:17 -0500 |
| Subject | Pexpect idea - but can I handle curses? |
| Message-ID | <mailman.325.1426259880.21433.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
I have this tweak I'd like to make to the top command (Linux only is fine). Most of the time I want to see just one user or all users. Every now and again though, I'd like to see all users except another. Top doesn't support this functionality, but I thought something like "-u -root" would be a handy extension. Another would be to watch multiple users, e.g. -u skip,bob. I thought I could fire up a top command showing all users in a pseudo tty with a fake huge number of lines, then elide the rows matching unwanted users. However... I have a feeling I might be fairly seriously challenged trying to work with top's raw output, as it probably does something more sophisticated than clear the screen and spit out rows. Will I be in over my head trying to tweak the output? Hmmm... maybe if I tell top TERM=dumb? Anyway, before I get in over my head on the input side, I thought I would check to see if I'm likely to hit a brick wall on the output side... Thx, Skip
[toc] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2015-03-13 16:54 +0100 |
| Message-ID | <1606564.hXcnK9StvT@PointedEars.de> |
| In reply to | #87370 |
Skip Montanaro wrote: > I have this tweak I'd like to make to the top command (Linux only is > fine). Most of the time I want to see just one user or all users. Every > now and again though, I'd like to see all users except another. Top > doesn't support this functionality, Yes, it (top(1) from procps-ng 3.3.9) does. Either run top -u '!root' or type “o” (for case-insensitive filter), then e.g. “!USER=root” to show processes started by all users except “root”. RTFM. -- PointedEars Twitter: @PointedEars2 Please do not cc me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | Skip Montanaro <skip.montanaro@gmail.com> |
|---|---|
| Date | 2015-03-13 11:20 -0500 |
| Message-ID | <mailman.331.1426263615.21433.python-list@python.org> |
| In reply to | #87371 |
[Multipart message — attachments visible in raw view] — view raw
On Fri, Mar 13, 2015 at 10:54 AM, Thomas 'PointedEars' Lahn < PointedEars@web.de> wrote: > Yes, it (top(1) from procps-ng 3.3.9) does. Either run > > top -u '!root' > > or type “o” (for case-insensitive filter), then e.g. “!USER=root” to show > processes started by all users except “root”. RTFM. > Neither works on what I have available at work (OpenSuSE 12.2). -u only accepts a single user name or id in my world. -o doesn't exist at all. Thanks for the pointer though. Skip
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2015-03-13 18:03 +0100 |
| Message-ID | <1597615.KAoEH8zO7A@PointedEars.de> |
| In reply to | #87373 |
Skip Montanaro wrote: > Thomas 'PointedEars' Lahn […] wrote: >> Yes, it (top(1) from procps-ng 3.3.9) does. Either run >> >> top -u '!root' >> >> or type “o” (for case-insensitive filter), then e.g. “!USER=root” to show >> processes started by all users except “root”. RTFM. > > Neither works on what I have available at work (OpenSuSE 12.2). -u only > accepts a single user name or id in my world. -o doesn't exist at all. “o” is not an option, it is an interaktive keystroke command in (my) top(1). Press “h” for help (I found out this way while reading your posting). OpenSUSE 12.2 has procps 3.3.3 which does not support “-u '!$USER'” yet; however, OpenSUSE 12.2 has reached its end-of-life on 2014-01-27. > Thanks for the pointer though. You’re welcome. -- PointedEars Twitter: @PointedEars2 Please do not cc me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | Skip Montanaro <skip.montanaro@gmail.com> |
|---|---|
| Date | 2015-03-13 12:25 -0500 |
| Message-ID | <mailman.332.1426267525.21433.python-list@python.org> |
| In reply to | #87375 |
On Fri, Mar 13, 2015 at 12:03 PM, Thomas 'PointedEars' Lahn <PointedEars@web.de> wrote: > “o” is not an option, it is an interaktive keystroke command in (my) top(1). "o" is also an unrecognized keystroke. > OpenSUSE 12.2 has reached its end-of-life on 2014-01-27. I understand that. Tell that to management though. They were working on 13.1 for awhile, but seem to be focused on 13.2 now, though not all our internal software works on that. I'll give up on hoping I get access to a more modern top anytime soon. Can someone give me some feedback on my harebrained pexpect idea? Skip
[toc] | [prev] | [next] | [standalone]
| From | Christian Gollwitzer <auriocus@gmx.de> |
|---|---|
| Date | 2015-03-13 23:47 +0100 |
| Message-ID | <mdvpbo$obe$1@dont-email.me> |
| In reply to | #87377 |
Am 13.03.15 um 18:25 schrieb Skip Montanaro: > I understand that. Tell that to management though. They were working > on 13.1 for awhile, but seem to be focused on 13.2 now, though not all > our internal software works on that. > > I'll give up on hoping I get access to a more modern top anytime soon. Why? Do you not have a C compiler? Christian
[toc] | [prev] | [next] | [standalone]
| From | Skip Montanaro <skip.montanaro@gmail.com> |
|---|---|
| Date | 2015-03-13 19:14 -0500 |
| Message-ID | <mailman.344.1426292088.21433.python-list@python.org> |
| In reply to | #87393 |
[Multipart message — attachments visible in raw view] — view raw
On Fri, Mar 13, 2015 at 5:47 PM, Christian Gollwitzer <auriocus@gmx.de> wrote: > Why? Do you not have a C compiler? Sure I do, and I'm not afraid to use it. I realize top is just one not-terribly-critical tool, but every divergence between my machines and the "standard" install just makes it that much more difficult for me to track changes when our IT group *does* move us to a more up-to-date environment. I develop and build software which runs in a production environment. I can't afford to diverge more than absolutely necessary. Let's just let this thread die, shall we? So far, nobody seems interested in attempting to answer my original question. I thought it might be an interesting hack if I could make it work. If I plunge in and try it, I will report back with results. Skip
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2015-03-14 20:19 +0100 |
| Message-ID | <3609192.4N8UZPzsLB@PointedEars.de> |
| In reply to | #87397 |
Skip Montanaro wrote: > Let's just let this thread die, shall we? So far, nobody seems interested > in attempting to answer my original question. That might have to do with <http://www.catb.org/~esr/faqs/smart-questions.html>, specifically <http://www.catb.org/~esr/faqs/smart-questions.html#prune>. -- PointedEars Twitter: @PointedEars2 Please do not cc me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | Skip Montanaro <skip.montanaro@gmail.com> |
|---|---|
| Date | 2015-03-14 20:05 -0500 |
| Message-ID | <mailman.384.1426381564.21433.python-list@python.org> |
| In reply to | #87443 |
[Multipart message — attachments visible in raw view] — view raw
> That might have to do with > <http://www.catb.org/~esr/faqs/smart-questions.html>, specifically > <http://www.catb.org/~esr/faqs/smart-questions.html#prune>. Thanks, but not really helpful. I'm well aware of Eric Raymond's contributions to the open source world. I'm also aware aware that my question was not perfectly well-formed. Skip
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2015-03-15 10:23 +0100 |
| Message-ID | <15698001.HJZeQnlvbi@PointedEars.de> |
| In reply to | #87460 |
Skip Montanaro wrote: >> That might have to do with >> <http://www.catb.org/~esr/faqs/smart-questions.html>, specifically >> <http://www.catb.org/~esr/faqs/smart-questions.html#prune>. > > Thanks, but not really helpful. I'm well aware of Eric Raymond's > contributions to the open source world. I'm also aware aware that my > question was not perfectly well-formed. It was really helpful, you just do not realize it yet. F'up2 poster -- PointedEars Twitter: @PointedEars2 Please do not cc me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web