Giter Site home page Giter Site logo

hgn / monetta Goto Github PK

View Code? Open in Web Editor NEW
5.0 4.0 0.0 1.56 MB

HTTP Monitoring Server/Client for Systemd based Systems

Makefile 1.45% HTML 22.39% Python 42.70% CSS 1.95% JavaScript 31.51%
systemd linux monitoring logging logger journalctl interrupts processing cpu-monitoring process-monitor

monetta's Introduction

Monetta - Linux Monitoring Daemon

A Lightweight1 Logging and System Monitoring Web Server

1lightweight in the sense that required processing operations are shifted to browser side. E.g. journal data is directly tailloged from journal -f json and piped into a websocket to the client - no intermediate processing. Open files within /proc cannot be optimized out (though, if tab is not active, no data is gathered)

Installation

# download this package
git clone https://github.com/hgn/monetta.git
cd monetta

# aiohttp package is required (python webserver)
pip install -f requirements.txt

# monetta is using python binding to log
# into journal
aptitude install python3-systemd

# start the server
./run.py -f assets/monetta.conf

# open your browser -> http://localhost:8080/

Journal Tab

Displays Systemd journal information. Some filters are available. Journal can also be downloaded as JSON or Syslog format (you can even wget the both formats if you want).

Monetta Screenshot - Utilization

Utilization Tab

Focus on life data of the system. Update interval is one second.

  • Avg Run [µs] average time spent on the CPU until scheduled out
  • Avg Wait [µs] average time spent waiting on a runqueue until scheduled in
  • Scheduled [/s] How often this process is switched into. See function prepare_task_switch(). Which will call sched_info_switch(). The number of context switches it divided by interval to get them per second. Or other: number of timeslices run on this cpu per seconds.

Monetta Screenshot - Utilization

Process Tab

Provides static data of an process. The page is updated rarely (every 10 seconds).

Monetta Screenshot - Utilization

IRQ Tab

Updated every second and display all interrupt related data, including affinity mask.

Monetta Screenshot - Utilization

Problem Statement

Every mid-size and larger project - including embedded projects - requires at least a logging infrastructure. Piping the logging data via netcat to a client written in QT is fine but has drawbacks: cross platform limitations, software distribution, stable and and backward compatible APIs to serve old clients, writing nice GUIs, etc.

Monetta try to address this problem by using modern web technologies and simultaneously try to be resource friendly - at least try to do so:

  USS      PSS      RSS
23264    24320    29404

Monetta is released under a liberal licence - use it in your project without any pain!

Goals and Paradigms

  • Targeted for Embedded Environments
  • Shift computational tasks to the client (web browser), the server provide raw values
  • Stick with Systemd and Journalctl
  • Reduce external dependencies - just standard Python, aiohttp and python3-systemd
  • If no client is connected the service should idle 100%

Installation

Debian based distribution:

aptitude install python3-systemd

monetta's People

Contributors

cpietsch avatar hgn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

monetta's Issues

cpu-usage.py process_stat_data_by_pid_ng fails on processes with space

procdata = proctimes.split(' ')

Firefox starts a process with this stat file:
3102 (Web Content) S 2738 2279 2279 1026 2279 4194304 7879765 0 235 0 43890 5292 0 0 20 0 25 0 15091 2447937536 108858 18446744073709551615 474214596608 474214752772 140737361509984 140737361508192 140450924365581 0 0 16781314 1107297528 0 0 0 17 0 0 0 397 0 0 474216851856 474216853608 474247172096 140737361511027 140737361512373 140737361512373 140737361514463 0
split(' ') obviously fails with the space in the process name

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.