Skip to content

mikerayco/Linux-Mon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Linux Monitor

A small Go terminal application for Linux system stats:

  • CPU usage
  • RAM and swap usage
  • Root disk usage and available space
  • Public IP address with country flag and location
  • Current inbound and outbound ethernet throughput

Run

Install Go 1.22 or newer, then run:

go run .

The application runs directly in the terminal and refreshes every 2 seconds. Press Ctrl+C to exit.

To change the refresh interval:

go run . -refresh 1s

To print one update and exit:

go run . -once

Build

Create an Ubuntu executable:

go build -o linux-mon .
./linux-mon

The app reads local metrics from /proc, /sys/class/net, and statfs. Public IP geolocation tries https://ipwho.is/ first, then falls back to http://ip-api.com/ if the first provider times out or fails. Successful lookups are cached for 24 hours and failed lookups are cached for 15 minutes.

About

A simple linux monitoring tool

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages