cudcv@warwick.ac.uk (Rob McMahon) (12/23/88)
Fsanalyze reports disk usage at about 1/2 its true value, and zero for fragmentation, seek distance etc., on NFS systems. Lots of the conditional code is dependent on FS_TYPE == FS_BSD, it forgets about FS_TYPE == FS_BSD_NFS. Here are the patches to make it work. -- RCS file: /usr/src/etc/fsanalyze/report.c,v retrieving revision 1.1 retrieving revision 1.2 diff -c -r1.1 -r1.2 *** /tmp/,RCSt1a05452 Thu Dec 22 20:37:29 1988 --- /tmp/,RCSt2a05452 Thu Dec 22 20:37:30 1988 *************** *** 100,112 **** fil_sys->s_fname, fil_sys->s_fpack); # endif ! # if FS_TYPE == FS_BSD /* Where do you get file system/volume name from? */ # endif printf ("Logical block size = %d bytes", bsize(fil_sys)); ! # if FS_TYPE == FS_BSD printf (", Fragment size = %d bytes", block_size); # endif --- 100,112 ---- fil_sys->s_fname, fil_sys->s_fpack); # endif ! # if (FS_TYPE == FS_BSD) || (FS_TYPE == FS_BSD_NFS) /* Where do you get file system/volume name from? */ # endif printf ("Logical block size = %d bytes", bsize(fil_sys)); ! # if (FS_TYPE == FS_BSD) || (FS_TYPE == FS_BSD_NFS) printf (", Fragment size = %d bytes", block_size); # endif *************** *** 113,119 **** printf ("\nInterleave = %d sectors; %d sectors/cyl", interleave, cyl_size); ! # if FS_TYPE == FS_BSD # ifdef FS_OPTTIME printf ("; Allocation Strategy = %s", fil_sys->fs_optim == FS_OPTTIME ? "Time" : "Space"); --- 113,119 ---- printf ("\nInterleave = %d sectors; %d sectors/cyl", interleave, cyl_size); ! # if (FS_TYPE == FS_BSD) || (FS_TYPE == FS_BSD_NFS) # ifdef FS_OPTTIME printf ("; Allocation Strategy = %s", fil_sys->fs_optim == FS_OPTTIME ? "Time" : "Space"); *************** *** 126,132 **** printf ("\t%lu blocks reserved for data\n", dsize(fil_sys)); ! # if FS_TYPE == FS_BSD printf ("Cylinder groups = %ld; Inodes per cg = %ld; Data Blocks per cg = %ld\n", fil_sys->fs_ncg, fil_sys->fs_ipg, fil_sys->fs_fpg); # endif --- 126,132 ---- printf ("\t%lu blocks reserved for data\n", dsize(fil_sys)); ! # if (FS_TYPE == FS_BSD) || (FS_TYPE == FS_BSD_NFS) printf ("Cylinder groups = %ld; Inodes per cg = %ld; Data Blocks per cg = %ld\n", fil_sys->fs_ncg, fil_sys->fs_ipg, fil_sys->fs_fpg); # endif -- RCS file: /usr/src/etc/fsanalyze/util.c,v retrieving revision 1.1 retrieving revision 1.2 diff -c -r1.1 -r1.2 *** /tmp/,RCSt1a05460 Thu Dec 22 20:39:24 1988 --- /tmp/,RCSt2a05460 Thu Dec 22 20:39:25 1988 *************** *** 54,60 **** l3tol (&temp, off, 1); #endif ! #if FS_TYPE == FS_BSD temp = *((daddr_t *)off); #endif --- 54,60 ---- l3tol (&temp, off, 1); #endif ! #if (FS_TYPE == FS_BSD) || (FS_TYPE == FS_BSD_NFS) temp = *((daddr_t *)off); #endif -- Rob -- UUCP: ...!mcvax!ukc!warwick!cudcv PHONE: +44 203 523037 JANET: cudcv@uk.ac.warwick ARPA: cudcv@warwick.ac.uk Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England