10. utilities

This section describes how to use the infx command line utilities to display status information about an instance.

command line utilities

These command line utilities consist of a set of templates that are used with the status service. The commands are defined as an alias.

The templates are stored in /infx/template/infx-cli. You can customize the utility output by modifying these templates.

 utility  template  description
 infx alert infx-cli-alert.htmlt List SQL task scheduler alerts
 infx cdr  infx-cli-cdr.htmlt  List status of connected CDR servers
 infx checkpoint  infx-cli-ckps.htmlt  List the recent checkpoint tracing times
 infx chunk  infx-cli-chunk.htmlt  List information about instance chunk files
 infx cmap  infx-cli-cmap.htmlt  List information about storage allocation within chunks
 infx dbs  infx-cli-dbs.htmlt   List information about the databases in this instance 
 infx dbspace  infx-cli-dbspace.htmlt  List information about the storage spaces in this instance
 infx dri  infx-cli-dri.htmlt  List information about connected HDR/SDS/RSS servers
 infx fs  infx-cli-fs.htmlt  List information about file systems on this host
 infx hist  infx-cli-hist.htmlt  List the history of service execution in this instance
 infx list  infx-cli-list.htmlt  List the status of each instance on this host
 infx qlist  infx-cli-qlist.htmlt  Quick list of instances, just information from onstat -g dis
 infx running infx-cli-running.htmlt List the infx services that are running on this host
 infx service  infx-cli-service.htmlt  List the status of the latest execution of each service
 infx sched infx-cli-sched.htmlt List the task scheduler information
 infx spool  infx-cli-pools.htmlt  List information about storage pool entries
 infx status  infx-cli-status.htmlt  List detailed status information about this host
 infx users  infx-cli-users.htmlt  List information about users connected to the instance
 infx list  infx-cli-list.htmlt  Display a summary of each instance on the host

parameters

In the alias definition, opt=value, defines the valid parameters for each.utility.. When you add parameters to the template, you must also add them to the alias definition. 

bob001@bobii:/home/informix>infx alias
  ...
  alias=users cmd=status util=infx-cli-users opt=order class sessid user location waitfor dbname sql
  alias=dbspace cmd=status util=infx-cli-dbspaces opt=order class space pg flags
  alias=chunk cmd=status util=infx-cli-chunks opt=order class chunk del
  alias=service cmd=status util=infx-cli-services opt=order class service run
  alias=checkpoint cmd=status util=infx-cli-ckps opt=order class time trigger
  alias=fs cmd=status util=infx-cli-fs opt=order class name
  ...

ordering

Pass the column name with the order parameter to change the list output order. The first column header in the table (from the left), that matches the order parameter will be selected to order by. The default order is descending, rows with lower values are last. To reverse this, specify a "-" in front of the column name.

Examples:

bob001@bobii:/home/informix>infx dbspace
class  space      pg  flags       chks   size mb   free mb  used mb   used%   read mb   write mb
error  root       2k  LO DBSCHG      1    100.00      1.20    98.80  98.80%      3.45   6,054.86
good   dat01      2k  OK             1  4,000.00  3,712.96   287.04   7.18%    277.57   1,731.53
good   idx01      2k  OK             1  4,000.00  3,885.27   114.73   2.87%  1,275.25  15,207.77
good   smartdbs1  2k  OK SBSPACE     1  4,000.00  3,709.37   290.63   7.27%      2.54      23.83
good   smartdbs2  2k  OK SBSPACE     1  4,000.00  3,709.27   290.73   7.27%      0.03      23.94

bob001@bobii:/home/informix>infx dbspace order=write
class  space      pg  flags       chks   size mb   free mb  used mb   used%   read mb   write mb
good   idx01      2k  OK             1  4,000.00  3,885.27   114.73   2.87%  1,275.25  15,207.77
error  root       2k  LO DBSCHG      1    100.00      1.20    98.80  98.80%      3.45   6,054.86
good   dat01      2k  OK             1  4,000.00  3,712.96   287.04   7.18%    277.57   1,731.53
good   smartdbs2  2k  OK SBSPACE     1  4,000.00  3,709.27   290.73   7.27%      0.03      23.94
good   smartdbs1  2k  OK SBSPACE     1  4,000.00  3,709.37   290.63   7.27%      2.54      23.83

bob001@bobii:/home/informix>infx dbspace order=-free
class  space      pg  flags       chks   size mb   free mb  used mb   used%   read mb   write mb
error  root       2k  LO DBSCHG      1    100.00      1.20    98.80  98.80%      3.45   6,054.86
good   smartdbs2  2k  OK SBSPACE     1  4,000.00  3,709.27   290.73   7.27%      0.03      23.94
good   smartdbs1  2k  OK SBSPACE     1  4,000.00  3,709.37   290.63   7.27%      2.54      23.83
good   dat01      2k  OK             1  4,000.00  3,712.96   287.04   7.18%    277.57   1,731.53
good   idx01      2k  OK             1  4,000.00  3,885.27   114.73   2.87%  1,275.25  15,207.77

In the above example, if you specify order=used, it orders by the "used mb" column, Specify order=used% to order by the percentage instead.

filtering

The other parameters for each utility allow you to filter the results. The default alias parameters all filter on alphanumeric columns. Enclose the parameter in qutoes (") if you need to use special characters, such as *.

The pattern matching is performed case in-sensitive.

Example:

bob001@bobii:/home/informix>infx dbspace space=smart
class space pg flags chks size mb free mb used mb used% read mb write mb
good smartdbs1 2k OK SBSPACE 1 4,000.00 3,709.37 290.63 7.27% 2.54 23.83
good smartdbs2 2k OK SBSPACE 1 4,000.00 3,709.27 290.73 7.27% 0.03 23.94

You can specify multiple patterns to match, separated by a comma.

bob001@bobii:/home/informix>infx dbspace space=dat,idx
class space pg flags chks size mb free mb used mb used% read mb write mb
good dat01 2k OK 1 4,000.00 3,712.96 287.04 7.18% 277.57 1,731.53
good idx01 2k OK 1 4,000.00 3,885.27 114.73 2.87% 1,275.25 15,207.77

The filtering and ordering is performed as a function of the template, see the template reference for more details.

modified output

You can override the utilities default output by making a local copy of the template, and changing it.

Example:

cp /infx/template/infx-cli/infx-cli-status.htmlt /infx/local/template/cli

Now when you execute the status service, it's output will be formatted by the local copy of the template.

Templates under the /infx/local/template directory tree will be used in place of the template with the same name under /infx/template.

You can also create a completely new template of your own and create a new alias for it, see custom utilities.