Git Product home page Git Product logo

nodestat's Introduction

Nodestat

Python Paramiko SCP

A simple commandline tool that connects to a list of hosts in the network and checks their basic usage statistics. nodestat

Installation

Simplest way: Compiled C version without any dependencies:

$ git clone https://github.com/tszoldra/nodestat.git
$ cd nodestat
$ ./main ns.conf

# resize the terminal to have a wide window

Python version: Installation of dependencies via requirements.txt:

$ git clone https://github.com/tszoldra/nodestat.git
$ cd nodestat
$ python3 -m venv myenv
$ source myenv/bin/activate
$ pip3 install -r requirements.txt
$ python3 main.py ns.conf

# resize the terminal to have a wide window

Usage

For C compiled version the program help:

$ ./main -h

or (in Python version)

$ python3 main.py -h

gives the following output:

usage: main.py [-h] [-n NAME [NAME ...]] [-s] config_file

Show usage of computation nodes. Warning: resize the terminal window to a large width.

positional arguments:
  config_file           configuration file

optional arguments:
  -h, --help            show this help message and exit
  -n NAME [NAME ...], --name NAME [NAME ...]
                        check only nodes given in the command line (discarding those from config file)
  -s, --short           show the basic info only

Replace the values in ns.conf.example with your values and rename this file to ns.conf:

  • REMOTE_HOSTNAME_LIST: IP addresses or URLs of remote hosts with spaces between, eg. 'zoa8 clone108'
  • REMOTE_USERNAME: Username for remote host.
  • REMOTE_PATH: Remote directory to serve as destination for temporary script file uploads.

Example how to show stats for nodes specified in the command line rather than in the config file:

./main ns.conf -n zoa8 clone107 

Remember to never commit secrets saved in config files to Github or anywhere else.


MIT License, forked from https://github.com/hackersandslackers/paramiko-tutorial

nodestat's People

Contributors

toddbirchard avatar tszoldra avatar renovate-bot avatar dependabot-preview[bot] avatar

Watchers

 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.