Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopt termui framework and gnatsd 0.6.4 changes #7

Merged
merged 22 commits into from
Aug 18, 2015

Conversation

wallyqs
Copy link
Member

@wallyqs wallyqs commented Aug 16, 2015

This is a rewrite of the nats-top tool using the gizak/termui framework.
It also adopts the latest changes in gnatsd monitor server to make it possible to query the server using limit and sort options and displaying slow consumers:

gnatsd version 0.6.4 (uptime: 31m42s)
Server:
  Load: CPU: 0.8%   Memory: 5.9M  Slow Consumers: 0
  In:   Msgs: 34.2K  Bytes: 3.0M  Msgs/Sec: 37.9  Bytes/Sec: 3389.7
  Out:  Msgs: 68.3K  Bytes: 6.0M  Msgs/Sec: 75.8  Bytes/Sec: 6779.4

Connections: 4
  HOST                 CID      SUBS    PENDING     MSGS_TO     MSGS_FROM   BYTES_TO    BYTES_FROM  LANG     VERSION
  127.0.0.1:56134      2        5       0           11.6K       11.6K       1.1M        905.1K      go       1.1.0
  127.0.1.1:56138      3        1       0           34.2K       0           3.0M        0           go       1.1.0
  127.0.0.1:56144      4        5       0           11.2K       11.1K       873.5K      1.1M        go       1.1.0
  127.0.0.1:56151      5        8       0           11.4K       11.5K       1014.6K     1.0M        go       1.1.0

Help message with more info on the feature set:

- o [option]

Set primary sort key to [option]:

Keyname may be one of: {cid, subs, msgs_to, msgs_from, bytes_to, bytes_from}

This can be set in the command line too, e.g. nats-top -sort bytes_to

- n [limit]

Set sample size of connections to request from the server.

This can be set in the command line as well: nats-top -n 1 Note that
if used in conjunction with sort, the server would respect both
options enabling queries like connection with largest number of
subscriptions: nats-top -n 1 -sort subs

- ?

Show help message with options.

- q

Quit nats-top.

@derekcollison
Copy link
Member

I really like this but think it should be a separate tool, with the original keeping the "top" like familiarity..

@wallyqs
Copy link
Member Author

wallyqs commented Aug 18, 2015

Ok it would be simple to remove the graphs part as a different tool (nats-htop?) and just include the gnatsd 0.6.4 changes (slow consumers, pending size, sort+limit, etc...) in this PR, I will update it.

@derekcollison
Copy link
Member

I think that is good, not sure what to call the new terminal/graph one yet,
but let's keep nats-top like linux top with 0.6.4 changes.

On Mon, Aug 17, 2015 at 9:00 PM, Waldemar Quevedo notifications@github.com
wrote:

Ok it would be simple to remove the graphs part as a different tool
(nats-htop?) and just include the gnatsd 0.6.4 changes (slow consumers,
pending size, sort+limit, etc...) in this PR, I will update it.


Reply to this email directly or view it on GitHub
#7 (comment).

@wallyqs
Copy link
Member Author

wallyqs commented Aug 18, 2015

Updated the branch to focus on having top like functionality and 0.6.4 changes, ok let me think a bit further on the name for the nats tool with graphs too.

@derekcollison
Copy link
Member

ok so is this good to merge?

@wallyqs
Copy link
Member Author

wallyqs commented Aug 18, 2015

Just made an update to clear the message shown on invalid sort options, ok to merge now. Thanks.

derekcollison added a commit that referenced this pull request Aug 18, 2015
Adopt termui framework and gnatsd 0.6.4 changes
@derekcollison derekcollison merged commit 2aec812 into nats-io:master Aug 18, 2015
@wallyqs wallyqs deleted the adopt-termui branch August 21, 2015 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants