[转载]HP-UX内核参数调整过程

内核配置的命令
kcmodule:显示、调整系统内核模块
kctune:显示、修改内核参数
kcweb:内核配置的web工具(系统内含mozilla浏览器),可用于系统资源监控(内核参数运行值)
kcpath:显示当前内核的路径
kclog:查找内核配置日志文件(/var/adm/kc.log是内核配置改变的记录缺省日志文件)

显示每个module及描述
# kcmodule -d
Module State Cause
LCentIf static best
state类型:
unused: The module is installed on the system but not in use.
static: The module will be statically bound into the kernel executable.
loaded: The module will be dynamically loaded into the kernel during the boot process.
auto :The module will be dynamically loaded into the kernel when it is first needed after each boot.
cause类型:
explicit: The system administrator explicitly chose the state.
best: The system administrator chose to use the module, but didn’t choose a specific state, so the module is in its “best”
state: as determined by the module developer.
auto: The module was in auto state, and was automatically loaded when something tried to use it.
required: The module was marked required by its developer.
depend: The module is in use because some other module in the configuration depends on it.
加载一个module
# kcmodule cdfs=loaded
卸载一个module
kcmodule cdfs=unused

显示每个内核参数及描述:
# kctune -d
修改参数值
# kctune nproc=4300
修改参数值为缺省值
# kctune nproc=
# kctune nproc=default

每次对内核配置都保存在/stand/system文件中,同时在/stand/backup目录下产生一个备份。

内核配置修改步骤:
1、用kcmodule、kctune修改模块和参数(或者直接修改system文件)
2、根据system文件,用mk_kernel命令编译出新的内核
#mk_kernel -o /stand/vmunix~~将编译出的内核代替当前的内核,下次启动将生效
#mk_kernel -o k20060908~~将编译一个新的内核放在k20060908目录下,如果要生效,在下次启动时,将启动的内核指到该目录下即可。
用kconfig -D命令可显示下次启动是否有内核参数修改。

猜你喜欢

转载自xmeteor.iteye.com/blog/893901