2007年6月30日土曜日

ulimit

KEYWORD:Solaris,ulimit
ulimit ユーティリティは、シェルとその子プロセスに課せられる書き込み時のファイルサイズの制限値を、設定または報告 。
-a オプションは制限値すべてを表示
(Tue Jun 26 16:51:59) root@blade1000:etc: ulimit -a
core file size (blocks) unlimited
data seg size (kbytes) unlimited
file size (blocks) unlimited
open files 256
pipe size (512 bytes) 10
stack size (kbytes) 8192
cpu time (seconds) unlimited
max user processes 29995
virtual memory (kbytes) unlimited

Solaris 9で、/etc/systemへの変更

KEYWORD:/etc/system,Solaris,sysdef
Solais 9
/etc/systemに変更を加えて、shutdown -i6 -g0 -y しても、sysdefの出力に反映されない


(Wed Jun 27 12:04:47) root@blade1000:etc: /usr/sbin/sysdef | grep SEM
10 semaphore identifiers (SEMMNI)
60 semaphores in system (SEMMNS)
30 undo structures in system (SEMMNU)
25 max semaphores per id (SEMMSL)
10 max operations per semop call (SEMOPM)
10 max undo entries per process (SEMUME)
32767 semaphore maximum value (SEMVMX)
16384 adjust on exit max value (SEMAEM)
(Wed Jun 27 12:05:00) root@blade1000:etc: /usr/sbin/sysdef | grep SHM
8388608 max shared memory segment size (SHMMAX)
100 shared memory identifiers (SHMMNI)
(Wed Jun 27 12:05:10) root@blade1000:etc:

{1} ok boot -r

SC Alert: Host System has Reset
Probing system devices
Probing memory
Probing I/O buses
screen not found.
keyboard not found.
Keyboard not present. Using ttya for input and output.
Probing system devices
Probing memory
Probing I/O buses

|
|

starting rpc services: rpcbind done.
Setting netmask of bge0 to 255.255.255.0
Setting default IPv4 interface for multicast: add net 224.0/4: gateway blade1000
syslog service starting.
volume management starting.
The system is ready.

blade1000 console login: root
Password:
Jun 27 13:15:17 blade1000 login: ROOT LOGIN /dev/console
Last login: Wed Jun 27 13:11:20 on console
Sun Microsystems Inc. SunOS 5.9 Generic May 2002
# sysdef | grep SHM
# sysdef | grep SEM
# exit

blade1000 console login:
$
ところが

(Wed Jun 27 15:20:12) root@blade1000:etc: diff -w system.20070627 system
93a94,106
>
> * ts:20070627 add
> * Oracle 10g + JP1/AJS2
> set noexec_user_stack=1
> set semsys:seminfo_semmni=110
> set semsys:seminfo_semmns=1034
> set semsys:seminfo_semmsl=256
> set semsys:seminfo_semvmx=32767
> set shmsys:shminfo_shmmax=4294967295
> set shmsys:shminfo_shmmni=110
> forceload: sys/shmsys
> forceload: sys/semsys
> forceload: sys/msgsys
(Wed Jun 27 15:20:19) root@blade1000:etc:
(Wed Jun 27 15:21:04) root@blade1000:etc: sysdef | grep SEM
110 semaphore identifiers (SEMMNI)
1034 semaphores in system (SEMMNS)
30 undo structures in system (SEMMNU)
256 max semaphores per id (SEMMSL)
10 max operations per semop call (SEMOPM)
10 max undo entries per process (SEMUME)
32767 semaphore maximum value (SEMVMX)
16384 adjust on exit max value (SEMAEM)
(Wed Jun 27 15:21:28) root@blade1000:etc: sysdef | grep SHM
4294967295 max shared memory segment size (SHMMAX)
110 shared memory identifiers (SHMMNI)
(Wed Jun 27 15:21:31) root@blade1000:etc:

カーネルモジュールは必要に応じてロードされるので、利用されない場合はロードされない。
sysdefの結果の意味は、まだロードされてないよーだった。
* IPC Messages module is not loaded
* IPC Semaphores module is not loaded
* IPC Shared Memory module is not loaded
手動でモジュールをロードするには、
# modload /kernel/sys/shmsys
# modload /kernel/sys/semsys
# modload /kernel/sys/msgsys
起動時に読み込んでしまうには、
/etc/systemに、
forceload: sys/shmsys
forceload: sys/semsys
forceload: sys/msgsys
する。