Skip to content

API service to stream CPU and Memory (RAM) usage in real-time using WebSocket

Notifications You must be signed in to change notification settings

sunny-dubey/System-Info

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CPU-RAM-USAGE

API service to stream CPU and Memory (RAM) usage in real-time using WebSocket

Features

Project status

  • Create a Boiler App
  • Add all Routes
  • Create Controllers Functions
  • Local Storage of Active Streams (partially done, can utilize an in-memory database or db like mongoDB)
  • Create a Utils Function to Fetch System Info (used os library, facing issue with native wmic commands)
  • Create a Utils Function to Start and Stop Streaming Data through WebSocket

Installation

To run this project onto your local server

  • install npm modules onto root directry
  npm install
  • To run in development mode
  npm run dev
  • To run in build mode
  npm run build && npm run start

Use WebSocket Client like Postman

API Reference

Create Stream

  POST /api/create/:type
Parameter Type Description
type string Required. Type(cpu/memory) to create stream

Start Stream

  POST /api/start/:id/:type
Parameter Type Description
id string Required. Id of stream
type string Required. Type(cu/memory) of start stream

Stop Stream

  POST /api/stop/:id/:type
Parameter Type Description
id string Required. Id of stream
type string Required. Type(cu/memory) of stop stream

Stop Stream

  POST /api/destroy/:id/:type
Parameter Type Description
id string Required. Id of stream
type string Required. Type(cu/memory) of destroy stream

Documentation

Documentation

Authors

@sunny-dubey

About

API service to stream CPU and Memory (RAM) usage in real-time using WebSocket

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published