選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

9 行
333 B

  1. #!/bin/bash
  2. while true ; do
  3. STATS="<h1>Uptime</h1>$(uptime)\n<h1>Inode and disk usage</h1>$(df -ih)\n<h1>Mem usage</h1>$(free -h)\n<h1>Syslog</h1>$(tail -n 15 /var/log/syslog)\r\n\r\n"
  4. LEN=$(printf "%s" "$STATS" | wc -c)
  5. RES="HTTP/1.1 200OK\r\nContent-Length: $LEN\r\n\r\n"
  6. echo -e "$RES$STATS"| nc -l -p 1500;
  7. done