Giter VIP home page Giter VIP logo

nats-top's People

Contributors

bruth avatar danielcibrao-form3 avatar dependabot[bot] avatar derekcollison avatar dsidirop avatar ejtj3 avatar gcolliso avatar jarema avatar jnmoyne avatar mdawar avatar philpennock avatar samuelattwood avatar tamalsaha avatar wallyqs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nats-top's Issues

Add support for name ?

It will be really useful to have a 'name' column in addition to 'host', something like:

$ nats-top --name

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                 NAME      CID      SUBS    PENDING     MSGS_TO     MSGS_FROM   BYTES_TO    BYTES_FROM  LANG     VERSION SUBSCRIPTIONS
  127.0.0.1:56134      Service1  2        5       0           11.6K       11.6K       1.1M        905.1K      go       1.1.0   foo, hello
  127.0.1.1:56138      Service2  3        1       0           34.2K       0           3.0M        0           go       1.1.0    _INBOX.a96f3f6853616154d23d1b5072
  127.0.0.1:56144      Service1  4        5       0           11.2K       11.1K       873.5K      1.1M        go       1.1.0   foo, hello
  127.0.0.1:56151      Service3  5        8       0           11.4K       11.5K       1014.6K     1.0M        go       1.1.0   foo, hello

Obviously, on startup the client will have to report it's name.

Enrich README.md with an example of how to connect over to NATS servers that require authentication

Considering that nats-top doesn't support nats "contexts" (feel free to correct me if I'm wrong) it would be helpful to add a few examples on how to use '-key', '-cert' and '-cacert' parameters for those that have various kinds of authentication-schemes enabled on a nats-server - feel free to correct me again if I'm wrong.

Thanks in advance.

PS: It would also be nice to add a warning in the README.md file over the fact that the monitoring ports (8222) of NGS nats-clusters are by default out of reach for any outsider. So nats-top won't work there no matter how much one tries. Personally I always forget this very simple fact.

@wallyqs

nats-top master v0.2.0 doesn't build?

trying the release from a few minutes ago 0.2.0...
my nats might be out of date... that would explain it

jaten@jatens-MacBook-Pro ~/src/github.com/nats-io/nats-top (master) $ go install
# github.com/nats-io/nats-top
./nats-top.go:91: sortOpt.IsValid undefined (type server.SortOpt has no field or method IsValid\
)
./nats-top.go:310: sortOpt.IsValid undefined (type server.SortOpt has no field or method IsVali\
d)
jaten@jatens-MacBook-Pro ~/src/github.com/nats-io/nats-top (master) $ git log|head
commit 91905c84a3e9a4cf74eb36adfb8e7315c186f51c
Merge: 797e4b0 60f5ce4
Author: Waldemar Quevedo <[email protected]>
Date:   Sat Feb 13 20:40:10 2016 -0800

    Merge branch 'release-v0.2.0'

commit 60f5ce41be3debd7e102125903e7c93adeacd353
Author: Waldemar Quevedo <[email protected]>
Date:   Sat Feb 13 20:39:01 2016 -0800
jaten@jatens-MacBook-Pro ~/src/github.com/nats-io/nats-top (master) $ go version
go version go1.6rc2 darwin/amd64
jaten@jatens-MacBook-Pro ~/src/github.com/nats-io/nats-top (master) $ 

Add '--display-subscriptions-column' flag

When grabbing csv-snapshots via nats-top it's sometimes useful to display the subscriptions column but in order to do that we need a new '--display-subscriptions-column' flag.

PS: I'll take up on this errand and submit a pull request.

use dns hostname in nats-top host display

Thanks for the #28 fix. It is working great with the latest gnatsd.

A helpful addition would be to display the dns resolved host names (when possible), in place of the ip addresses of the hosts. While not always possible, when possible it certainly prevents much confusion and avoids the chore of painstakingly having to manually look up each ip address in the nats-top display. For example, running gnatsd db5f42d54e9aa1897d7e5ca31d6a1440e7e502c5 here is what I see:

  HOST                 CID      NAME            SUBS    PENDING     MSGS_TO     MSGS_FROM   BYTES_TO    BYTES_FROM
  19.11.1.77:52505      1        piper-ts-job    0       0           0           0           0           0
  19.11.129.2:39217     2        piper-ts-job    0       0           0           0           0           0
  19.11.1.144:49318     3        archiver        1       0           0           0           0           0

