

ProcedureTo Control and Monitor the File Cache

  1. Add a NameTrans directive to the default object:


  2. Add an nsfc object definition:

    <Object name="nsfc">
    Service fn="service-nsfc-dump"

    This configuration enables the file cache control and monitoring function (nsfc-dump) to be accessed through the URI /nfsc. To use a different URI, change the from parameter in the NameTrans directive.


    Sun Java System File Cache Status (pid 3602)
    The file cache is enabled.
    Cache resource utilization
    Number of cached file entries = 174968 (152 bytes each, 26595136 total bytes)
    Heap space used for cache = 1882632616/1882632760 bytes
    Mapped memory used for medium file contents = 0/1 bytes
    Number of cache lookup hits = 47615653/48089040 ( 99.02 %)
    Number of hits/misses on cached file info = 23720344/324195
    Number of hits/misses on cached file content = 16247503/174985
    Number of outdated cache entries deleted = 0
    Number of cache entry replacements = 0
    Total number of cache entries deleted = 0
    Parameter settings
    ReplaceFiles: false
    ReplaceInterval: 1 milliseconds
    HitOrder: false
    CacheFileContent: true
    TransmitFile: false
    MaxAge: 3600 seconds
    MaxFiles: 600000 files
    SmallFileSizeLimit: 500000 bytes
    MediumFileSizeLimit: 1000001 bytes
    BufferSize: 8192 bytes
    CopyFiles: false
    Directory for temporary files: /tmp
    Hash table size: 1200007 buckets

    You can include a query string when you access the URI. The following values are recognized:

    • ?list: Lists the files in the cache.



    • ?start: Starts the cache.

    • ?stop: Shuts down the cache.


    • C: File contents are cached.

    • D: Cache entry is marked for delete.


    • I: File information including size and modification date is cached.

    • M: File contents are mapped into virtual memory.


    • P: File has associated private data and appears on shtml files.

    • T: Cache entry has a temporary file.

    • W: Cache entry is locked for write access.