Git Product home page Git Product logo

sachart's Introduction

SaChart

This tool's objective is to answer the question, "Was the CPU load high last night when Foobar broke?" in a simple way that does not require complex monitoring systems. In conjunction with the lightweight sysstat daemon, this tool makes easy to read histograms in your shell.

There are two modes, CPU and NET mode.

CPU mode shows the data you're used to seeing in tools like htop, processor usage, memory usage, and per-core load average. NET mode displays total network throughput on all interfaces as a proportion of the highest measured value, and the system's run queue and blocked threads.

Output:

./sachart -cpu

TIME     | CPU                      | MEMORY                   | LOAD AVG
13:10:01 |@######                   |****                      ||||
13:15:01 |@######                   |****                      |||||
13:20:01 |@#######                  |****                      |||||
13:25:01 |@#######                  |****                      |||||
13:30:01 |@#######                  |****                      ||||||
13:35:01 |##                        |****                      ||||
13:40:01 |                          |****                      ||
13:45:01 |                          |****                      |

./sachart -net

TIME     | DOWNLOAD                 | UPLOAD                   | IO (RunQ + Blocked)
13:10:01 |===================       |========================  |
13:15:01 |=================         |========================  |--------------
13:20:01 |=====================     |========================= |--------
13:25:01 |========================= |========================  |-
13:30:01 |=======================   |========================  |---
13:35:01 |=====                     |=====                     |--
13:40:01 |                          |                          |
13:45:01 |                          |                          |

Previous days data can also be viewed by using the -days flag. For example, to see yesterday's CPU graph:

./sachart -cpu -days 1

TIME     | CPU                      | MEMORY                   | LOAD AVG
13:20:02 |                          |*                         |
13:25:01 |#                         |****                      |
13:30:01 |#                         |****                      |
13:35:01 |#                         |****                      ||
13:40:01 |@##                       |****                      |||

Sysstat setup

Make sure sysstat is installed:

sudo apt install sysstat

The service should be running:

sudo systemctl enable --now sysstat.service

And data collection should be enabled:

sudo sed -i 's/false/true/g' /etc/default/sysstat

sachart's People

Contributors

noahbailey avatar

Watchers

 avatar  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.