GithubHelp home page GithubHelp logo

isabella232 / nats-top Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nats-io/nats-top

0.0 0.0 0.0 288 KB

A top-like tool for monitoring NATS servers.

Home Page: https://nats.io

License: MIT License

Go 89.68% Shell 10.22% Makefile 0.10%

nats-top's Introduction

nats-top

MIT LicenseBuild StatusGitHub release

nats-top is a top-like tool for monitoring NATS servers.

$ nats-top

NATS server version 0.7.3 (uptime: 3m34s)
Server:
  Load: CPU:  58.3%  Memory: 8.6M  Slow Consumers: 0
  In:   Msgs: 568.7K  Bytes: 1.7M  Msgs/Sec: 13129.0  Bytes/Sec: 38.5K
  Out:  Msgs: 1.6M  Bytes: 4.7M  Msgs/Sec: 131290.9  Bytes/Sec: 384.6K    

Connections: 10
  HOST                 CID    NAME        SUBS    PENDING     MSGS_TO   MSGS_FROM   BYTES_TO    BYTES_FROM  LANG     VERSION  UPTIME   LAST ACTIVITY
  127.0.0.1:57487      13     example     1       12.0K       161.6K    0           484.7K      0           go       1.1.7    17s      2016-02-09 00:13:24.753062715 -0800 PST
  127.0.0.1:57488      14     example     1       11.9K       161.6K    0           484.7K      0           go       1.1.7    17s      2016-02-09 00:13:24.753040168 -0800 PST
  127.0.0.1:57489      15     example     1       12.1K       161.6K    0           484.7K      0           go       1.1.7    17s      2016-02-09 00:13:24.753069442 -0800 PST
  127.0.0.1:57490      16     example     1       12.0K       161.6K    0           484.7K      0           go       1.1.7    17s      2016-02-09 00:13:24.753057413 -0800 PST
  127.0.0.1:57491      17     example     1       12.1K       161.6K    0           484.7K      0           go       1.1.7    17s      2016-02-09 00:13:24.75307264 -0800 PST 
  127.0.0.1:57492      18     example     1       12.1K       161.6K    0           484.7K      0           go       1.1.7    17s      2016-02-09 00:13:24.753066213 -0800 PST
  127.0.0.1:57493      19     example     1       12.0K       161.6K    0           484.7K      0           go       1.1.7    17s      2016-02-09 00:13:24.753075802 -0800 PST
  127.0.0.1:57494      20     example     1       12.2K       161.6K    0           484.7K      0           go       1.1.7    17s      2016-02-09 00:13:24.753052178 -0800 PST
  127.0.0.1:57495      21     example     1       12.1K       161.6K    0           484.7K      0           go       1.1.7    17s      2016-02-09 00:13:24.753048615 -0800 PST
  127.0.0.1:57496      22     example     1       12.0K       161.6K    0           484.7K      0           go       1.1.7    17s      2016-02-09 00:13:24.753016783 -0800 PST

Install

Can be installed via go get:

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

and releases of the binary are also available

Usage

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]
  • -m http_port, -ms https_port

    Monitoring http and https ports from the NATS server.

  • -n num_connections

    Limit the connections requested to the server (default: 1024)

  • -d delay_in_secs

    Screen refresh interval (default: 1 second).

  • -sort by

    Field to use for sorting the connections.

  • -cert, -key, -cacert

    Client certificate, key and RootCA for monitoring via https.

  • -k

    Configure to skip verification of certificate.

Commands

While in top view, it is possible to use the following commands:

  • o [option]

    Set primary sort key to [option]:

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

    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

  • s

    Toggle displaying connection subscriptions.

  • d

    Toggle activating DNS address lookup for clients.

  • ?

    Show help message with options.

  • q

    Quit nats-top.

Demo

nats-top

nats-top's People

Contributors

derekcollison avatar philpennock avatar

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.