Bash CGI / HTML output on one line
Seems like a simple thing, but I can't get it to work. Basically I have an in house admin type page that is just querying load, etc. on our internal webservers displaying on a webpage. My problem is keeping text, etc. on one line and I am not saavy enough so a 1 line answer is prob all it will take.
The script is in it's infancy, but simple looks like this;
#!/bin/bash
echo "Content-type: text/html"
echo "<html>"
echo "<pre>"
echo "Svr1 Status:"
ssh svr1 w | awk '/load/ {print $10}'
echo "ttl httpd:"
ssh svr1 ps aux |grep -c httpd
echo "</pre>"
echo "</html>"
The output looks like;
Svr1 Status:
1.71,
ttl httpd:
59
Basically I would like the load on the box next to the status, the httpd count next to the ttl. Mind you this is not mission critial, but there will be several servers, and I would like a simple snapshot to see.
Thanks
|