home *** CD-ROM | disk | FTP | other *** search
/ AMIGA PD 1 / AMIGA-PD-1.iso / NetBSD / Tools / bffs1.3.lha / bffs1.3 / doc / BFFSTool.doc next >
Text File  |  1994-02-02  |  23KB  |  444 lines

  1. Version 1.3 of BFFSTool                     Distribution is 2-Feb-94
  2. -----------------------------------------------------------------------
  3.  
  4. BFFSTool - a program to monitor and modify the behavior of running
  5.            BFFSFileSystem handlers.
  6.  
  7.  
  8. BFFSTool provides a graphical "point-and-click" interface to the
  9. internal operation of a running BFFSFileSystem handler.  The tool
  10. performs modifications to the running filesystem by directly
  11. manipulating static BFFS local variables.  This means that all
  12. changes done by the user happen immediately and can be observed
  13. while the tool is still running.
  14.  
  15. Don't be afraid to try the different buttons.  There should be
  16. nothing you can do in BFFSTool to damage your filesystem or
  17. permanently impair its performance.
  18.  
  19. After starting up the filesystem, you may at first be overwhelmed
  20. with the amount of information presented.  Since this tool was
  21. developed during debugging of the filesystem, you may find many
  22. statistics not useful to you at all.  First I will cover the
  23. meaning of each static, then the buttons and other gadgets will
  24. be explained.
  25.  
  26. You can start BFFSTool by typing "bffstool" at the CLI prompt.
  27. It will automatically search the system for all accessed (and
  28. valid) BFFS filesystems and choose the first one found to be
  29. displayed.  If you know the name of the device for BFFSTool to
  30. initially select, you may specify that on the command line;
  31. ie: "bffstool bf0:"
  32.  
  33. A window should open with the title, "Berkeley Fast Filesystem
  34. (BFFS) status tool V1.3"  If it doesn't then no handlers were
  35. found in the system.  In that case, you will need to consult
  36. the documentation for correctly installing a BFFS handler.
  37. If you have a handler installed correctly, you may have one of
  38. two problems.  The partition must be mounted and accessed
  39. before BFFSTool will recognize the filesystem handler as valid.
  40. The other possible problem may be that you are attempting to
  41. run BFFSTool with the wrong version of the BFFSFileSystem.
  42. BFFSTool 1.3 will ONLY work with version 1.3 of BFFSFileSystem.
  43.  
  44.  
  45. The window should look similar to the following:
  46. _____________________________________________________________________________
  47. |_|_________________________________________________________________________|
  48. |    read hits   0      read opens  0       frags free 7       | Refresh   ||
  49. |    read misses 0      read groups 4      blocks free 0       +-----------+|
  50. |   write hits   0      read bytes  4096   inodes free 23      |  Sync     ||
  51. |   write misses 0     write opens  0         num dirs 1       +-----------+|
  52. |  cgread hits   0     write groups 0        frag size 1024    |  Clear    ||
  53. |  cgread misses 0     write bytes  0       block size 8192    +-----------+|
  54. | cgwrite hits   0          locates 0       num inodes 64      |  Quit     ||
  55. | cgwrite misses 0         examines 1       data frags 679     -------------|
  56. |    cache moves 0     examinenexts 7        num frags 720                _ |
  57. |        flushes 0          flushes 0          num cgs 1    Auto Symlink |x||
  58. |     cg flushes 0          renames 0          num cyl 80    Ignore Case |x||
  59. |   force writes 0                           sec/track 9   Link Comments |_||
  60. |cg force writes 0       sync timer:1        track/cyl 2  Inode Comments | ||
  61. |       destroys 0      sync stalls:10          cyl/cg 80                +-+|
  62. |    invalidates 0       GMT offset:0         frags/cg 720    Unix Paths |_||
  63. | cg max buffers:3         PreAlloc 7        inodes/cg 64      Read Only | ||
  64. |    max buffers:32                            minfree 0                 +-+|
  65. |  total buffers 32     media start 0         modified 0    Show Minfree |_||
  66. | in use buffers 0      media end   737280       clean 0    Grp/Otr Bits |_||
  67. |  dirty buffers 0          version 1.3 Rw              ____________________|
  68. | locked buffers 0        disk type Sun md0a   Handler |@|______BFFSa:_____||
  69. |___________________________________________________________________________|
  70.  
  71. Note that the above is my best ASCII representation of a graphic display.
  72.  
  73.  
  74. CACHE INFORMATION:
  75. ------------------
  76. read hits    The number of successful probes in the cache by the cache
  77.         module for the requested disk fragment.  In general, this
  78.         number is slightly inflated because routines outside the
  79.         cache will often reaccess a block many times.  For later
  80.         versions of the filesystem, this number will actually be
  81.         lowered because more routines will start to use the new
  82.         disk frag locking mechanism offered by the cache.
  83.         The main disk fragment cache is LRU based, but the data
  84.         structure features both sequential (ordered) and hashed
  85.         access for fast block lookups.  Allocation for this
  86.         cache occurs at filesystem started and whenever buffers
  87.         are added or subtracted.  Note that not all reads pass
  88.         through the cache and thus will not be reported as hits
  89.         or misses.  Most notably, you will not see superblock or
  90.         multiblock reads/writes noted in the cache information.
  91.         This tends to push the cache hit rate up as those direct
  92.         accesses would most often be cache misses.
  93. read misses    The number of failed cache probes which required a disk
  94.         access to satisfy the request.
  95. write hits    The number of successful probes in the cache to access
  96.         a disk fragment such that the fragment will have to
  97.         eventually be written back to disk.  A disk fragment
  98.         must already be in the cache as either clean (has only
  99.         been read so far) or dirty (has been written at least
  100.         once since the last flush) to be considered a hit.
  101. write misses    The number of failed cache probes which required a disk
  102.         access to cache the disk fragment to be modified.
  103. cgread hits    A separate cache module controls access to the cylinder
  104.         group summary cache.  Each cache nodes contains a chunk
  105.         of memory as large as the disk block size.  Cached in
  106.         that space are working cylinder group bit fields
  107.         describing the allocated and free blocks in the active
  108.         cylinder group(s).  This cache is also LRU ordered, but
  109.         is not hashed because in general very few cylinder
  110.         groups should ever be active at the same time.  The
  111.         larger your files and the smaller your disk, the less
  112.         individual cylinder groups I recommend.
  113. cgread misses    The number of cache misses for cylinder group summary
  114.         information.  Note that cylinder group summary
  115.         information is only needed by the filesystem when
  116.         writing to the disk.  If you never write on the 
  117.         filesystem, then no memory will be allocated to the
  118.         cylinder group cache (allocation for this cache is
  119.         strictly dynamic, but bounded).
  120. cgwrite hits    The number of cache write hits which were satisfied
  121.         with cylinder group summary information already present
  122.         in the cache.
  123. cgwrite misses    The number of cache write misses which required a disk
  124.         access to satisfy the request to modify cylinder group
  125.         summary information.
  126. cache moves    The number of disk fragments moved around on the disk
  127.         via the cache write-back policy.  Cache moves often
  128.         occur when writing files to the disk because at file
  129.          close, the policy of the Berkeley filesystem states
  130.         that the filesystem must attempt to locate a partial
  131.         filesystem block to put the last (incomplete) file
  132.         fragments.  The cache moves take advantage of the
  133.         possibility that the data to be moved is probably still
  134.         in the cache, alleviating disk access.
  135. flushes        The number of cache flushes which were requested by
  136.         the filesystem.  You may have started to realize that
  137.         the cache acts as an individual entity when it comes
  138.         to disk data.  No other routines in the filesystem are
  139.         privy to the information the cache has.  Flushes can
  140.         occur for various reasons, but will only happen when
  141.         the cache has dirty disk fragments to be written:
  142.         o  The large block read or write routines are starting
  143.            a data access.
  144.         o  The file deallocator wants block access to the
  145.            filesystem inode blocks (this also causes
  146.            invalidates of those fragments to occur).
  147.         o  The cache was asked to get a disk block fragment,
  148.            but all cache slots are in use and the cache is
  149.            more than 3/4 full.  ** This 3/4 will become a user
  150.            configurable setting in the next release. **
  151.         o  The write back timer expires demanding the data be
  152.            flushed to the disk immediately.
  153.         o  The user sends a ACTION_FLUSH or ACTION_DIE packet
  154.            to the filesystem.
  155. cg flushes    The number of cylinder group summary cache flushes which
  156.         were requested by the filesystem.  These flushes can
  157.         happen under any of the following circumstances:
  158.         o  The cache was asked to get a cylinder group summary
  159.            block which was not in the cache, and the cache was
  160.            already full with other cylinder group summary blocks.
  161.            Only the cg summary block ejected will be immediately
  162.            flushed to disk.
  163.         o  The write back timer expires demanding the data be
  164.            flushed to the disk immediately.
  165.         o  The user sends a ACTION_FLUSH or ACTION_DIE packet
  166.            to the filesystem.
  167. force writes    The number of cache disk frags which were requested by
  168.         the filesystem to be written immediately to the disk.
  169.         Also, the number of cache frags which were forced out
  170.         of the cache by the cache being full of dirty frags
  171.         when a new disk frag was requested.
  172. cg force writes    The number of cylinder group summary blocks which were
  173.         dirty and forced out to disk when accesses to other
  174.         cylinder group summary blocks forced them out.  In
  175.         general, this value should be zero even in an really
  176.         active system.  If it isn't zero, I suggest bumping the
  177.         number of cg max buffers.
  178. destroys    The number of times the entire cache was deallocated.
  179.         In general, this will only happen on disk change 
  180. invalidates    The number of time the filesystem asked the cache to
  181.         "just forget" about specified cache frags.  This will
  182.         happen to the destination of a cache move (if it exists
  183.         in the cache), or in the direct block write routines
  184.         should a large write chunk overlap a cached disk
  185.         fragment still in the cache.
  186. cg max buffers    This is a configurable maximum number of cylinder group
  187.         summary slots (filesystem block size memory chunks)
  188.         which are to be dedicated to caching cylinder group
  189.         summary information.
  190. max buffers    This is a configurable maximum number of disk fragment
  191.         size memory blocks which are dedicated to the main
  192.         disk fragment cache.  This number is translatable into
  193.         the number of buffers reported by AddBuffers; however
  194.         AddBuffers reports this value in 512 byte blocks.  This
  195.         may change as it's really just BFFS's interface with
  196.         the AddBuffers command.
  197. total buffers    The number of disk buffers allocated by the filesystem.
  198.         In general, this number will be the same as the max
  199.         buffers, except when the max buffers are changed from
  200.         inside BFFSTool.  In that case, the change will not
  201.         take effect until the next disk change, or the next
  202.         AddBuffers command.
  203. in use buffers    The number of cache disk fragment buffers currently in
  204.         use by the filesystem.
  205. dirty buffers    The number of cache disk fragment buffers which have
  206.         not yet been written to disk.  Usually, this value will
  207.         be zero unless the filesystem is busy writing files.
  208. locked buffers    The number of disk fragment buffers which have been
  209.         internally locked by the filesystem.  In general, you
  210.         should /never/ see this value other than zero.  This is
  211.         because the internal routines will unlock buffers
  212.         before completion of a packet.
  213.  
  214.  
  215. GENERAL HANDLER INFORMATION:
  216. ----------------------------
  217. read opens    The number of files (successfully and unsuccessfully)
  218.         opened for read from the disk.
  219. read groups    The number of raw disk transfers which have been
  220.         requested of the disk device to read.
  221. read bytes    The number of bytes which have been requested of the
  222.         disk device read.
  223. write opens    The number of files (successfully and unsuccessfully)
  224.         opened for write to the disk.
  225. write groups    The number of raw disk transfers which have been
  226.         requested of the disk device to write.
  227. write bytes    The number of bytes which have been requested of the
  228.         disk device write.
  229. locates        The number of times an individual file was locked
  230.         via the ACTION_LOCATE packet (Lock() in dos.library)
  231. examines    The number of examine packets which have been sent
  232.         to the filesystem handler by AmigaDOS.
  233. examinenexts    The number of examine next packets which have been
  234.         sent to the filesystem handler by AmigaDOS.
  235. flushes        The number of times the cache was flushed by a timer
  236.         expire or by an ACTION_FLUSH packet send manually.
  237. renames        The number of files which have been renamed since this
  238.         handler was started up.
  239. sync timer    The number of seconds idle write packet time (no write
  240.         packets have been received within this time) to flush
  241.         out the cache data to disk.  This is so when the
  242.         filesystem is idle, it can put the disk to use writing
  243.         back all the cached dirty disk data (and turning the
  244.         floppy motor off).
  245. sync stalls    The number of seconds to retry (check is once every
  246.         sync timer seconds) the cache flush before forcing a
  247.         cache flush anyway.  This serves two purposes:
  248.         o  Even in an system actively writing to the disk, the
  249.            filesystem gets a chance to checkpoint and sync
  250.            a consistent filesystem structure "often."
  251.         o  Flushing out the cache improves performance in an
  252.            active system since those dirty fragments become
  253.            unavailable for regular filesystem use until they
  254.            have been synchronized with the media.
  255. GMT offset    The number of hours (plus or minus) that the local
  256.         time varies from GMT time.  This is mainly used to
  257.         synchronize your AmigaDOS timestamp with the UNIX
  258.         file timestamp (which is always GMT).
  259. PreAlloc    Representation of the current BFFS settings usable
  260.         if you want to mount with those settings as default.
  261. media start    This is the byte address of the physical disk where
  262.         the active filesystem partition is being accessed.
  263. media end    This is the upper bounding byte address of the
  264.         physical disk where the active filesystem partition
  265.         is being accessed.  All data accesses are checked
  266.         for validity within this range (to prevent media
  267.         corruption causing additional possible corruption).
  268. version        This is a comment field by the filesystem to describe
  269.         the current running version of BFFS.  You will notice
  270.         the version number followed by some letters.  The
  271.         letters you see detail the following:
  272.         R  Handler can handle removable media.  Your version
  273.             will probably have this option turned on.
  274.         E  Handler uses extended packets to talk with the
  275.             disk device.  Since not all devices are able
  276.             to use extended packets, your distribution
  277.             will probably have this option turned off.
  278.         F  Handler compiled with Fast mode.  This means that
  279.             all filesystem consistency checking is turned
  280.             off, but the filesystem performs much faster.
  281.         I  Intel version.  This version of the filesystem has
  282.             been compiled to support Intel byte ordering
  283.             for the filesystem (ie: 386i and 386BSD).
  284.             This automatically makes the filesystem
  285.             incompatible with Motorola byte ordering
  286.             filesystems, which include Sun SPARC, and
  287.             Amiga.  This functionality is not yet
  288.             supported, but will be in a future release.
  289.         r  Filesystem handler is compiled to only read the
  290.             disk and never allow writes.
  291.         w  Filesystem handler is compiled to allow both reads
  292.             from and writes to the disk.
  293.         D  Filesytem is compiled with debugging messages
  294.             turned on.  This increases the size of the
  295.             filesystem and slows it down.  Unless you are
  296.             running a non-distribution copy of BFFS, you
  297.             shouldn't see this flag.
  298.         The above flags are set at compile-time and can not
  299.         be modified by the user of the filesystem.
  300. disk type    This field presents information about what BFFS thinks
  301.         it is dealing with (as far as disk structure is
  302.         concerned).  The first text (if present) is either
  303.         "Sun" or "BSD" if a disk partition label is present,
  304.         and was automatically sensed by the filesystem.  Note
  305.         that if the Reserved parameter in the MountList is -1,
  306.         then this text will never show.  If no disk label is
  307.         present, then the handler device name will be shown
  308.         instead.  This field may also say "dev:Dsk?" indicating
  309.         no disk is in the drive.  You may also see "dev:Bad?"
  310.         which means the superblock is unreadable.  If you see
  311.         "dev:Dev?" this suggests a problem in the MountList.
  312.         If the disk was mounted successfully, the next part
  313.         will have the format "%cd%d%c"  The first %c will be
  314.         the first character of the device driver.  The %d is
  315.         the physical unit on that device.  The last %c is the
  316.         partition that was actually mounted.  So, for example,
  317.         if you have a Sun floppy in bf0: (and are using
  318.         messydisk.device or mfm.device , you should see:
  319.         "Sun md0a"  Otherwise, if you have a Sun hard drive
  320.         at scsi.device unit 0, you may see "Sun sd0a"
  321.  
  322.  
  323. SUPERBLOCK INFORMATION:
  324. -----------------------
  325. frags free    The number of disk fragments which are not yet
  326.         allocated to a file.  Note that this number should
  327.         stay relatively small, as the filesystem attempts
  328.         not to break full filesystem blocks if partial full
  329.         blocks (multiple disk frags) are located nearby.
  330. blocks free    The total number of full filesystem blocks which
  331.         have not yet been allocated to files.
  332. inodes free    The number of disk file descriptors still available.
  333.         If this number falls to zero, no mores files may
  334.         be allocated.
  335. num dirs    The number if directories present in the filesystem.
  336.         Note that the root directory counts as one.
  337. frag size    The number of bytes which make up a disk fragment,
  338.         as parameterized by the newfs command.
  339. block size    The number of bytes which make up a full filesystem
  340.         disk block as parameterized by the newfs command.
  341.         Note that this value must be a multiple (from 1x to
  342.         8x) the size of the frag size.  Also, allowed values
  343.         for the block size are 4096, 8192, 16384, or 32768.
  344. num inodes    The total number of inodes which were parameterized
  345.         as available when the filesystem was created.  By
  346.         subtracting the number of inodes free, you can get
  347.         the number of inodes in use.
  348. data frags    Number of total disk block fragments which are
  349.         allocatable to disk files.  This is basically the
  350.         total filesystem size (num frags) minus the static
  351.         filesystem overhead allocation.
  352. num frags    The length of the filesystem in disk block fragments.
  353.         Note that this number is considerably more than the
  354.         actual usable space of the filesystem.
  355. num cgs        The number of individual disk cylinder groups
  356.         parameterized when the filesystem was created (newfs).
  357. num cyl        The number of disk cylinders involved in the entire
  358.         filesystem.  This number is also chosen by newfs.
  359. sec/track    The number of sectors in a single disk track.
  360. track/cyl    The number of tracks (disk heads) in a single cylinder.
  361. cyl/cg        The number of disk cylinders parameterized by newfs
  362.         to be logically located in the same cylinder group.
  363. frags/cg    The number of disk block fragments per cylinder group.
  364. inodes/cg    The number of inodes parameterized by newfs to be
  365.         available (allocated within) each cylinder group.
  366. minfree        The minimum free disk space to report (percentage).
  367. modified    The number of modifications to the superblock since
  368.         the last flush.  If this is non-zero, then the disk
  369.         is considered out of sync with memory.
  370. clean        This value should always be zero while the handler is
  371.         active with the disk.  It is used to indicate in the
  372.         superblock that the filesystem was cleanly unmounted.
  373.  
  374.  
  375. BUTTONS:
  376. --------
  377. Refresh        This button asks the filesystem for an update on the
  378.         filesystem status information shown.
  379. Sync        This button asks the filesystem to FLUSH its dirty
  380.         cache disk fragments to disk immediately.  You will
  381.         notice dirty buffers go to zero (unless the disk is
  382.         VERY active).
  383. Clear        Clear the value of the operating statistics.  This
  384.         is a non-dangerous operation, as only data which
  385.         the filesystem /only/ updates is cleared.
  386. Quit        This button Quits BFFSTool, returning you to the CLI.
  387. Auto Symlink    This box allows you to turn on and off the automatic
  388.         symlink resolution of the filesystem.  For this
  389.         release NEVER turn this flag off.  ReadLink is not
  390.         implemented and most AmigaDOS programs will crash if
  391.         they run into a soft link and attempt to resolve it.
  392. Ignore Case    This box allows you to turn on and off the case
  393.         independence you have grown used to with AmigaDOS.
  394.         When off, multiple files may exist in the same
  395.         directory with the same name (just different case).
  396.         This may be necessary when trying to use a UNIX
  397.         filesystem with files such as "Makefile" and "makefile"
  398. Link Comments    This box allows you to turn on and off directory
  399.         comments for "special" files; symbolic links and
  400.         character/block special devices.
  401. Inode Comments    This box allows you to turn on and off directory
  402.         comments for files showing UNIX inode number,
  403.         permissions, uid, gid, number of links, nunber of
  404.         physical disk (512 byte) blocks, and number of bytes
  405.         allocated to the file.  Note that directory listings
  406.         are faster if you do not normally use comments.
  407. Unix Paths    This box allows you to turn on and off the UNIX path
  408.         parser.  When on / is a reference to the root
  409.         directory.  When off, / is instead a reference to the
  410.         parent directory.  Use this if you want BFFS to be
  411.         compatible with some unconfigurable package.
  412. Read Only    This box represents the superblock flag indicating
  413.         whether this filesystem is mounted read-write or
  414.         read-only.  You may change this status at any time.
  415. Show Minfree    Checking this box makes the filesystem report
  416.         available disk space as relative to the minfree
  417.         percentage specified in the superblock.
  418. Grp/Otr Bits    This box when checked inverts the meaning of the
  419.         permission bits for group and other.  Apparently
  420.         there was some late indecision made at Commodore
  421.         regarding the final meaning of these bits.  This
  422.         provides a temporary solution should you need it.
  423. Handler        This is a Cycle gadget which allows you to choose
  424.         the BFFS handler with which you want to communicate.
  425.         Note that BFFSTool "knows" which handlers are active
  426.         in the system and it will only let you query an
  427.         active BFFS 1.3 or higher filesystem handler.
  428.  
  429. Finally, you will notice miniature up/down button gadgets near
  430. "cg max buffers", "max buffers", "sync timer", "sync stalls", and
  431. "GMT offset." These are for incrementing and decrementing the value
  432. of the BFFS static parameter for the filesystem.
  433.  
  434.  
  435. I hate documentation.  ;)
  436.  
  437. Enjoy.
  438.  
  439. -----------------------------------------------------------------------
  440.  
  441.  
  442. This package was written by Chris Hooper (cdh@mtu.edu).
  443. -----------------------------------------------------------------------
  444.