Skip to content

wheeler-cs/SysStatWeb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SysStatWeb

Python-based server that provides a RESTful API for getting system statistics for a web page.

Overview

SysStatWeb uses a standard server-client architecture for transferring system statistics to the web page. The client PC loads the web page hosted on the remote host, which communicates with the SysStatWeb Python server also running on the host. The Python server returns a response with the requested information.

Server-Client

Resource requests are single-instance and stateless, and the Python server will provide the updated value for a request only when requested by the client.

Installation

SysStatWeb requires a running web server containing the necessary Javascript to make the REST API calls. The simplest way of doing this is through Python's http module. A wrapper for this command can be found in RunWebServer.sh.

For more advance users, a full-fledged web server suite, like Apache, can be used. This will require integrating the proper Javascript calls into the web page hosted on the server. Example code can be found in the ui directory.

To run the SysStatWeb server itself, Python 3 and a few modules are needed. Setting up the virtual environment and installing the needed packages can be done using the provided PythonSetup.sh script. Alternatively, the following commands can be ran from the project root:

python3 -m venv venv
source ./venv/bin/activate
pip3 install psutil
./src/SysStatWeb.py

The SysStatWeb.py Python script has a shebang that calls the virtual environment's Python instance.

About

Web server designed to get system metrics using RESTful API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors