SystemCapture - Golang application to capture system info
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
.gitignore
Dockerfile
README.md
SystemCapture.go
_config.yml
docker-start.sh
start.sh
tmux-sc.sh

README.md

System Capture

Simple Golang application to capture system information when thresholds are reached.

# Linux troubleshooting example
git clone https://github.com/electronicsleep/SystemCapture.git && cd SystemCapture/bin && ./SystemCapture-Linux

# MacOS troubleshooting example
git clone https://github.com/electronicsleep/SystemCapture.git && cd SystemCapture/bin && ./SystemCapture-MacOS

Update with your own commands to capture info, search for CMD:

Ever want to capture system info during a spike? This is for you.

Useful for keeping an eye on processes running using CPU (similar to SAR report)

Threshold automatically set to the CPU cores on the system. (will only capture when load is high)

Checks: w, top, vmstat, netstat -ta, ps -ef, df

Verbose Checks: w, top, vmstat, netstat -ta, ps -ef, lsof, iostat, df

Using docker for tests.

Raise threshold to desired level or use auto NumCPU option to log details.

Tested/working with Debian Linux and MacOS Sierra.

Should work on all Linux and MacOS versions.

# Run
go run SystemCapture.go

# Always capture
go run SystemCapture.go -t

# Run with webserver:
# http://localhost:8080/logs
go run SystemCapture.go -t -w

# Build for Linux
GOOS=linux go build SystemCapture.go

# Docker env Alpine
bash docker-start.sh

# Run background
nohup go run SystemCapture.go

Resources

https://golang.org