#!/bin/sh
echo "HTTP/1.0  200 Boogers"
echo "Content-type: multipart/x-mixed-replace;boundary=a1lpRf5fgFd1dr"
echo ""
echo "--a1lpRf5fgFd1dr"     # [initial boundary for first part]
while true
do
    echo "Content-type: text/html"
    echo ""
    echo "<HTML><HEAD>"
    echo "<TITLE> Top Running Processes </TITLE></HEAD><BODY>"
    echo "<H1 ALIGN=center> Top Running Processes at time: <BR>"
    date                    # [date prints the current time and date]
    echo "</H1><HR>"
    echo "<PRE>"
    top -d1  10             # [print info for top 10 processes then stop]
    echo "</PRE></BODY></HTML>"
    echo echo "--a1lpRf5fgFd1dr"
    sleep 10
done

