home *** CD-ROM | disk | FTP | other *** search
- /* Analyse current status of all physical disks, JvW 21-01-97 */
- /* partition tables and partition format information */
- /* Then, for all HPFS partitions, show basic information */
- /* and find the Root-directory and Codepage info without */
- /* using the superblock or spareblock pointers */
- /* All results will be contained in the logfile DFSINFO.TXT */
- /* */
- /* JvW 22-11-97 Updated for sync with DFS 2.50 (dfs_number) */
- /* JvW 14-12-97 Updated for sync with DFS 2.53 (FAT stuff) */
-
- Parse Source with . myself .
-
- Parse Arg logname
- if logname = '' then
- do
- logname = 'dfsinfo.txt'
- end
-
- if Address() <> 'DFS' then
- do
- Address cmd '@dfs runq' myself logname
- end; else
- do
- Address cmd '@del' logname
- '@log' logname
-
- say date('E') time()' : Gathering diagnostic information; Please wait ...'
- say ''
- 'close' /* release physical disks */
-
- say date('E') time()' : ' ||,
- 'First get the standard available stuff ...'
- 'cmd fdisk /query'
-
- 'cmd setboot /query'
-
- say date('E') time()' : ' ||,
- "And when available, Doug's partition overview too!"
- 'cmd chkpart'
-
- say date('E') time()' : ' ||,
- 'Now use our own built-in diagnostic power ...'
-
- 'disk 0'
- physdisks = dfs_number /* get number of disks */
- say 'dfs_number: ' dfs_number
-
- do i=1 to physdisks
- Say ''
- Say 'MBR/EBR chain for disk nr' i
- 'walk' i /* select next disk and show */
- end /* it's MBR/EBR chain */
-
- 'part +' /* show all partition info */
- partitions = dfs_number /* and remember the count */
-
- say date('E') time()' : ' ||,
- 'dfs_number: ' dfs_number
-
- do i=1 to partitions
- 'part' i /* select next partition */
-
- Say ''
- say date('E') time()' : ' ||,
- 'Working on partition' i '=' dfs_drive 'on disk' dfs_disknr
- if substr(dfs_drive,2,1)=':' & translate(dfs_drive) == dfs_drive then
- do
- Say ''
- Say 'Running CHKDSK on the partition ...'
- 'chkdsk' dfs_drive '< dfsinfo.inp'
-
- Say ''
- Say 'Attempt a normal directory of its root directory'
- 'dir' dfs_drive'\'
- end
-
- Say ''
- select
- when substr(dfs_afsys,1,4) = 'HPFS' then
- do
- if translate(dfs_drive) == dfs_drive then
- do
- Say "Running Doug's HVA if available ..."
- 'hva -e -r -s' dfs_drive'\*'
- end
-
- Say ''
- say date('E') time()':' ||,
- 'Running some DFS HPFS diagnostics ...'
- 'check'
- 't H'
- ' '
- ' '
- ' '
- '11'
- 't H'
- ' '
- ' '
- '0'
- '\'
- ' '
- ' '
- ' '
- '0'
- 'f c'
- ' '
- 'dirmap'
- 'alloc'
- end
- when substr(dfs_afsys,1,3) = 'FAT' then
- do
- say date('E') time()' : ' ||,
- 'Running some DFS FAT diagnostics ...'
- ' '
- if translate(dfs_drive) == dfs_drive then
- do
- 'x'
- 'alloc'
- 'fatshow'
- end
- end
- otherwise
- say date('E') time()' : ' ||,
- 'No specific diagnostics for filesystem' dfs_afsys '(yet).'
- 't H'
- end
- end
- say date('E') time()': Gathering diagnostic information finished.'
- '@log' /* close the log file */
- end
- exit 0
-