Displaying Apache Rivet Runtime Info

Rivet (or mod_rivet) is a module of the famous web server Apache. People mostly use PHP scripting language to build websites. However, for those who want to write websites using Tcl instead of PHP, you can use Rivet. And I am one of those rare people who use Rivet instead of PHP on this site address: superlinux.net . You will notice in my website, on your address bar of your browser, that the address of the pages ends with .rvt instead of .php like what many websites have.

Now, to get the runtime status of PHP , one would use the function phpinfo(). At the time of this writing, Rivet is in version 2.2.2 . Yet, Rivet does not have a quickly called function like that. You will need to contact and run a number of commands to get it done for you. What I have done here is re-organizing and re-arranging them mimicking phpinfo() in a command called rivet_info .

I here put a big thanks to Mr. Massimo Manghi for his help in this.

Click here for a demo

Here is the code of the command rivet_info. Please understand that the logo of Rivet is embeded in the html <img> tag. Please copy the function carefully

<?
proc rivet_info { } {
  #This procedure prints all general runtime info of an apache web server running mod_rivet 
  #It's the equivalent of PHP's function phpinfo() in mod_rivet
  #Just put this code in a file named for example (info.rvt) and run it from your browser.
?>
<style>
table, th, td {
border: 1px solid black;

}
</style>
 <?
 # print the rivet logo
 puts { <H1><img title="The Rivet logo" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAA/CAYAAAAWq21gAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAAB3RJTUUH3gYDFSohQPowXAAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAABUsSURBVHja7Zx7sF1Xfd8/v7XW3ud1r6SrK1nWw3pf3as32AUDdScUDBVPJyGhzCTpYAaU2jRjzHTacUlxjU1JSAMmFBInpGmGPMqkFCidhjQ4PAwOj9gQY0vWy7JkIetl2ZLu45yz9/r9+sc+5/o+zn1KUYTxmtlz9jl77X32Wt/1+31/j7WWmBmXsxw6dMi+8pWvcP/99/PDH/6QY8eOoaoArFy5ki1btnDjjTeya9cutm7dKvy0FTO7LMe+ffts9+7d1tvba845AwwYPReRcd9rtZq94x3vsIceesgu1zteCcdl+ZP77rvPli9fPtrpbQDa39v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evzHtqqr2793heZW1btNWKhooJ4GsyEqgLiAaaT0Q54rotKjh5Mrf3yx6Ic1a/FErE7a+aZdcjvWoCxZ0IWLFZGxXRB0mqqhOKiutPk9zO9/wetn5htfzQi5yueYbPfrYXjt8+DDlcvl56WNm669v/Qb6+jf+1OwBL2ZG1mjgnUc1YkBIEsQ5suFhwiziSKoR5wrytJbTE7MmPkkxMXy4uG34TBWNEZ8kWJYTsyZRI6FSxvsEUyVmOc45XBIwVfIsQwCfXPlbAMZ6E58kSOKR/7h5s40MDRf7UhXbNmBWkHriPMb0HJIZhDYYFluELYSQYnksVp+2ttRrS2O7zsRtZCeqLREhc03QYp1h3sjx4vHikMRTzzPECkNBtJj13qZKL4JTiGJXPCDePM/lTV5x07/g/wMuzihEQ7Yt3gAAAABJRU5ErkJggg==" alt="home.png" /></H1> }
 puts { <H3>Server Configuration</H3> }
 puts {
 <p> <table cellspacing=0>
  
  </tr> <tr><th>Configuration</th><th>Value</th></tr>
 }
 array set http_server_array [ ::rivet::inspect server]
 foreach { key value } [array get http_server_array]  {
 
  puts "<tr><td>$key</td><td>$value &nbsp;</td></tr>"
 }
 foreach { key value } [array get ::server]  {
 
  puts "<tr><td>$key</td><td>$value &nbsp;</td></tr>"
 }
 puts {</table></p>}
 
 puts { <H3>Running Configuration</H3> }
 
 puts  [ ::rivet::inspect ]
 
 puts {
 <p> <table cellspacing=0>
  
  </tr> <tr><th>Configuration</th><th>Value</th></tr>
 }
 array set rivet_config_array [ ::rivet::inspect -all ]
 foreach { key value } [array get rivet_config_array]  {
 
  puts "<tr><td>$key</td><td>$value &nbsp;</td></tr>"
 }
 
 puts {</table></p>}
 
 puts { <H3>Tcl Packages</H3> }
 puts {
 <p> <table cellspacing=0>
  </tr> <tr><th>Name</th><th>Version</th></tr>
 }
 
 foreach pkg_name [package names] {
  set pkg_version "[package versions $pkg_name] &nbsp;"
  puts "<tr><td>$pkg_name</td><td>$pkg_version</td></tr>"
 }
 puts {</table></p>}

  puts { <H3>Tcl Package Configuration</H3> }
 puts {
 <p> <table cellspacing=0>
  </tr> <tr><th>Name</th><th>Value</th></tr>
 }
 
 foreach config [tcl::pkgconfig list] {
  set config_value "[tcl::pkgconfig get $config] &nbsp;"
  puts "<tr><td>$config</td><td>$config_value</td></tr>"
 }
 puts {</table></p>}
 }


#running the procedure rivet_info

rivet_info
?>