while it would be much more informative to see

  HOST                 CID      NAME            SUBS    PENDING     MSGS_TO     MSGS_FROM   BYTES_TO    BYTES_FROM
   production01:52505   1        piper-ts-job    0       0           0           0           0           0
      staging01:39217   2        piper-ts-job    0       0           0           0           0           0
  archiver_host:49318   3        archiver        1       0           0           0           0           0

or even

  HOST           IP             PORT  CID      NAME            SUBS    PENDING     MSGS_TO     MSGS_FROM   BYTES_TO    BYTES_FROM
   production01  19.11.1.77   :52505   1        piper-ts-job    0       0           0           0           0           0
      staging01  19.11.129.2  :39217   2        piper-ts-job    0       0           0           0           0           0
  archiver_host  19.11.1.144  :49318   3        archiver        1       0           0           0           0           0

install error

When running "go get" on the package, there are errors on build:

$ go get github.com/nats-io/nats-top

github.com/nats-io/nats-top

github.com/nats-io/nats-top/nats-top.go:236: par.HasBorder undefined (type *termui.Par has no field or method HasBorder)
github.com/nats-io/nats-top/nats-top.go:242: helpPar.HasBorder undefined (type *termui.Par has no field or method HasBorder)
github.com/nats-io/nats-top/nats-top.go:293: undefined: termui.EventCh
github.com/nats-io/nats-top/nats-top.go:305: undefined: termui.EventKey
github.com/nats-io/nats-top/nats-top.go:305: undefined: termui.KeyEnter
github.com/nats-io/nats-top/nats-top.go:331: undefined: termui.EventKey
github.com/nats-io/nats-top/nats-top.go:331: undefined: termui.KeyBackspace
github.com/nats-io/nats-top/nats-top.go:331: undefined: termui.KeyBackspace2
github.com/nats-io/nats-top/nats-top.go:342: undefined: termui.EventKey
github.com/nats-io/nats-top/nats-top.go:342: undefined: termui.KeyEnter
github.com/nats-io/nats-top/nats-top.go:342: too many errors

what the meanning of 127.0.01?

excuese me !
We have a cluster of Nats in ipv6 environment. The host address is 127.0.01:xxx. But the host address is the specific address such as 193.168.3.9:xxx when the nats is deployment in ipv4. We also find the message can't transfer to other cluster router in ipv6. But it's ok in ipv4 with the same configure. please help!

client cert tls support

currently nats-top goes blind when client certs are in use. It would be great to be able to supply the certs and CA to nats-top so it can monitor a secured gnatsd.

Identify gnatsd by pid/hostname/ip/port

I'm running two gnatsd on the same host, to allow blue-green deployment.

To aid in distinguishing which instance I am looking at, would be nice to indicate which port we are monitoring at the top of the nats-top display, as well as other details of the gnatsd process itself.

For example, currently:

NATS server version 0.7.5 (uptime: 7d6h15m45s) 
Server:
  Load: CPU:  0.1%  Memory: 13.7M  Slow Consumers: 0
  In:   Msgs: 1.1M  Bytes: 467.2M  Msgs/Sec: 0.0  Bytes/Sec: 0      
  Out:  Msgs: 1.5M  Bytes: 655.2M  Msgs/Sec: 0.0  Bytes/Sec: 0      
...

With proposed helpful distinguishing information in the top line:

NATS server version 0.7.5 (uptime: 7d6h15m45s)  pid:1078 on host: blue-green.org[10.0.0.12]  port:4443  https_port:18822
Server:
  Load: CPU:  0.1%  Memory: 13.7M  Slow Consumers: 0
  In:   Msgs: 1.1M  Bytes: 467.2M  Msgs/Sec: 0.0  Bytes/Sec: 0      
  Out:  Msgs: 1.5M  Bytes: 655.2M  Msgs/Sec: 0.0  Bytes/Sec: 0    
...  

Monitor all NATS servers in a cluster

So I've been running a little 2 node cluster, and watching one of the nodes with nats-top.

It was very surprising to see two out of the three clients disappear. But then I checked and realized that those two had simply failed over to the other gnatsd in the cluster. I had to verify this was the case by firing up a separate nats-top instance and pointing it at the other node in the cluster.

It would be of great utility and convenience to be able to monitor an entire cluster from one nats-top display.

Hence this suggestion: have one nats-top connect to all gnatsd in a cluster and provide information on all of them. I really want to see all that information in one place to not be panicked that some service has died unexpectedly.

