Informix Online Utilities

ONCHECK

The oncheck utility displays information about the database disk configuration and usage, such as the number of pages used for a table, the contents of the reserved pages, and the number of extents in a table.

Usage:  oncheck [-clist] [-plist] [-qny] [ { database[:[owner.]table[,fragdbs|#index]]
        | TBLspace number | Chunk number } { rowid | page number } ]
        -c  Check
                r  Reserved pages
                e  Extents
                c  Database catalogs [database]
                i  Table indexes database[:[owner.]table[#index]]
                I  Table indexes and rowids in index database[:[owner.]table[#index]]
                d  TBLspace data rows including bitmaps database[:[owner.]table[,fragdbs]]
                D  TBLspace data rows including bitmaps, remainder pages and BLOBs database[:[owner.]table[,fragdbs]]
        -p Print
                r  Reserved pages (-cr)
                e  Extents report (-ce)
                c  Catalog report (-cc) [database]
                k  Keys in index (-ci) database[:[owner.]table[#index]]
                K  Keys and rowids in index (-cI) database[:[owner.]table[#index]]
                l  Leaf node keys only (-ci) database[:[owner.]table[#index]]
                L  Leaf node keys and rowids (-cI) database[:[owner.]table[#index]]
                d  TBLspace data rows (-cd) database[:[owner.]table[,fragdbs]][rowid]
                D  TBLspace data rows including bitmaps, remainder pages and BLOBs (-cD) database[:[owner.]table[,fragdbs]] [page number]
                t  TBLspace report database[:[owner.]table[,fragdbs]]
                T  TBLspace disk utilization report database[:[owner.]table[,fragdbs]]
                p  Dump page for the given database[:[table[,fragdbs]] and rowid | TBLspace and page #]
                P  Dump page for the given chunk num and page num[chunk # and page #]
                B  BLOBspace utilization for given table(s) database[:[owner.]table[,fragdbs]]
        -q     Quiet mode - print only error messages
        -n     Answer NO to all questions
        -y     Answer YES to all questions

ONINIT

Initialize the Database Server.

Usage:  oninit [-i] [-p] [-s] [-y]
        -i Disk space initialization
        -p Do not delete temp tables during shared memory initialization
        -s Stay in quiescent mode

ONLOAD

The onload utility provides the fastest way to move data, but it does not let you modify the database schema or move from one operating system or database server version to another.

Usage:  onload [-l] [-t <tape device>] [-b <block size>] [-s <tape size>] [-d <DBspace>]
        <database>[:[<owner>.]<table>] [{-i <old indexname> <new indexname>}]
        [{-fd oldDBspname newDBspname}] [{-fi indexname oldDBspname newDBspname}]
        -l Use logical log tape configuration
        -t Tape devices
        -b Tape block size
        -s Tape size
        -d DBspace name
        -i Rename index during load

ONUNLOAD

The onunload utility unloads data from the specified database or table onto a tape or a file on disk in disk-page-sized units

Usage:  onunload [-l] [-t <tape device>] [-b <block size>] [-s <tape size>] <database>  [:[<owner>.]<table>]
        -l Use logical log tape configuration
        -t Tape devices
        -b Tape block size
        -s Tape size

ONLOG

The onlog utility displays all or selected portions of the logical log. This command can take input from selected log files, the entire logical log, or a backup tape of previous log files. The onlog utility can help you to identify a problematic transaction or to gauge transaction activity that corresponds to a period of high utilization, as indicated by your periodic snapshots of database activity and system-resource consumption.

Usage:  onlog [-l] [-q] [-b] [-d <tape device>] [-n <log file number>] [-u <user name>] 
        [-t <TBLspace number>] [-x <transaction number>]
        -l Display maximum information about each log record
        -q Do not display program header
        -b Display information about logged BLOB pages (-d option only)
        -d Read from tape device
        -n Display the specified log(s)
        -u Display the specified user(s)
        -t Display the specified TBLspace(s)
        -x Display the specified transaction(s)

ONMODE

onmode changes some parameters dynamically while the engine is up and running.

Usage:  onmode -abcDdFklMmnpQRrSsuyZz
        -a  <kbytes> Increase shared memory segment size
        -b  <version> Revert OnLine disk structures
        -c Do checkpoint
        -D <max PDQ priority allowed>
        -d {standard|{primary|secondary <servername>}} set DR server type
        -F Free unused memory segments
        -k Shutdown completely
        -l Force to next logical log
        -M <decision support memory in kbytes>
        -m Go to multi-user on-line
        -n Set shared memory buffer cache to non-resident
        -O Override dbspace down blocking a checkpoint
        -p  <+-#> <class>   Start up or remove virtual processors of class cpu, aio, lio, pio, shm, soc, or tli
        -Q <max # decision support queries>
        -R Rebuild the /INFORMIXDIR/etc/.infos.DBSERVERNAME file
        -r Set shared memory buffer cache to resident
        -S <max # decision support scans>
        -s Shutdown to single user
        -u Shutdown and kill all attached sessions
        -y Do not require confirmation
        -Z  <address> heuristically complete specified transaction
        -z  <sid>   Kill specified session id

ONPARAMS

The onparams utility is used to manage the logical logs.
To use this utility Informix Dynamic Server must be in quiescent or single user mode.
Any onparams command fails if a storage-space backup is in progress. If you do not use any options, onparams returns a usage statement.

Usage:  onparams { -a -d DBspace [-s size] | -d -l logid [-y] |-p -s size [-d DBspace] [-y] }
        -a Add a logical log
        -d Drop a logical log
        -i Insert after current log
        -p Change physical log size and location
        -y Answer YES to all questions

ONSPACES

This utility allows you to add, drop, and change the mirroring of dbspaces.

Usage:  onspaces  { -a spacename -p pathname -o offset -s size [-m path offset] |
        -c {-d DBspace [-t] | -b BLOBspc -g pagesize} -p pathname -o offset -s size [-m pathoffset]
        -d spacename [-p pathname -o offset] [-y] | 
        -f[y] off [DBspace-list] | on [DBspace-list] | 
        -m spacename {-p pathname -o offset -m path offset [-y] | 
        -f filename} | 
        -r spacename [-y] | 
        -s spacename -p pathname -o offset {-O | -D} [-y] }

        -a Add a chunk to a DBspace or BLOBspace
        -c Create a DBspace or BLOBspace
        -d Drop a DBspace, BLOBspace or chunk
        -f Change dataskip default for specified DBspaces
        -m Add mirroring to an existing DBspace or BLOBspace
        -r Turn mirroring off for a DBspace or BLOBspace
        -s Change the status of a chunk

ONSTAT

The onstat command is used to view and monitor what is happening in the engine.

Usage:  onstat [-abcdfghklmpstuxzBCDFRX][-i] [-r seconds] [-o file] [infile]
        -a Print all information
        -b Print buffers
        -c Print configuration file
        -d Print DBspaces and chunks
        -f Print dataskip status
        -g MT subcommand (default: all) more information [*http://www.iiug.org/waiug/archive/iugnew2000/onstatmt.htm The onstat Quick Reference Guide] 
                all Print all MT information
                ath Print all threads  
                wai Print waiting threads
                act Print active threads
                rea Print ready threads
                sle Print all sleeping threads
                spi Print spin locks with long spins
                sch Print VP scheduler statistics
                lmx Print all locked mutexes
                wmx Print all mutexes with waiters
                con Print conditions with waiters
                stk  <tid>   Dump the stack of a specified thread
                glo Print MT global information
                mem  <pool name|session id>   Print pool statistics
                seg Print memory segment statistics
                rbm Print block map for resident segment
                nbm Print block map for non-resident segments
                afr  <pool name|session id>   Print allocated pool fragments
                ffr  <pool name|session id>   Print free pool fragments
                ufr  <pool name|session id>   Print pool usage breakdown
                iov Print disk IO statistics by vp
                iof Print disk IO statistics by chunk/file
                ioq Print disk IO statistics by queue
                iog Print AIO global information
                iob Print big buffer usage by IO VP class 
                ppf  [<partition number> | 0]   Print partition profiles
                tpf  [<tid> | 0]   Print thread profiles
                ntu Print net user thread profile information
                ntt Print net user thread access times              
                ntm Print net message information
                ntd Print net dispatch information 
                nss  <session id>   Print net shared memory status
                nsc  <client id>    Print net shared memory status
                nsd Print net shared memory data
                sts Print max and current stack sizes
                dic Print dictionary cache information
                qst Print queue statistics
                wst Print thread wait statistics
                ses  <session id>   Print session information
                sql  <session id>   Print sql information
                dri Print data replication information
                pos Print /INFORMIXDIR/etc/.infos.DBSERVERNAME file
                mgm Print mgm resource manager information
                ddr Print DDR log post processing information
        -i Interactive mode
        -k Print locks
        -l Print logging
        -m Print message log
        -p Print profile
        -s Print latches
        -t Print TBLspaces
        -u Print user threads
        -x Print transactions
        -z Zero profile counts
        -B Print all buffers
        -C Print btree cleaner requests
        -D Print DBspaces and detailed chunk stats
        -F Print page flushers
        -R Print LRU queues
        -X Print entire list of sharers and waiters for buffers
        -r Repeat options every n seconds (default: 5)
        -o Put shared memory into specified file (default: onstat.out)
        infile  Use infile to obtain shared memory information

The current operating mode can be checked via the onstat - command. This command delivers also a returncode which can be used in scripts.

The different operating modes and their respective returncodes are:

Operating Mode Returncode
Off-Line -1 (255)
Initializing 0
Ouiescent 1
Fast Recovery 2
Backup 3
Shutting Down 4
On-Line 5
Abort 6
Single User 7

Examples

onstat -l Output

IBM Informix Dynamic Server Version 10.00.UC1 -- On-Line -- Up 03:55:32 -- 15360 Kbytes

Physical Logging
Buffer bufused  bufsize  numpages numwrits pages/io
  P-1  0        16       716      55       13.02
      phybegin         physize  phypos   phyused  %used   
      1:263            500      270      0        0.00    

Logical Logging
Buffer bufused  bufsize  numrecs  numpages numwrits recs/pages pages/io
  L-3  0        16       42169    2872     1043     14.7       2.8     
        Subsystem    numrecs  Log Space used
        OLDRSAM      42169    4436496       

address  number   flags    uniqid   begin                size     used    %used
a517f70  1        U-B----  1        1:763                 500      500   100.00
a517fb0  2        U-B----  2        1:1263                500      500   100.00
a40daf0  3        U-B----  3        1:1763                500      500   100.00
a40db30  4        U-B----  4        1:2263                500      500   100.00
a40db70  5        U-B----  5        1:2763                500      500   100.00
a40dbb0  6        U---C-L  6        1:3263                500      372    74.40
a40dbf0  7        A------  0        1:3763                500        0     0.00
a40dc30  8        A------  0        1:4263                500        0     0.00
 8 active, 8 total
  • Buffer: Number of the physical-log buffer.
  • bufused: Number of pages of the physical-log buffer that are used.
  • bufsize: Size of each physical-log buffer in pages.
  • numpages: Is the number of pages written to the physical log
  • numwrits: Is the number of writes to disk
  • pages/io: Is calculated as numpages/numwrits. This value indicates how effectively physical-log writes are being buffered.
  • phybegin: Is the physical page number of the beginning of the log
  • physize: Is the size of the physical log in pages
  • phypos: Is the current position in the log where the next log-record write is to occur
  • phyused: Is the number of pages used in the log
  • %used: Is the percent of pages used.

The second section of the onstat -l display describes the logical-log configuration:

  • buffer:Is the number of the logical-log buffer
  • bufused: Is the number of pages used in the logical-log buffer
  • bufsize: Is the size of each logical-log buffer in pages
  • numrecs: Is the number of records written
  • numpages: Is the number of pages written
  • numwrits: Is the number of writes to the logical log
  • recs/pages: Is calculated as numrecs/numpages. You cannot affect this value. Different types of operations generate different types (and sizes) of records.
  • pages/io: Is calculated as numpages/numwrits. You can affect this value by changing the size of the logical-log buffer (specified as LOGBUFF in the ONCONFIG file) or by changing the logging mode of the database (from buffered to unbuffered, or vice versa).

The following fields are repeated for each logical-log file:

  • address: Is the address of the log-file descriptor
  • number: Is logid number for the logical-log file. The logid numbers might be out of sequence because either the database server or administrator can insert a log file in-line.
  • flags: Provides the status of each log as follows:
    • A: Newly added (and ready to use)
    • B: Backed up
    • C: Current logical-log file
    • D: Marked for deletion. To drop the log file and free its space for reuse, you must perform a level-0 backup of all storage spaces
    • F:Free, available for use
    • L: The most recent checkpoint record
    • U: Used
  • uniqid: Is the unique ID number of the log
  • begin: Is the beginning page of the log file
  • size: Is the size of the log in pages
  • used: Is the number of pages used
  • %used: Is the percent of pages used
  • active: Is the number of active logical logs
  • total:Is the total number of logical logs

The database server uses temporary logical logs during a warm restore because the permanent logs are not available then. The following fields are repeated for each temporary logical-log file:

  • address: Is the address of the log-file descriptor
  • number: Is logid number for the logical-log file
  • flags: Provides the status of each log as follows:
    • B: Backed up
    • C: Current logical-log file
    • F: Free, available for use
    • U: Used
  • uniqid: Is the unique ID number of the log
  • begin: Is the beginning page of the log file
  • size: Is the size of the log in pages
  • used: Is the number of pages used
  • %used: Is the percent of pages used
  • active: Is the number of active temporary logical logs

ONTAPE

ontape is a backup utility.

Usage:  ontape{ -a  | -c  | -l  | -p  | -r  [-D DBspace_list] | -s  [-L archive_level] 
        [-A database_list] [-B database_list] [-N database_list] [-U database_list]  }
        -a Automatic backup of logical logs
        -c  Continuous backup of logical logs
        -l  Logical restore
        -p  Physical restore for HDR
        -r  Full restore DBspaces/BLOBspaces as listed
        -s  Archive full system
        -A  Set the following database(s) to ansi logging
        -B  Set the following database(s) to buffered logging
        -N  Set the following database(s) to no logging
        -U  Set the following database(s) to unbuffered logging
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.