#!/bin/bash while true ; do STATS="

Uptime

$(uptime)\n

Inode and disk usage

$(df -ih)\n

Mem usage

$(free -h)\n

Syslog

$(tail -n 15 /var/log/syslog)\r\n\r\n" LEN=$(printf "%s" "$STATS" | wc -c) RES="HTTP/1.1 200OK\r\nContent-Length: $LEN\r\n\r\n" echo -e "$RES$STATS"| nc -l -p 1500; done