Support for displaying raw bytes# (no kibibytes or mebibytes)

Essentially what the subject says. This feature along with some other command line flags can help grab accurate snapshots of benchmark-results when running nats-related benchmarks from the command line:

For example benchmarks that are run automatically using docker-compose.yaml with nats, microservices and robot-framework.

nats-top columns becomes offset if IPv6 is used

If IPv6 is used the columns in nats-top become offset. Not impacting functionality, just legibility.

NATS server version 0.8.0 (uptime: 26d2h18m19s)
Server:
  Load: CPU:  0.0%  Memory: 9.4M  Slow Consumers: 0
  In:   Msgs: 3.0M  Bytes: 1.7G  Msgs/Sec: 5.0  Bytes/Sec: 407
  Out:  Msgs: 2.9M  Bytes: 1.7G  Msgs/Sec: 4.0  Bytes/Sec: 405

Connections: 19
  HOST                 CID      NAME            SUBS    PENDING     MSGS_TO     MSGS_FROM   BYTES_TO    BYTES_FROM  LANG     VERSION  UPTIME   LAST ACTIVITY
  fe80::1ca1:378d:181f:1d32:58989 360                      0       0           0           117         0           24.2K       .NET     0.0.1    13d2h23m13s  2016-06-01 13:47:49.3332254 -0400 EDT
  fe80::1ca1:378d:181f:1d32:58999 362                      0       0           0           13          0           4.6K        .NET     0.0.1    13d2h22m44s  2016-06-01 13:14:38.6280105 -0400 EDT
  fe80::1ca1:378d:181f:1d32:50790 402                      31      0           370.3K      431.4K      421.6M      421.7M      .NET     0.0.1    10d20h43m52s  2016-06-14 14:18:56.5726337 -0400 EDT
  fe80::1ca1:378d:181f:1d32:50799 403                      0       0           0           144         0           42.8K       .NET     0.0.1    10d20h43m32s  2016-06-14 09:31:06.6342725 -0400 EDT
  fe80::1ca1:378d:181f:1d32:50804 404                      0       0           0           157         0           46.7K       .NET     0.0.1    10d20h42m44s  2016-06-14 13:31:05.9336501 -0400 EDT
  fe80::1ca1:378d:181f:1d32:55543 437                      0       0           0           59          0           16.8K       .NET     0.0.1    4d3h43m52s  2016-06-14 13:30:32.0765693 -0400 EDT
  fe80::1ca1:378d:181f:1d32:55610 438                      32      0           188.2K      211.6K      85.5M       85.6M       .NET     0.0.1    4d3h33m14s  2016-06-14 14:18:52.6675596 -0400 EDT
  fe80::1ca1:378d:181f:1d32:55621 439                      0       0           0           50          0           14.2K       .NET     0.0.1    4d3h33m2s  2016-06-14 11:30:30.6180111 -0400 EDT
  fe80::1ca1:378d:181f:1d32:63946 442                      34      0           140.0K      163.1K      159.4M      159.4M      .NET     0.0.1    4d2h34m56s  2016-06-14 14:18:55.3795956 -0400 EDT
  fe80::1ca1:378d:181f:1d32:63957 443                      0       0           0           53          0           15.6K       .NET     0.0.1    4d2h34m38s  2016-06-14 09:31:06.5612718 -0400 EDT
  fe80::1ca1:378d:181f:1d32:63962 444                      0       0           0           52          0           14.7K       .NET     0.0.1    4d2h33m57s  2016-06-14 13:31:05.859648 -0400 EDT
  fe80::1ca1:378d:181f:1d32:61690 449                      0       0           0           6           0           1.8K        .NET     0.0.1    4d0h47m46s  2016-06-10 14:12:12.5593914 -0400 EDT
  fe80::1ca1:378d:181f:1d32:61926 451                      31      0           216         216         86.9K       86.9K       .NET     0.0.1    4d0h12m59s  2016-06-14 14:18:35.4670198 -0400 EDT
  fe80::1ca1:378d:181f:1d32:61940 452                      0       0           0           1           0           343         .NET     0.0.1    4d0h12m15s  2016-06-10 14:06:55.9304056 -0400 EDT
  fe80::1ca1:378d:181f:1d32:55192 466                      0       0           0           6           0           1.3K        .NET     0.0.1    3h55m23s  2016-06-14 14:14:46.288869 -0400 EDT
  fe80::1ca1:378d:181f:1d32:55238 470                      0       0           0           0           0           0           .NET     0.0.1    3h51m19s  2016-06-14 10:27:37.689753 -0400 EDT
  fe80::1ca1:378d:181f:1d32:58159 489                      0       0           0           2.0K        0           273.0K      .NET     0.0.1    4m52s    2016-06-14 14:18:55.4706161 -0400 EDT
  fe80::1ca1:378d:181f:1d32:58160 490                      28      0           176         195         64.9K       64.9K       .NET     0.0.1    4m51s    2016-06-14 14:18:55.4695984 -0400 EDT
  10.133.161.7:8180    491                      1       0           1.9K        0           264.8K      0           .NET     0.0.1    4m21s    2016-06-14 14:18:55.4706161 -0400 EDT

