- 论坛徽章:
- 0
|
onconfig 配置:
# Root Dbspace Configuration
ROOTNAME rootdbs # Root dbspace name
ROOTPATH /opt/informix/dbs/rootdbs
# Path for device containing root dbspace
ROOTOFFSET 50 # Offset of root dbspace into device (Kbytes)
ROOTSIZE 2000000 # Size of root dbspace (Kbytes)
# System Configuration
SERVERNUM 0 # Unique id corresponding to a Dynamic Server instance
DBSERVERNAME iin_sct # Name of default database server
DBSERVERALIASES iin_sct_net # List of alternate dbservernames
NETTYPE ipcshm,1,20,CPU # Configure poll thread(s) for nettype
NETTYPE tlitcp,1,20,NET # Configure poll thread(s) for nettype
#NETTYPE soctcp,2,8,NET # Configure poll thread(s) for nettype
DEADLOCK_TIMEOUT 60 # Max time to wait of lock in distributed env.
RESIDENT 0 # Forced residency flag (Yes = 1, No = 0)
MULTIPROCESSOR 0 # 0 for single-processor, 1 for multi-processor
NUMCPUVPS 20 # Number of user (cpu) vps
SINGLE_CPU_VP 0 # If non-zero, limit number of cpu vps to one
NOAGE 0 # Process aging
AFF_SPROC 0 # Affinity start processor
AFF_NPROCS 0 # Affinity number of processors
# Shared Memory Parameters
LOCKS 50000 # Maximum number of locks
BUFFERS 100000 # Maximum number of shared buffers
NUMAIOVPS 2 # Number of IO vps
PHYSBUFF 32 # Physical log buffer size (Kbytes)
LOGBUFF 32 # Logical log buffer size (Kbytes)
LOGSMAX 6 # Maximum number of logical log files
CLEANERS 1 # Number of buffer cleaner processes
SHMBASE 0x0 # Shared memory base address
SHMVIRTSIZE 8000 # initial virtual shared memory segment size
SHMADD 8192 # Size of new shared memory segments (Kbytes)
SHMTOTAL 0 # Total shared memory (Kbytes). 0=>unlimited
CKPTINTVL 0 # Check point interval (in sec)
LRUS 8 # Number of LRU queues
LRU_MAX_DIRTY 60 # LRU percent dirty begin cleaning limit
LRU_MIN_DIRTY 50 # LRU percent dirty end cleaning limit
LTXHWM 50 # Long transaction high water mark percentage
LTXEHWM 60 # Long transaction high water mark (exclusive)
TXTIMEOUT 0x12c # Transaction timeout (in sec)
STACKSIZE 32 # Stack size (Kbytes)
sqlhosts配置:
#demo_on onipcshm on_hostname on_servername
#demo_se seipcpip se_hostname sqlexec
iin_sct onipcshm sct sqlexec
iin_sct_net ontlitcp sct sqlexec_net
#iin_sct onipcshm sct sqlexec
#iin_sct_net onsoctcp sct sqlexec_net
/etc/services配置:
sqlexec 9001/tcp # informix port iin_sct
sqlexec_net 9002/tcp # informix port iin_sct_net
如果按以上配置执行oninit -ivy
则出现:<11 /opt/informix/etc >oninit -ivy
Checking group membership to determine server run modesucceeded
Reading configuration file '/opt/informix/etc/onconfig'...succeeded
Creating /INFORMIXTMP/.infxdirs ... succeeded
Creating infos file "/opt/informix/etc/.infos.iin_sct" ... "/opt/informix/etc/.conf.iin_sct" ... succeeded
Writing to infos file ... succeeded
Checking config parameters...succeeded
Allocating and attaching to shared memory...FAILED
oninit: Fatal error in shared memory creation
如果将onconfig 文件中的值改为:SERVERNUM 2
则出现:<14 /opt/informix/etc >oninit -ivy
Checking group membership to determine server run modesucceeded
Reading configuration file '/opt/informix/etc/onconfig'...succeeded
Creating /INFORMIXTMP/.infxdirs ... succeeded
Creating infos file "/opt/informix/etc/.infos.iin_sct" ... "/opt/informix/etc/.conf.iin_sct" ... succeeded
Writing to infos file ... succeeded
Checking config parameters...succeeded
Allocating and attaching to shared memory...succeeded
Creating resident pool 14450 kbytes...succeeded
Creating buffer pool 200002 kbytes...succeeded
Initializing rhead structure...succeeded
Initializing ASF ...succeeded
Initializing Dictionary Cache and Stored Procedure Cache...succeeded
Bringing up ADM VP...succeeded
Creating VP classes...succeeded
Onlining 19 additional cpu vps...succeeded
Onlining 2 IO vps...succeeded
Forking main_loop thread...succeeded
Initialzing DR structures...succeeded
Forking 1 'ipcshm' listener threads...succeeded
Forking 1 'tlitcp' listener threads...succeeded
Starting tracing...succeeded
Initializing 1 flushers...succeeded
Initializing log/checkpoint information...<15 /opt/informix/etc >
再执行:oninit 没有报错,再执行 nstat 时出现:
<16 /opt/informix/etc >oninit
<17 /opt/informix/etc >onstat
shared memory not initialized for INFORMIXSERVER 'iin_sct_net'
<18 /opt/informix/etc >
请问这是怎么回事?呵呵,以下是online.log文件内容:
Thu Aug 2 09:05:55 2007
09:05:55 Event alarms enabled. ALARMPROG = '/opt/informix/etc/log_full.sh'
09:06:02 DR: DRAUTO is 0 (Off)
09:06:02 Informix Dynamic Server Version 7.31.UD6W5 Software Serial Number AAC#J880135
09:06:02 Informix Dynamic Server Initialized -- Shared Memory Initialized.
09:06:02 Physical Recovery Started.
09:06:02 Physical Recovery Complete: 0 Pages Restored.
09:06:02 Logical Recovery Started.
09:06:02 listener-thread: err = -25572: oserr = 0: errstr = : Network driver cannot bind a name to the port.
09:06:02 Attempting to bring listener thread down.
09:06:02 Server stopped.
09:06:02 Informix Dynamic Server Stopped.
09:06:02 mt_shm_remove: WARNING: may not have removed all/correct segments
09:07:28 shmget: [EEXIST][17]: key 52564801: shared memory already exists
09:07:28 mt_shm_init: can't create resident segment
Thu Aug 2 09:10:38 2007
09:10:38 Event alarms enabled. ALARMPROG = '/opt/informix/etc/log_full.sh'
09:10:45 DR: DRAUTO is 0 (Off)
09:10:45 Informix Dynamic Server Version 7.31.UD6W5 Software Serial Number AAC#J880135
09:10:45 Informix Dynamic Server Initialized -- Shared Memory Initialized.
09:10:45 Physical Recovery Started.
09:10:45 Physical Recovery Complete: 0 Pages Restored.
09:10:45 Logical Recovery Started.
09:10:48 Logical Recovery Complete.
0 Committed, 0 Rolled Back, 0 Open, 0 Bad Locks
09:10:49 Onconfig parameter DBSERVERNAME modified from iin_sct_net to iin_sct.
09:10:49 Onconfig parameter LOCKS modified from 100000 to 50000.
09:10:49 Onconfig parameter BUFFERS modified from 60000 to 100000.
09:10:49 Onconfig parameter SHMBASE modified from -2147483648 to 0.
09:10:49 Dataskip is now OFF for all dbspaces
09:10:49 On-Line Mode
09:10:49 Building 'sysmaster' database ...
09:10:49 Checkpoint Completed: duration was 0 seconds.
09:10:49 Checkpoint loguniq 1, logpos 0x6018
09:10:50 Error building 'sysmaster' database.
09:10:50 See '/tmp/buildsmi.290'.
09:11:18 Checkpoint Completed: duration was 0 seconds.
09:11:18 Checkpoint loguniq 1, logpos 0x7018
09:49:03 shmget: [EEXIST][17]: key 52564801: shared memory already exists
09:49:03 mt_shm_init: can't create resident segment
Thu Aug 2 09:50:54 2007
09:50:54 Event alarms enabled. ALARMPROG = '/opt/informix/etc/log_full.sh'
09:51:01 DR: DRAUTO is 0 (Off)
09:51:01 Informix Dynamic Server Version 7.31.UD6W5 Software Serial Number AAC#J880135
09:51:01 listener-thread: err = -25572: oserr = 0: errstr = : Network driver cannot bind a name to the port.
09:51:01 Attempting to bring listener thread down.
09:51:01 Server stopped.
09:51:01 Informix Dynamic Server Stopped.
09:51:01 mt_shm_remove: WARNING: may not have removed all/correct segments
Thu Aug 2 09:51:36 2007
09:51:36 Event alarms enabled. ALARMPROG = '/opt/informix/etc/log_full.sh'
09:51:44 DR: DRAUTO is 0 (Off)
09:51:44 Informix Dynamic Server Version 7.31.UD6W5 Software Serial Number AAC#J880135
09:51:44 Informix Dynamic Server Initialized -- Shared Memory Initialized.
09:51:44 Physical Recovery Started.
09:51:44 Physical Recovery Complete: 0 Pages Restored.
09:51:44 Logical Recovery Started.
09:51:44 listener-thread: err = -25572: oserr = 0: errstr = : Network driver cannot bind a name to the port.
09:51:44 Attempting to bring listener thread down.
09:51:44 Server stopped.
09:51:44 Informix Dynamic Server Stopped.
09:51:44 mt_shm_remove: WARNING: may not have removed all/correct segments |
|