Categorygithub.com/Timahawk/go_watcher
modulepackage
0.0.0-20220505062517-ec9f5bdb1605
Repository: https://github.com/timahawk/go_watcher.git
Documentation: pkg.go.dev

# README

GO_Watcher

Lets you monitor the CPU- and Memory Usage of your System. Additonally added the number of Goroutines. Offers a webservice, for remote access, with updates regularly via websockets.. Compiled binary is <10mb in size and has a small memory/cpu footprint.

Uses

  • Websockets
  • Flags
  • Goolge Charts
  • Github Actions

Added Dockerfile for the funsies

Build image with:
docker build --tag go_watcher .

Run container with:
docker run --rm -p 8080:8080 go_watcher

Input

  • -addr :8080 -> Changes to Port and Address of the Server
  • -period 1s -> Changes the Update Speed of the Graph/Websocket

Todo

  • Tests!
  • More Infos
  • Change Chart to Running
  • Add better Timestamp
  • ...

# Functions

GetCPULoad changes PC_StatsCPU_Load each interval.
GetCPULoad changes PC_StatsCPU_Load each interval.
GetMemLoad changes PC_Stats.Mem_Load each interval.
MessageReceiver is needed to listen on the Closes from the Client side.
MessageWriter writes to the Connection, at specified interval.
SendTemplate sends a HMTL which creates a Websocket Connection an updates Graphs.
SendStatusUpdates implements to Websocket Logik.
Start starts 3 Goroutines that update the Global Variable "Stats", each pollPeriod.

# Variables

No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author