Add a --version flag

Hi there

Can you add the usual --version flag ? Shouldn't be much work & I'm using those to make sure my install script works

nats-top: /varz smoke test failed: could not get stats from server: Get "http://127.0.0.1:8222/varz"

I am reading this tutorial and it's not working https://docs.nats.io/using-nats/nats-tools/nats_top/nats-top-tutorial

Getting Error when running below command

> nats-top
nats-top: /varz smoke test failed: could not get stats from server: Get "http://127.0.0.1:8222/varz": dial tcp 127.0.0.1:8222: connect: connection refused
usage: nats-top [-s server] [-m http_port] [-ms https_port] [-n num_connections] [-d delay_secs] [-r max] [-o FILE] [-l DELIMITER] [-sort by]
                [-cert FILE] [-key FILE ][-cacert FILE] [-k] [-b]

As you can see nats server is running properly.

> nats-server

[54914] 2022/05/31 04:50:44.038550 [INF] Starting nats-server
[54914] 2022/05/31 04:50:44.038654 [INF]   Version:  2.8.4
[54914] 2022/05/31 04:50:44.038657 [INF]   Git:      [not set]
[54914] 2022/05/31 04:50:44.038664 [INF]   Name:     NBK24NJDS2PRCTAWNOBAJMNHTQR6GIFR57JQ7O6PEKFB4MYHOQIUYWKO
[54914] 2022/05/31 04:50:44.038667 [INF]   ID:       NBK24NJDS2PRCTAWNOBAJMNHTQR6GIFR57JQ7O6PEKFB4MYHOQIUYWKO
[54914] 2022/05/31 04:50:44.039374 [INF] Listening for client connections on 0.0.0.0:4222
[54914] 2022/05/31 04:50:44.039595 [INF] Server is ready

Note: When I tried changing the port to 4222 using -m 4222 Then nat-server giving this error

[54914] 2022/05/31 04:51:30.463125 [ERR] 127.0.0.1:61339 - cid:4 - Client parser ERROR, state=0, i=0: proto='"GET /varz HTTP/1.1\r\nHost: 127.0."...'

and nats-top giving this error

> nats-top -m 4222
nats-top: /varz smoke test failed: could not get stats from server: Get "http://127.0.0.1:4222/varz": net/http: HTTP/1.x transport connection broken: malformed HTTP status code "{\"server_id\":\"NBK24NJDS2PRCTAWNOBAJMNHTQR6GIFR57JQ7O6PEKFB4MYHOQIUYWKO\",\"server_name\":\"NBK24NJDS2PRCTAWNOBAJMNHTQR6GIFR57JQ7O6PEKFB4MYHOQIUYWKO\",\"version\":\"2.8.4\",\"proto\":1,\"go\":\"go1.18.2\",\"host\":\"0.0.0.0\",\"port\":4222,\"headers\":true,\"max_payload\":1048576,\"client_id\":4,\"client_ip\":\"127.0.0.1\"}"
usage: nats-top [-s server] [-m http_port] [-ms https_port] [-n num_connections] [-d delay_secs] [-r max] [-o FILE] [-l DELIMITER] [-sort by]
                [-cert FILE] [-key FILE ][-cacert FILE] [-k] [-b]

Support using with nats context

What motivated this proposal?

Avoid inputting nats server and creds config again if I have configured multiple nats contexts

What is the proposed change?

Make this the default or interactively behavior of nats-top to fetch the config

Who benefits from this change?

People like me who has multi nats context in different env, them have different host and creds ~

What alternatives have you evaluated?

none yet

Nats streaming - Cant see subject name clearly

