diff options
author | adv <adv@uma.es> | 2011-06-28 18:53:34 +0000 |
---|---|---|
committer | adv <adv@uma.es> | 2011-06-28 18:53:34 +0000 |
commit | f6fecaf2251de4cdb330e172775e8e24dffce432 (patch) | |
tree | 23b147614950eb4770c2eb58fea39d4b9335969e /client | |
parent | c73fcc326408e6af46d5322614be1c4373d96736 (diff) |
version 1.0.2 httpd-log cgi monitorizacio log
git-svn-id: https://opengnsys.es/svn/branches/version1.0@2103 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client')
-rw-r--r-- | client/shared/lib/httpd/LogStandar.sh | 33 | ||||
-rw-r--r-- | client/shared/lib/httpd/LogTrack.sh | 33 | ||||
-rw-r--r-- | client/shared/lib/httpd/bandwidth.sh | 12 | ||||
-rw-r--r-- | client/shared/lib/httpd/iframe2.sh | 15 |
4 files changed, 93 insertions, 0 deletions
diff --git a/client/shared/lib/httpd/LogStandar.sh b/client/shared/lib/httpd/LogStandar.sh new file mode 100644 index 00000000..230a17ab --- /dev/null +++ b/client/shared/lib/httpd/LogStandar.sh @@ -0,0 +1,33 @@ +#!/bin/bash +echo "Content-type: text/html" +echo "" +echo "<html><head> <meta http-equiv='Refresh' content='5,URL=./LogStandar.sh'> <title>Bash as CGI" +echo "</title>" + +echo "<style type='text/css'>" +echo "<!--" +echo "TEXTAREA {" +echo "background-color: navy;" +echo "border: black 2px solid;" +echo "color: white;" +echo "font-family: arial, verdana, ms sans serif;" +echo "font-size: 8pt;" +echo "font-weight: normal" +echo "} " +echo "-->" +echo "</style>" + + + +echo "</head><body>" + +echo "<TEXTAREA NAME='contenido' ROWS='115' COLS='175' >" +echo "$(cat /tmp/standar.log | uniq )" +#echo "$(tail /opt/opengnsys/log/172.17.36.21.log)" +#echo "$(ls -ls /)" +echo "</TEXTAREA>" + + + +echo "</body></html>" + diff --git a/client/shared/lib/httpd/LogTrack.sh b/client/shared/lib/httpd/LogTrack.sh new file mode 100644 index 00000000..5e2cbf93 --- /dev/null +++ b/client/shared/lib/httpd/LogTrack.sh @@ -0,0 +1,33 @@ +#!/bin/bash +echo "Content-type: text/html" +echo "" +echo "<html><head><meta http-equiv='Refresh' content='5,URL=./LogTrack.sh'> <link rel='stylesheet' type='text/css' href='oglive.css' /> <title>Bash as CGI" +echo "</title></head><body>" + +$(strings /tmp/track.log > /tmp/track.log.tmp) + +echo "<table>" + +echo "<tr>" + + +echo "<TEXTAREA NAME='trackloghead' ROWS='10' COLS='175'>" +echo "$(head -n 10 /tmp/track.log.tmp)" +echo "</TEXTAREA>" + +echo "</tr>" + + +echo "<tr>" + +echo "<TEXTAREA NAME='tracklogtail' ROWS='10' COLS='175'>" +echo "$(tail -n 5 /tmp/track.log.tmp)" +echo "</TEXTAREA>" + + +echo "</tr>" + +echo "</table>" + + +echo "</body></html>"
\ No newline at end of file diff --git a/client/shared/lib/httpd/bandwidth.sh b/client/shared/lib/httpd/bandwidth.sh new file mode 100644 index 00000000..9e7833c3 --- /dev/null +++ b/client/shared/lib/httpd/bandwidth.sh @@ -0,0 +1,12 @@ +#!/bin/bash +echo "Content-type: text/html" +echo "" +echo "<html><head><meta http-equiv='Refresh' content='11,URL=./bandwidth.sh'> <link rel='stylesheet' type='text/css' href='oglive.css' /> <title>Bash as CGI </title></head><body>" + +echo "<TEXTAREA class='example1' NAME='contenido' ROWS='35' COLS='50' >" +echo " DISK || NET " +echo "Read:Write || Recv:Send " +echo $(tail -n1 /tmp/bandwidth) +#echo " $(dstat -dn -f 1 1 ) " +echo "</TEXTAREA>" +echo "</body></html>"
\ No newline at end of file diff --git a/client/shared/lib/httpd/iframe2.sh b/client/shared/lib/httpd/iframe2.sh new file mode 100644 index 00000000..4e57d39a --- /dev/null +++ b/client/shared/lib/httpd/iframe2.sh @@ -0,0 +1,15 @@ + +#!/bin/bash +echo "Content-type: text/html" +echo "" +#echo "<html><head><meta http-equiv='Refresh' content='2,URL=./example3.sh'><title>Bash as CGI" +echo "<html><head><title>OpenGnsys Client</title></head><body>" + +echo "<h1> host $(hostname -s)</h1> " +echo "<IFRAME SRC='bandwidth.sh' WIDTH=250 HEIGHT=80> <A HREF="bandwidth.sh">link</A> </IFRAME> " + + +echo "<IFRAME SRC='LogStandar.sh' WIDTH=850 HEIGHT=200> <A HREF="LogStandar.sh">link</A> </IFRAME>" +echo "<IFRAME SRC='LogTrack.sh' WIDTH=850 HEIGHT=250> <A HREF="LogTrack.sh">link</A> </IFRAME>" + +echo "</body>
\ No newline at end of file |