mirror of
https://github.com/unraid/webgui.git
synced 2026-01-01 23:20:35 -06:00
14 lines
380 B
Bash
Executable File
14 lines
380 B
Bash
Executable File
#!/bin/bash
|
|
|
|
while :; do
|
|
output=$(docker stats --no-stream --format='{{.ID}};{{.CPUPerc}};{{.MemUsage}}' 2>&1)
|
|
if [[ $? -ne 0 ]]; then
|
|
logger -t webgui "docker stats error: $output"
|
|
exit 1
|
|
fi
|
|
if [[ -n "$output" ]]; then
|
|
curl -sfd "$output" --unix-socket /var/run/nginx.socket http://localhost/pub/dockerload?buffer_length=1 >/dev/null 2>&1
|
|
fi
|
|
sleep 1
|
|
done
|