Im working against nats-streaming server , Can't see the subject name on natstop table clearly,
Instead i see 3 subjects with prefix of : INBOX or STAN .
Ex:
_INBOX.CjRaiQ9Kn5sKhGTJyeuDyb,
_STAN.acks.CjRaiQ9Kn5sKhGTJyeuE91,
_INBOX.CjRaiQ9Kn5sKhGTJyeuEEE

Why is that ?

Publish binaries to brew tap nats-io/nats-tools

What motivated this proposal?

It would be great to have a consistent installation procedure for all nats tools. Currently nats cli installation is done using brew tap nats-io/nats-tools. This tap also contains nsc tool (although currently outdated for whatever reason). Would be great to have nats-top in there as well.

What is the proposed change?

N/A

Who benefits from this change?

Any brew.sh user could install and upgrade nats-server, nats, nsc, nats-top easily.

What alternatives have you evaluated?

Manually downloading the binary from GitHub. Always a little annoying.

sort and limit

What happens when server has more than 1024 connections, does sort work properly?

Numbers that are not bytes are under-counted when formatted

The function Psize is being used to format all the number printed by nats-top but not all the numbers are bytes, the Psize function uses calculations for bytes (1024), these calculations will cause other numbers like message counts to be displayed under-counted especially with high numbers.

Take for example the current output from the demo server at https://demo.nats.io:8222/varz:

NATS server version 2.9.20 (uptime: 20d20h43m26s) 
Server: us-south-nats-demo
  ID:   NBEZOCAHBWFH46KO3YEL6IHPTYSTNZ5OH3U4JQ6BZVK4IXPVSULNU7JC
  Load: CPU:  0.0%  Memory: 54.1M  Slow Consumers: 9
  In:   Msgs: 972.5M  Bytes: 9.8G  Msgs/Sec: 0.0  Bytes/Sec: 0
  Out:  Msgs: 925.3K  Bytes: 276.8M  Msgs/Sec: 0.0  Bytes/Sec: 0

Here are the differences:

  • In messages: Displayed 972.5M (Raw number: 1019777182), should be 1.0B
  • Out messages: Displayed 925.3K (Raw number: 947585), should be 947.6K

host:port details missing over https

Thanks for the super new https monitoring capability!

One thing missing is the host and port identification. They are only listed as ":0" now. Here's screen scrape:

NATS server version 0.7.3 (uptime: 44s)
Server:
  Load: CPU:  2.7%  Memory: 11.3M  Slow Consumers: 0 
  In:   Msgs: 136  Bytes: 52.3K  Msgs/Sec: 0.0  Bytes/Sec: 0    
  Out:  Msgs: 272  Bytes: 104.7K  Msgs/Sec: 0.0  Bytes/Sec: 0    

Connections: 4
  HOST                 CID      NAME            SUBS    PENDING     MSGS_TO     MSGS_FROM   BYTE
  :0                   1        archiver        1       0           136         0           52.3
  :0                   2        archiver        1       0           136         0           52.3
  :0                   3        piper-ts-job    0       0           0           5           0
  :0                   4        piper-ts-job    0       0           0           131         0

Missing zips artifacts

The other nats projects provide zip artifacts, it would be nice if that project could do the same thing.

Error starting nats-top without any options

nats-top: could not get stats from server: Get http://127.0.0.1:8222/varz: dial tcp 127.0.0.1:8222: connect: connection refused

usage: nats-top [-s server] [-m http_port] [-ms https_port] [-n num_connections] [-d delay_secs] [-sort by]
                [-cert FILE] [-key FILE ][-cacert FILE] [-k]

Compatibility with current versions of nats

When I use nats-top with a current version of nats it complains and fails:

8934] 2020/05/24 22:09:23.784078 [ERR] 127.0.0.1:37908 - cid:5 - Client parser ERROR, state=0, i=0: proto='"\x16\x03\x01\x00\u007f\x01\x00\x00{\x03\x03\xdb\xe6\xb3&\"k\x9b\a\xa9s\xee\a(V\xcc~4\xcek\xa5\x02"...'
[8934] 2020/05/24 22:09:23.784087 [DBG] 127.0.0.1:37908 - cid:5 - Client connection closed: Protocol Violation

If I try to compile nats-top it doesn't work either:

