#!/bin/sh
while true; do { echo -e 'HTTP/1.1 200 OK\r\n'; cat index.html; } | nc -l 8080; done &
while [ fervi=1 ];
do
echo "" > index.html
echo "
" >> index.html
echo "" >> index.html
echo "" >> index.html
echo "" >> index.html
hostname >> index.html
echo "
" >> index.html
date >> index.html
echo "
" >> index.html
sensors | grep "Core 0" >> index.html
echo "
" >> index.html
df -h | grep 'sda\|sdb\|sdc|\sdd'>> index.html
echo "
" >> index.html
free -m | grep Mem | awk '{print $1, $3, "/ " $2, "; Wolne: " $4}' >> index.html
echo "
" >> index.html
free -m | grep Swap | awk '{print $1, $3, "/ " $2, "; Wolne: " $4}' >> index.html
echo "
" >> index.html
#iostat | grep -A 1 avg-cpu >> index.html
echo "" >> index.html
sleep 10s
done