(其中紅色字體爲手工輸入,藍色字體爲主要變化關注點。)
1、基本用法:
-bash-3.1$ onparams --
Usage: onparams { -a -d <DBspace> [-s <size>] [-i] } |
{ -b -g <pagesize> [-n <number of buffers>]
[-r <number of LRUs>] [-x <maxdirty>] [-m <mindirty>] } |
{ -d -l <log file number> [-y] } |
{ -p -s <size> [-d <DBspace>] [-y] }
-a - Add a logical log file
-b - Add a buffer pool
-i - Insert after current log
-d - Drop a logical log file
-p - Change physical log size and location
-y - Automatically responds "yes" to all prompts
若-s沒有指明大小,則取onconfig裏配置文件中指定大小。
2、實例:
-bash-3.1$ onparams -a -d rootdbs -s 10000
Log operation started. To monitor progress, use the onstat -l command.
Logical log successfully added.
-bash-3.1$ onstat -l
IBM Informix Dynamic Server Version 11.50.UC1DE -- On-Line -- Up 00:02:14 -- 93844 Kbytes
Physical Logging
。。。。。。(略)
Logical Logging
Buffer bufused bufsize numrecs numpages numwrits recs/pages pages/io
L-3 0 16 11501 1245 998 9.2 1.2
Subsystem numrecs Log Space used
OLDRSAM 11498 1202256
HA 3 132
address number flags uniqid begin size used %used
。。。。。。(略)
44e10758 10 A------ 0 1:91263 10000 0 0.00
46dedec8 11 A------ 0 1:110203 5000 0 0.00
11 active, 11 total
(其中size顯示爲5000,因爲其單位爲頁,而-s是KB。)
-bash-3.1$ onparams -d -l 11
WARNING: Dropping a logical log file.
Do you really want to continue? (y/n)y
Logical log 11 successfully dropped.
-bash-3.1$ onparams -p -d rootdbs -s 2000
Do you really want to change the physical log? (y/n)y
Log operation started. To monitor progress, use the onstat -l command.
** WARNING ** Because the physical log has been modified, a level 0 archive
must be taken of the following space before an incremental archive will be
permitted for it: rootdbs
(see Dynamic Server Administrator's manual)
-bash-3.1$ onstat -l
IBM Informix Dynamic Server Version 11.50.UC1DE -- On-Line -- Up 00:08:38 -- 93844 Kbytes
Physical Logging
Buffer bufused bufsize numpages numwrits pages/io
P-1 0 16 515 42 12.26
phybegin physize phypos phyused %used
1:263 1000 317 0 0.00
Logical Logging
。。。。。。(略)
3、轉換邏輯日誌:
-bash-3.1$ onstat -l
。。。。。。(略)
address number flags uniqid begin size used %used
44e104d0 1 U-B---- 1 1:1263 10000 10000 100.00
44e10518 2 U-B---- 2 1:11263 10000 10000 100.00
44e10560 3 U-B---- 3 1:21263 10000 10000 100.00
44e105a8 4 U---C-L 4 1:31263 10000 9741 97.41
44e105f0 5 A------ 0 1:41263 10000 0 0.00
。。。。。。(略)
10 active, 10 total
-bash-3.1$ onmode –l (將當前邏輯日誌文件換到下一個)
-bash-3.1$ onstat -l
。。。。。。(略)
address number flags uniqid begin size used %used
44e104d0 1 U-B---- 1 1:1263 10000 10000 100.00
44e10518 2 U-B---- 2 1:11263 10000 10000 100.00
44e10560 3 U-B---- 3 1:21263 10000 10000 100.00
44e105a8 4 U-B---L 4 1:31263 10000 9742 97.42
44e105f0 5 U---C-- 5 1:41263 10000 3 0.03
。。。。。。(略)
10 active, 10 total
-bash-3.1$ onmode –c (調整last checkpoint到當前邏輯日誌文件)
-bash-3.1$ onstat -l
。。。。。。(略)
address number flags uniqid begin size used %used
44e104d0 1 U-B---- 1 1:1263 10000 10000 100.00
44e10518 2 U-B---- 2 1:11263 10000 10000 100.00
44e10560 3 U-B---- 3 1:21263 10000 10000 100.00
44e105a8 4 U-B---- 4 1:31263 10000 9742 97.42
44e105f0 5 U---C-L 5 1:41263 10000 5 0.05
。。。。。。(略)
10 active, 10 total
(注,其中flags的意思如下。F: free,available for use; B: backed-up; C: currently receiving transactions; U: used; A: newly added; L: contains last completed checkpoint. )