GithubHelp home page GithubHelp logo

rikende / monitor-zewo Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 10 KB

A simple client server app written in Apple's swift. This project serves no purpose other than to have a bit of everything in it.

Makefile 1.57% Swift 95.17% HTML 3.27%

monitor-zewo's Introduction

A simple client server app written in swift for linux.

This project serves no purpose other than to have a bit of everything in it: some file handling, string parsing, networking, database, concurrency, marshalling to json, basic authentication etc, while trying out swift.

The server reads cpu and kernel status from /proc/stat and /proc/cpuinfo and exposes this information with a simple REST service over https

Steps to install

Download a build of swift from Apple:

https://swift.org/download/#linux

Install Clang and ICU

sudo apt-get install clang libicu-dev

echo "deb [trusted=yes] http://apt.zewo.io/deb ./" | sudo tee --append /etc/apt/sources.list
sudo apt-get update
sudo apt-get install zewo

DB Schema

create table cpuinfo ( 
	id			serial primary key,
	time		timestamp without time zone not null,
	userland	numeric(4,1) not null, 
	nice		numeric(4,1) not null, 
	system		numeric(4,1) not null, 
	idle		numeric(4,1) not null, 
	iowait		numeric(4,1) not null, 
	irq			numeric(4,1) not null, 
	softirq		numeric(4,1) not null, 
	steal		numeric(4,1) not null, 
	freq		numeric(4,1) not null, 
	temperature numeric(4,1) not null
);

create index index_time on cpuinfo(time);

TODO

  • HTTPS (Broken as of March 2016)
  • Authentication password hashing

Links

http://docs.zewo.io/

monitor-zewo's People

Contributors

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