Giter Site home page Giter Site logo

loadavg's Introduction

Loadavg

  1. What is LoadAvg?

    Is a simple go program with agent and a html generator to produce a static HTML file of a normalized load average server group

  2. What is needed to build?

    • go-lang

    • git

    • A redis server reachable from both agent and parser component.

  3. Where it works?

    Has been tested on Linux,OpenBSD and FreeBSD.

  4. How it works?

    Agent component send to redis server the normalized loadaverage calculated on 5 minutes timeframe. Parser component, that needs to be executed manually or by cron, fetch data from redis and produce a file called loadavg.html

Examples

Follow these steps:
  1. Clone the repository

  2. Enter this command to build both agent and parser component

    # go build loadavg_get.go
    # go build loadavg_put.go
  3. Copy the loadavg_put binary on servers that you want to monitor

  4. Execute the binary:

    # nohup ./loadavg_put -redis=foo.bar.com &
  5. or, still better:

    # cp loadavg_put.service /lib/systemd/system
    # vim /lib/systemd/system/loadavg_put.service   # Edit the $REDIS variable.
    # systemctl daemon-reload
    # systemctl enable loadavg_put.service
    # systemctl start loadavg_put.service
Important
Don’t forget to edit $REDIS variable inside loadavg_put.service before to start it.
  1. Run parser component to get data from redis and produce HTML.

    # ./loadavg_get -redis=foo.bar.com
  2. Open loadavg.html file with your browser

How to read data
A -1 with green background

Means that no data has been retrieved for that server in that particular timeframe

A >= 1 with red background

Means that normalized loadaverage is >=1, so all your core are currently busy.

A 0 with white background

Means that load average is between 0 and 1, so it’s all ok.

ScreenShot

example
Figure 1. Sample

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.