Download Latest Version tpc-c-ifmx.tar.gz (392.7 kB)
Email in envelope

Get an email when there's a new version of IIUG Software Repository

Home / ESQL / dm
Name Modified Size InfoDownloads / Week
Parent folder
dm.ec 2020-05-11 10.8 kB
dm.h 2020-05-11 3.3 kB
README 2020-05-11 6.7 kB
Totals: 3 Items   20.8 kB 0
dm Version 0.01a

dm - DiskMonitor is copyright 1996, 1997 by David Coburn.  Permission
     is granted to freely distribute this product provided all copyright
	 information is included intact.

dm is written for use with Informix OnLine Dynamic Server (ODS) version
7.2.  It has not been tested with any versions prior to this, 
although it should work with any version 6.00 and above.

dm was written, compiled, and tested with the default C compiler tools 
for HPUX 10.20.  THIS IS NOT AN ANSI COMPILER; USER ASSUMES ANY AND ALL 
PORTING WILL BE THEIR RESPONSIBILITY.  If somebody goes through this 
trouble, I will be happy to include this with future distributions.

Special thanks to Jonathan Leffler for his kind words and overview of the 
code and several suggestions for enhancements.

OVERVIEW

dm is intended to be a synopsis view of information already available from 
various onstat commands.  The intent is to provide a "summary" view of this 
data, rather than provide the user with the details that onstat is so good 
at providing.

USAGE

	dm [-h | -s | -d | -m | -M | -t {12|24} | -T]

Where:	
	-h	print this help file;
	-s	print summary data only (suitable for cron report);
	-d	detail report;
	-m	disk layout mappings
	-M	disk layout mappings (Physical name on right)
	-t	time format; valid values are 12 and 24
	-T	time format; requires string argument as follows

Time formats for the -T option follow arguments for strftime(3c).  See
your man pages for details.  Some common arguments are:

  %a  Abbreviated weekday name     %I  Hour as a number [01,12]
  %A  Full weekday name            %m  Month as a number [01,12]
  %b  Abbreviated month name       %M  Minute as a number [00,59]
  %B  Full month name              %p  Local AM or PM
  %C  The century number [00,99]   %T  The time (%H:%M:%S)
  %d  Numeric day of month [01,31] %Y  4 digit year (e.g., 1997)
  %e  Numeric day of month [1,31]  %C  2 digit year (e.g., 97)
  %H  Hour as a number [00,23]     %Z  Time zone name

Summary Reports

This output format of this report is similar to the following:

$dm -s
                 D I S K   U T I L I Z A T I O N   R E P O R T

                         Monday 08-Sep-1997 @ 16:31:26

        SERVER = israel
      ONCONFIG = onconfig.prod
INFORMIXSERVER = wvms_prod_shm
   INFORMIXDIR = /opt/informix/prod

  ID Space Name                   Size     Free
   1 dss_root                   150000   146219 ( 2.52%)
   2 tempdbs                    750000   749855 ( 0.02%)
   3 phy_logs                    10000     4947 (50.53%)
   4 log_logs                   100000    89697 (10.30%)
   5 dm_1                       250000    49947 (80.02%)***
   6 dm_2                       250000    49947 (80.02%)***
   7 dm_3                       250000    49947 (80.02%)***
	 ...
	 ...
	 ...
  52 index5                     750000   236450 (68.47%)
  53 index6                     750000   217389 (71.01%)

After the date and time stamps, information about the current engine is 
listed.  (dm always uses the current settings for Informix variables.)
Following this is the actual data: Space number, name, total size of the
space (in pages), amount free (again in pages), and percentage filled.  You
will notice a flag ("***") following spaces five thru 7.  These indicate a
space that is more than 80% full. This is configurable in the header dm.h
by changing the value for FLAG_PCT.

Detail Reports

The output of a detail report will appear similar to the following.

                 D I S K   U T I L I Z A T I O N   R E P O R T

                         Monday 08-Sep-1997 @ 16:36:43

        SERVER = israel
      ONCONFIG = onconfig.prod
INFORMIXSERVER = wvms_prod_shm
   INFORMIXDIR = /opt/informix/prod

  ID Space Name       Chunk   Offset     Size     Free Device
   1 dss_root             1        0   150000   146219 /dev/rdsk/dss_da2c_1
Total:                                 150000   146219

  ID Space Name       Chunk   Offset     Size     Free Device
   2 tempdbs              2        0    50000    49897 /dev/rdsk/dss_da2d_1
                          3        0    50000    49997 /dev/rdsk/dss_da2e_1
                          4        0    50000    49997 /dev/rdsk/dss_da2f_1
   ...
   ...
   ...
                         14        0    50000    49997 /dev/rdsk/dss_da15d_1
                         15        0    50000    49997 /dev/rdsk/dss_da15e_1
                         16        0    50000    49997 /dev/rdsk/dss_da15f_1
Total:                                 750000   749855

  ID Space Name       Chunk   Offset     Size     Free Device
   ...
   ...
   ...
  ID Space Name       Chunk   Offset     Size     Free Device
  52 index5              75        0   750000   236450 /dev/rdsk/dss_da2d_2
Total:                                 750000   236450

  ID Space Name       Chunk   Offset     Size     Free Device
  53 index6              76        0   750000   217389 /dev/rdsk/dss_da14f_2
Total:                                 750000   217389

Note that now we again have data by dbspace, but with chunk information
as well.  

Disk Maps

The -m and -M options produce disk maps by logical device, showing chunk
and dbspace information.  This data is useful in laying out disks in an
orderly fashion.  There are two options.  The first, -m, places the space
name on the left.  The second places it on the right, if you find that more
readable.  (Space names could be longer than the space allowed; on the
right they are more readable.)

Example output is shown below:

Space Name           Chk Dbs   Name                  Start      End     Free

/dev/rdsk/dss_da14c_1  9   2   tempdbs                   0    49999    49997
                      18   4   log_logs              50000   149999    89697
                      73  50   index3               150000   899999   331797

/dev/rdsk/dss_da14d_1 10   2   tempdbs                   0    49999    49997
                      22   8   dm_4                  50000   299999    49947
                      27  13   child_3              300000   399999    66447
                      69  47   misc_c               400000   449999    49997
                      39  22   ph_7                 600000   999999   137447
   ...
   ...
   ...

/dev/rdsk/dss_da3f_1   8   2   tempdbs                   0    49999    49997
                      21   7   dm_3                  50000   299999    49947
                      26  12   child_2              300000   399999    66447
                      68  47   misc_c               400000   449999    49997
                      38  21   ph_6                 600000   999999   137447

BUGS

	There are currently no known bugs with dm.

COMMENTS

	Please forward comments to coburn@scn.org.
Source: README, updated 2020-05-11