./nats-top.go:114:17: cannot use sortOpt (type "github.com/nats-io/gnatsd/server".SortOpt) as type "github.com/nats-io/nats-top/vendor/github.com/nats-io/gnatsd/server".SortOpt in assignment
./nats-top.go:348:3: cannot use &"github.com/nats-io/gnatsd/server".Varz literal (type *"github.com/nats-io/gnatsd/server".Varz) as type *"github.com/nats-io/nats-top/vendor/github.com/nats-io/gnatsd/server".Varz in field value
./nats-top.go:349:3: cannot use &"github.com/nats-io/gnatsd/server".Connz literal (type *"github.com/nats-io/gnatsd/server".Connz) as type *"github.com/nats-io/nats-top/vendor/github.com/nats-io/gnatsd/server".Connz in field value
./nats-top.go:433:22: cannot use sortOpt (type "github.com/nats-io/gnatsd/server".SortOpt) as type "github.com/nats-io/nats-top/vendor/github.com/nats-io/gnatsd/server".SortOpt in assignment

Leafs View

Hi,

Is it planned to add a view / option so we can display all active leafs? That would be extremely useful.

Thanks in advance!

Build issues on 1.5.1

$ go get -u -v github.com/nats-io/nats-top
github.com/nats-io/nats-top (download)
github.com/gizak/termui (download)
github.com/mattn/go-runewidth (download)
github.com/nsf/termbox-go (download)
github.com/nats-io/gnatsd (download)
github.com/nats-io/nats-top
# github.com/nats-io/nats-top
../../../../nats-io/nats-top/nats-top.go:236: par.HasBorder undefined (type *termui.Par has no field or method HasBorder)
../../../../nats-io/nats-top/nats-top.go:242: helpPar.HasBorder undefined (type *termui.Par has no field or method HasBorder)
../../../../nats-io/nats-top/nats-top.go:293: undefined: termui.EventCh
../../../../nats-io/nats-top/nats-top.go:305: undefined: termui.EventKey
../../../../nats-io/nats-top/nats-top.go:305: undefined: termui.KeyEnter
../../../../nats-io/nats-top/nats-top.go:331: undefined: termui.EventKey
../../../../nats-io/nats-top/nats-top.go:331: undefined: termui.KeyBackspace
../../../../nats-io/nats-top/nats-top.go:331: undefined: termui.KeyBackspace2
../../../../nats-io/nats-top/nats-top.go:342: undefined: termui.EventKey
../../../../nats-io/nats-top/nats-top.go:342: undefined: termui.KeyEnter
../../../../nats-io/nats-top/nats-top.go:342: too many errors
$ go version
go version go1.5.1 linux/amd64
sajal@sajal-lappy:~/go/src/github.com/turbobytes/analyzerplusplus/go/newrealtime$ uname -a
Linux sajal-lappy 3.16.0-53-generic #72~14.04.1-Ubuntu SMP Fri Nov 6 18:17:23 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
$ 

My guess is some non-backwards compatible changes in github.com/gizak/termui package? If so then let me know a working commit hash I can clone it manually.

Please make artifact filenames with the same pattern as other nats-io projects

  • nats-server uses <name>-<version>-<os>-<arch>
  • natscli uses <name>-<version>-<os>-<arch>

nats-top uses a mix of - and _.
<name>-<version>_<os>_<arch>

This and zip artifacts talked about in #74 would make scripting installations a lot easier, keeping the different projects consistent.
Or at least use one of dash and underscore, not both.

While you are at it, please make the contents of the archive like the other projects mentioned above. Their archive contains a subfolder with the same name as the archive and not directly in the root of the archive like this project does.

Support saving a snapshot of the output to a file

Something like:

      nats-top    -o    snapshot.txt
      nats-top    -o    -    # this prints to standard output

This will save the first "terminal output" generated by nats into the file 'snapshot.txt' and then nats-top will exit.

New flag '-l' to set the column-separator when saving snapshot via '-o' to a file

Would it make sense to introduce an additional flag on top of '-o' which would set the column-separator in the grid? For example if we want the generated text file to be used as .csv later on it would make sense to set the separator to ",".

Currently I perform this sort of thing via a script in our of our CI tasks to make the output more presentable.

Just an idea of the top of my head ("thinking out loud") - let me know what you think @wallyqs

delist dead client connections

When clients disappear, or go inactive, it would be nice to be able to clear them from the nats-top display, either automatically (say after an hour of no contact?) or manually (say a keypress to say "show me only active clients").

Currently old clients continue to be listed even though their process has died.

Maybe this is actually a gnatsd issue instead?

Allow use of CTRL-Z

It seems the framework is making it not possible to respond to some signals.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.