NaviServer - programmable web server
4.99  5.0

[ Main Table Of Contents | Table Of Contents | Keyword Index ]

ns_adp_stats(n) 4.99.30 naviserver "NaviServer Built-in Commands"

Name

ns_adp_stats - Return statistics about cached ADP pages

Table Of Contents

Synopsis

Description

Returns statistics about ADP pages that have been cached. The result is a list of lists, where each sublist contains 2 items: File, Statistics. File is the complete path in the filesystem to a cached ADP file, Statistics is a list containing statistics about that cached file in a format similar to Tcl's array get format. Currently, the keys in Statistics are:

COMMANDS

ns_adp_stats
  • dev: Drive number of the disk containing the file.

  • ino: Number of the information node (the inode) for the file. The inode describes the file date and timestamps, permissions, and content on UNIX filesystems.

  • mtime: Time the file was last modified,

  • refcnt: Reference Count, the ADP will be removed from the cache if the reference count reaches zero.

  • evals: Number of times this ADP has been evaluated.

  • size: Size of the file in bytes.

  • blocks: Total number of blocks in the ADP file, including html blocks and script blocks.

  • scripts: Number of script blocks in the ADP file.

EXAMPLES

 % foreach {file stats} <strong>ns_adp_stats</strong> {
     append output "\nFILE: ${file}\n"
     foreach {key value} $stats {
         append output "    ${key} ==> ${value}\n"
     }
 }
 set output

See stats.tcl in the standard NaviServer distribution for a more complicated example.

NOTES On the Windows platform, ADP filenames are used as Hash table keys instead of dev and ino, so dev and ino will always be reported as 0 when running NaviServer on Windows.

See Also

ns_adp

Keywords

ADP, server built-in