go install
. For example:go install github.com/nats-io/[email protected]
.sudo
depending on your setup. If you receive an error that you cannot install nats-top because your $GOPATH is not set, when in fact it is set, use command sudo -E go get github.com/nats-io/nats-top
to install nats-top. The -E
flag tells sudo to preserve the current user's environment.nats-top
and optional arguments.-m monitor
-n num_connections
-d delay_in_secs
-sort by
o<option>
command to set the primary sort key to the <option>
value. The option value can be one of the following: cid
, subs
, pending
, msgs_to
, msgs_from
, bytes_to
, bytes_from
, lang
, version
.-sort
flag. For example: nats-top -sort bytes_to
.n<limit>
command to set the sample size of connections to request from the server.-n num_connections
flag. For example: nats-top -n 1
.n<limit>
is used in conjunction with -sort
, the server will respect both options allowing queries such as the following: Query for the connection with largest number of subscriptions: nats-top -n 1 -sort subs
.s
command to toggle displaying connection subscriptions.?
command to show help message with options.q
command to quit nats-top.