home *** CD-ROM | disk | FTP | other *** search
/ WinFiles.com 1998 June / WF0698_3.ISO / servers-websrv / websuite.exe / SRVSTATS.AP_ / SRVSTATS.AP
Text File  |  1998-04-01  |  4KB  |  155 lines

  1. <[
  2. // Personal Web Server - Server Statistics
  3. // (c) 1997-98 SmartDesk, Inc., All Rights Reserved
  4.  
  5. websrvr = 0 + param( 1 )
  6. sessionId = 0 + param( 2 )
  7.  
  8. session = new( "session", websrvr, sessionId )
  9. stats = webServerStats( websrvr )
  10.  
  11. ]>
  12. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
  13. <!5thGEN Active Pages, by www.smartdesk.com>
  14. <HTML>
  15. <TITLE>Personal Web Server Statistics</TITLE>
  16. <BODY BGCOLOR="#000000" LINK="#FFFFFF" VLINK="#FFFFFF" TEXT="#FFFFFF">
  17.  
  18. <TABLE BORDER=0 WIDTH=600>
  19.  <TR>
  20.   <TD VALIGN="top" WIDTH=120>
  21.    <CENTER>
  22.    <A HREF="/index.htm"><IMG SRC="/image/earth.gif" WIDTH=80 HEIGHT=80 BORDER=0></A><BR>
  23.    <FONT COLOR="#FFFFFF" SIZE=1><FONT COLOR="#00FFFF">©Copyright 1997-98</FONT><BR>by SmartDesk, Inc.<BR>All Rights Reserved<BR></FONT>
  24.    </CENTER>
  25.   </TD>
  26.   <TD WIDTH=10>
  27.   </TD>
  28.   <TD WIDTH=465>
  29.  
  30.    <CENTER>
  31.    <P><FONT SIZE=5 COLOR="00FFFF"><B><[ ! session.data( "SERVER_SOFTWARE" ) ]></B></FONT><BR>
  32.    <FONT SIZE=2>
  33.    <A HREF="server.htm">Details</A> |
  34.    <A HREF="srvconfg.htm">Configuration</A> |
  35.    <A HREF="loglist.htm">Server Log</A> |
  36.    <A HREF="/index.htm">Home</A></P>
  37.    </FONT>
  38.    </P>
  39.    </CENTER>
  40.  
  41.    <P><BR></P>
  42.  
  43.    <P><FONT SIZE=4 COLOR="00FFFF"><B>Statistics</B></FONT><BR></P>
  44.    <P><CENTER><FONT SIZE=2><[ ! session.data( "SERVER_NAME" ) + ", " + cdow( jdate( ) ) + " " + date( "MMMM DDDD, YYYY" ) + ", " + timetostr( time( ), 0 ) + "m" ]></FONT><CENTER></P>
  45.    <TABLE BORDER=2 WIDTH=460>
  46.     <TR VALIGN="top" ALIGN="left">
  47.        <TD>Connection Requests</TD>
  48.         <TD><[ ! strcommas( strextract( stats, " ", 12 ) ) ]></TD>
  49.     </TR>
  50.     <TR>
  51.        <TD>Session Count</TD>
  52.         <TD><[ ! strcommas( strextract( stats, " ", 13 ) ) ]></TD>
  53.     </TR>
  54.     <TR>
  55.        <TD>Bytes Sent</TD>
  56.         <TD><[ ! strcommas( strextract( stats, " ", 8 ) ) ]></TD>
  57.     </TR>
  58.     <TR>
  59.        <TD>Bytes Received</TD>
  60.         <TD><[ ! strcommas( strextract( stats, " ", 9 ) ) ]></TD>
  61.     </TR>
  62.     <TR>
  63.        <TD>Read Requests</TD>
  64.         <TD><[ ! strcommas( strextract( stats, " ", 3 ) ) ]></TD>
  65.     </TR>
  66.     <TR>
  67.        <TD>Write Requests</TD>
  68.         <TD><[ ! strcommas( strextract( stats, " ", 4 ) ) ]></TD>
  69.     </TR>
  70.     <TR>
  71.        <TD>Active Page Requests</TD>
  72.         <TD><[ ! strcommas( strextract( stats, " ", 5 ) ) ]></TD>
  73.     </TR>
  74.     <TR>
  75.        <TD>Active Page Bytes Generated</TD>
  76.         <TD><[ ! strcommas( strextract( stats, " ", 6 ) ) ]></TD>
  77.     </TR>
  78.     <TR>
  79.        <TD>Average Bytes Per Read</TD>
  80.         <TD><[
  81.             x = 0 + strextract( stats, " ", 3 )
  82.             if ( x < 1 )
  83.                 ! 0
  84.             else
  85.                 y = 0 + strextract( stats, " ", 9 )
  86.                ! strcommas( "" + int( y / x ) )
  87.            end
  88.          ]></TD>
  89.     </TR>
  90.     <TR>
  91.        <TD>Average Bytes Per Write</TD>
  92.         <TD><[
  93.             x = 0 + strextract( stats, " ", 4 )
  94.             if ( x < 1 )
  95.                 ! 0
  96.             else
  97.                 y = 0 + strextract( stats, " ", 8 )
  98.                ! strcommas( "" + int( y / x ) )
  99.            end
  100.          ]></TD>
  101.     </TR>
  102.     <TR>
  103.        <TD>Average Bytes Per Active Page</TD>
  104.         <TD><[
  105.             x = 0 + strextract( stats, " ", 5 )
  106.             if ( x < 1 )
  107.                 ! 0
  108.             else
  109.                 y = 0 + strextract( stats, " ", 6 )
  110.                ! strcommas( "" + int( y / x ) )
  111.            end
  112.          ]></TD>
  113.     </TR>
  114.     <TR>
  115.        <TD>Retries</TD>
  116.         <TD><[ ! strcommas( strextract( stats, " ", 11 ) ) ]></TD>
  117.     </TR>
  118.     <TR>
  119.        <TD>Errors</TD>
  120.         <TD><[ ! strcommas( strextract( stats, " ", 10 ) ) ]></TD>
  121.     </TR>
  122.     <TR>
  123.        <TD>Error Percentage</TD>
  124.         <TD><[
  125.             x = ( 0 + strextract( stats, " ", 3 ) ) + strextract( stats, " ", 4 )
  126.  
  127.             if ( x < 1 )
  128.                 ! "0.0%"
  129.             else
  130.                 y = 0.0 + strextract( stats, " ", 10 )
  131.                 z = "" + ( ( y / x ) * 100 )
  132.                 if ( at( "e", z ) > 1 )
  133.                     ! "< .01%"
  134.                 else
  135.                    ! left( "" + z + "      ", 6 ) + "%"
  136.                end
  137.            end
  138.  
  139.          ]></TD>
  140.     </TR>
  141.     <TR>
  142.  
  143.    </TABLE>
  144.  
  145.    <CENTER><P>
  146.    <FONT SIZE=2><A HREF="http://www.smartdesk.com/websuite.html">Tell me more about the SmartDesk Personal Web Server</A><BR></FONT>
  147.    </P></CENTER>
  148.  
  149.   </TD>
  150.  </TR>
  151. </TABLE>
  152. <br><br><br><br>
  153.  
  154. <[! webFooter( )]>
  155.