Ns adp stats

From AOLserver Wiki
Jump to navigation Jump to search

Man page: http://aolserver.com/docs/tcl/ns_adp_stats.html


ns_adp_stats - Return statistics about cached ADP pages.




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 file system 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:
  • 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 time stamps, permissions, and content on UNIX file systems.
  • mtime
Time the file was last modified,
  • refcnt
Reference Count, the adp will be removed from the cache if this 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.


   % foreach {file stats} ns_adp_stats {
         append output "\nFILE: ${file}\n" 
         foreach {key value} $stats {
             append output "    ${key} ==> ${value}\n"
     set output
See stats.tcl in the standard AOLserver distribution for a more complicated example.


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 AOLserver on Windows. [1]


ns_adp_abort, ns_adp_append, ns_adp_argc, ns_adp_argv, ns_adp_bind_args, ns_adp_break, ns_adp_debug, ns_adp_debuginit, ns_adp_dir, ns_adp_dump, ns_adp_eval, ns_adp_exception, ns_adp_include, ns_adp_mime, ns_adp_mimetype, ns_adp_parse, ns_adp_puts, ns_adp_registeradp, ns_adp_registerproc, ns_adp_registertag, ns_adp_return, ns_adp_safeeval, ns_adp_stream, ns_adp_tell, ns_adp_trunc

Category Documentation - Category Core Tcl API