Code Monkey home page Code Monkey logo

rcpu's Introduction

rCPU

A minimal webserver for remote CPU monitoring (on Linux). Everything is embedded in the executable, so you just need to run the program. I'm planning to run it on my Raspberry Pi 2 to monitor the use of each core. Although it should run on other Linux machines too.

The program will automatically adjust the display according to the number of CPU cores.

UPDATE: this latest version (February 2016) changes the graph plotting library from Smoothie Charts to [Flot] (http://www.flotcharts.org/) in the hope of having better browser support.

NOTE: the code to display the core temperature is designed for the Raspberry Pi, it might not work on other machines.

How to build and run

On the Raspberry Pi (and other Debian based systems probaby)

You should be able to do this:

git clone https://github.com/davidsblog/rCPU
cd rCPU/rCPU/
sudo make install

...which will build everything and install it as a service (it will run at system start-up). The server will run on port 8111. That means you can view the graphs by visiting http://192.168.1.2:8111/ (you need to substitute your Raspberry Pi's IP address). You can remove it from your system like this (assuming you are still in the rCPU/rCPU/ directory):

sudo make uninstall

NOTE: the sudo before calling make above is important, since you're installing services.

Runing manually (or on different Linux versions)

Just do this:

git clone https://github.com/davidsblog/rCPU
cd rCPU/rCPU/
make
sudo ./rcpu 80

You might have a webserver already running on port 80, in which case you can specify a different port by passing a different parameter than 80 in the last line above.

Embedded content

The html and javascript files are embedded in the executable. Each resource file becomes a C header file. The makefile updates the header files as dependencies during the build process.

Thanks

I am using the following javascript libraries:

Thanks to all involved with those projects.

rcpu's People

Contributors

davidsblog avatar ric96 avatar friscomad avatar bryant1410 avatar

Watchers

Yen-Chin,Lee avatar James Cloos 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.