Subject: DFS Cache Manager Statistics To: sgidce_announce@palladium.corp.sgi.com Date: Tue, 31 Mar 1998 16:40:03 -0600 (CST) Sender: owner-sgidce_announce@palladium.corp.sgi.com Precedence: bulk Reply-To: TAC-Eagan Support Center SGI IRIX DFS Client Users ------------------------- The DFS client cache is a major feature of the OSF DFS product. When data or status information is accessed by a client, it is stored in the client's cache. The client's cache resides on the local disk or in memory. While that data or status information is valid and there is room in the cache to store it, subsequent accesses to that data or status information will be read from the local cache instead of across the network from the DFS server. This can provide significant performance benefits. To help our customers tune their DFS cache for optimal performance we are providing the attached script, which will display the cache manager usage statistics. It can be executed against the current running system, or a system dump file. You do need permission to run the IRIX "icrash" command to successfully execute this script. This script is currently not part of SGI's supported DCE/DFS package. SGI DCE/DFS Customer Service ===================== Cut Here ================================= #!/bin/ksh #################################################################### # This script pulls the DFS cache manager statistics structure # # (cm_stats) from the IRIX icrash command, formats, and prints # # the resulting data. # # # # ./cache.sh stats for the current running # # system # # ./cache.sh namelist corefile for irix corefile dump # # # # ** Must have permission to run the /usr/bin/icrash command. # #################################################################### integer word1 integer word2 integer word3 integer word4 pass=1 print "od -d cm_stats 24" > /tmp/$$.cmdfile /usr/bin/icrash -f /tmp/$$.cmdfile $1 $2 | /usr/bin/sed -e '1,7d' | \ while read line do set -A a $line n=${#a[*]} word1=${a[1]} word2=${a[2]} # IRIX 64 bit platforms dump 2 words per line, 32 bit # dump 4 words per line. if (($n == 3)); then read line word3 word4 else word3=${a[3]} word4=${a[4]} fi case $pass in 1) print "\n Status Cache Counters\n" typeset -R13 print1=$word1 print2=$word2 print3=$word3 print4=$word4 print " CacheEntries $print1 CacheHits $print2" print " CacheMisses $print3 CacheFlushes $print4" pass=2;; 2) print "\n Data Cache Counters\n" typeset -R13 print1=$word1 print2=$word2 print3=$word3 print4=$word4 print " CacheEntries $print1 CacheHits $print2" print " CacheMisses $print3 CacheFlushes $print4" pass=3;; 3) typeset -R12 print1=$word1 print2=$word2 print3=$word3 print4=$word4 print " BytsRdFmCache $print1 BytesRdFmWire $print2" print " BytsWrtToCache$print3 BytsWrtToWire $print4" pass=4;; 4) print "\n Directory Name Lookup Cache Counters\n" typeset -R12 print1=$word1 print2=$word2 print3=$word3 print4=$word4 print " CacheHits $print1 CacheMisses $print2" print "\n Fileset Cache Counters\n" print " Invalidations $print3 Updates $print4" pass=5;; 5) print "\n Status Token Counters\n" typeset -R13 print1=$word1 print2=$word2 print3=$word3 print4=$word4 print " Acquired $print1 Released $print2" print " Revoked $print3" print "\n Data Token Counters\n" print -n " Acquired $print4" pass=6;; 6) typeset -R11 print1=$word1 print2=$word2 print3=$word3 print4=$word4 print " Released $print1" print " Revoked $print2" print "\n Connection (Binding Handle) Counters\n" print " HandlesCreated $print3 HandleWaits $print4" pass=7 ;; esac done rm /tmp/$$.cmdfile exit 0