pool for zone:
# pooladm -s
# pooladm
pooladm: couldn't open pools state file: Facility is not active
# pooladm -e
svcadm: Instance "svc:/system/pools:default" is in maintenance state.
pooladm: cannot enable pools: Error 0
# svcs -xv
svc:/system/pools:default (resource pools framework)
State: maintenance since November 28, 2008 2:57:30 PM CST
Reason: Start method exited with $SMF_EXIT_ERR_CONFIG.
See:
See: man -M /usr/share/man -s 3LIB libpool
See: man -M /usr/share/man -s 1M pooladm
See: man -M /usr/share/man -s 1M poolbind
See: man -M /usr/share/man -s 1M poolcfg
See: man -M /usr/share/man -s 1M poolstat
See: /var/svc/log/system-pools:default.log
Impact: This service is not running.
#
Solution:
1. start poold manually:
# /usr/lib/pool/poold
# pgrep -l poold
1333 poold
# poolcfg -c 'create pset pset_web_zone' %don't assign pset.min/max
# poolcfg -c 'create pool pool_web_zone'
# poolcfg -c 'associate pool pool_web_zone(pset pset_web_zone)'
# pooladm -c
# psrset
Allocate memory for zone:
# pkg install SUNWrcap
# rcapadm -E
# ps -ef | grep rcapd
# cp /etc/nsswitch.files /etc/nsswitch.conf
# projmod -K 'rcap.max-rss=4000000000' system
# cat /etc/project
# rcapadm
# rcapadm -c 50
# rcapadm
# rcapstat -g
启用池功能:
# svcadm enable system/pools:default
or
# pooladm -e
禁用:
# svcadm disable system/pools:default
or
# pooladm -e
查看:
# svcs -a | grep pools
online 15:12:55 svc:/system/pools:default
online 15:12:55 svc:/system/pools/dynamic:default
更新池静态配置文件(/etc/pooladm.conf):
# pooladm -s
查看配置文件内容:
# poolcfg -c info
提交/etc/pooladm.conf的内容:
# pooladm -c
备份配置文件的内容:
# pooladm -s /tmp/pooladm.conf.bak
创建处理器集:
# poolcfg -c 'create pset pset_name (uint pset.min=2; uint pset.max=4)'
创建池:
# poolcfg -c 'create pool pool_name'
使用关联连接池和处理器集:
# poolcfg -c 'associate pool pool_name (pset pset_name)'
显示更改:
# poolcfg -c info
将池与调度类关联:
# poolcfg -c 'modify pool pool_name (string pool.scheduler="FSS")'
修改cpu.pinned属性:
# poolcfg -c 'modify cpu (boolean cpu.pinned=true)' % 也修改配置文件
# poolcfg -dc 'modify cpu (boolean cpu.pinned=true)' % 不修改配置文件, 动态生效
配置poold日志级别:
# /usr/lib/pool/poold -l INFO % 缺省级别为NOTICE
将2个CPU从pset1移到pset2:
# poolcfg -dc 'transfer 2 from pset pset1 to pset2' or
# poolcfg -dc "transfer to pset pset_large (cpu 0; cpu 2)"
删除当前活动的池配置:
# pooladm -x % 所有资源恢复到缺省状态
将项目A中的所有进程绑定到poolA池:
# poolbind -i project -p poolA A
或通过设置项目A的project.pool属性完成同样的目的:
# projmod -a -K project.pool=poolA A
在项目A中启动进程:
# newtask -l -p A
验证池绑定:
# poolbind -q $$
报告与池有关的资源统计信息:
# poolstat
# poolstat 5 3 % 5秒间隔抽样生成3个报告
# poolstat -r pset % 报告cpu资源集的统计信息
阅读(1178) | 评论(0) | 转发(0) |