A modern web application for visualizing SAR (System Activity Report) data with interactive charts and export capabilities.
- π Interactive Charts: Visualize CPU, Memory, Disk I/O, Network, and Process statistics
- π€ File Upload: Drag & drop or browse to upload SAR files
- πΎ Export: Download individual charts as PNG or all charts as ZIP
- π¨ Modern UI: Beautiful dark theme with smooth animations
- β‘ Fast: Optimized data sampling for large SAR files
- Node.js 18+
- npm or yarn
cd server
npm installcd client
npm installcd server
npm startThe server will run on http://localhost:3001
cd client
npm run devThe application will open at http://localhost:3000
-
Upload SAR File:
- Drag and drop your SAR file (output from
sar -A -f) onto the upload area - Or click to browse and select the file
- Drag and drop your SAR file (output from
-
View Charts:
- CPU Usage: User, System, I/O Wait, and Idle percentages
- Memory Usage: Used, Cached, Buffers, and Free memory
- Disk I/O: Read/Write throughput, TPS, and utilization
- Disk Usage: Disk usage percentage
- Network Traffic: RX/TX throughput
- Process Stats: Process creation and context switches
-
Export Charts:
- Click "Export PNG" on any chart to download it individually
- Click "Export All Charts (ZIP)" to download all charts at once
The application expects SAR output generated with:
ls /var/log/sysstat/sa?? | xargs -i sar -A -f {} > /tmp/sar_$(uname -n).txt
echo "-- df --" >> /tmp/sar_$(uname -n).txt
df >> /tmp/sar_$(uname -n).txt
echo "-- end df --" >> /tmp/sar_$(uname -n).txt- Node.js + Express
- Multer (file uploads)
- Custom SAR parser
- React 18
- Vite
- Recharts (charting library)
- html2canvas (PNG export)
- JSZip (ZIP creation)
gusar/
βββ server/
β βββ package.json
β βββ server.js
β βββ parser.js
βββ client/
β βββ package.json
β βββ vite.config.js
β βββ index.html
β βββ src/
β βββ main.jsx
β βββ App.jsx
β βββ index.css
β βββ components/
β β βββ FileUpload.jsx
β β βββ ChartContainer.jsx
β β βββ charts/
β β βββ CPUChart.jsx
β β βββ MemoryChart.jsx
β β βββ DiskChart.jsx
β β βββ NetworkChart.jsx
β β βββ ProcessChart.jsx
βββ README.md
βββ docker-compose.yaml
βββ docker/
βββ Dockerfile.client
βββ Dockerfile.server
βββ nginx.conf
# build image first
docker compose build app
docker compose build backend
# start the frontend and backend
docker compose up -d
# access
access via browser at http://localhost:3000MIT