17 lines
528 B
Bash
Executable File
17 lines
528 B
Bash
Executable File
#!/bin/sh
|
|
|
|
RRDDIR="/var/www/localhost/rrd"
|
|
RRDPREFIX="lxc-"
|
|
TMPLDIR="/var/www/localhost/tmpl"
|
|
|
|
/bin/echo -n > /tmp/lxd.stats
|
|
|
|
lxc list 10.5.0.1: -f json | jq -r '.[] | "\(.name) \(.state.cpu.usage) \(.state.memory.usage) \(.state.network.eth0.counters.bytes_received) \(.state.network.eth0.counters.bytes_sent)"' | while read i;
|
|
do
|
|
echo "$i" | sed 's/null/0/g' >> /tmp/lxd.stats
|
|
done
|
|
|
|
/usr/bin/lxc_index.sh > /var/www/localhost/htdocs/lxc.html
|
|
/usr/bin/lxc_mrtg.sh > /var/www/localhost/config/lxc.cfg
|
|
/usr/bin/lxc_rrd-tmpl.sh
|