Assignment 1 Setup and Installation - airavata-courses/jerrin92 GitHub Wiki

System Stats:

The project involves collecting the system statistics (currently load and interrupts) and converting the data to a graph which could be viewed on a browser. This project uses micro service architecture which is the objective of the assignment. There are 2 graphs of which one of them is Load and the other is Interrupt count. The data collection begins at the Python scripts getInterrupts.py and getLoad.py. The scripts get the data and insert it into the mysql. There are 2 node services that read from the db and converts it into json object and serves through http. The userInterface which is in angular would get/request the data for the 2 graphs from these services.

Following are the installation guidelines:

System Requirements

After installing the required software, install the below modules for running the Python scripts

Building and Running the system

  • Start the MySQL service on your system
  • Ensure that there is a database named test in MySQL or create it, if it does not exist
  • Edit the getLoad.py, getInterrupts.py, nodemon/app.js & nodemon2/app.js and change the MySQL credentials and port as per your local MySQL installation
  • In the userInterface directory run command npm install followed by npm start
  • In the nodemon & nodemon2 directories run npm install
  • Run both the python scripts: python getLoad.py and python getInterrupts.py
  • Run node app.js in both nodemon and nodemon2 directories
  • Open a web browser and visit http://localhost:4200 to view system statistics