%
set uptime [ns_info uptime]
if {$uptime < 60} {
set uptime [format %.2d $uptime]
} elseif {$uptime < 3600} {
set mins [expr $uptime / 60]
set secs [expr $uptime - ($mins * 60)]
set uptime "[format %.2d $mins]:[format %.2d $secs]"
} else {
set hours [expr $uptime / 3600]
set mins [expr ($uptime - ($hours * 3600)) / 60]
set secs [expr $uptime - (($hours * 3600) + ($mins * 60))]
set uptime "${hours}:[format %.2d $mins]:[format %.2d $secs]"
}
set config ""
lappend config "Build Date" [ns_info builddate]
lappend config "Build Label" [ns_info label]
lappend config "Build Platform" [ns_info platform]
lappend config "Build Version" [ns_info version]
lappend config "Build Patch Level" [ns_info patchlevel]
lappend config " " " "
lappend config "Binary" [ns_info nsd]
lappend config "Process ID" [ns_info pid]
lappend config "Uptime" $uptime
lappend config "Host Name" [ns_info hostname]
lappend config "Address" [ns_info address]
lappend config "Server Config" [ns_info config]
lappend config "Server Log" [ns_info log]
lappend config "Access Log" [ns_accesslog file]
lappend config " " " "
lappend config "Tcl Version" [info tclversion]
lappend config "Tcl Patch Level" [info patchlevel]
lappend config " " " "
lappend config "Home Directory" [ns_info home]
lappend config "Page Root" [ns_info pageroot]
lappend config "Tcl Library" [ns_info tcllib]
%>
Welcome to AOLserver
AOLserver <%=[ns_info version]%>
Congratulations, you have successfully installed AOLserver <%=[ns_info version]%>!
Configuration
| Key |
Value |
<%
foreach {key value} $config {
ns_adp_puts "
| $key | $value |
"
}
%>
Loaded AOLserver Modules
| Type |
Name |
Location |
<%
set server [ns_info server]
set modSection [ns_configsection ns/server/$server/modules]
set tclDir [ns_info tcllib]
set binDir "[ns_info home]/bin"
foreach {name binary} [ns_set array $modSection] {
if {[string match "tcl" $binary]} {
set type "Tcl"
set location "$tclDir/$name"
} else {
set type "C"
set location "$binDir/$binary"
}
ns_adp_puts "| $type | $name | $location |
"
}
%>
<%
set modules [info loaded]
if {[string length $modules]} {
ns_adp_puts "\
Loaded Tcl Modules
| Name |
Location |
"
foreach module [info loaded] {
foreach {binary name} $module {
ns_adp_puts "| $name | $binary |
"
}
}
ns_adp_puts "
"
}
%>