文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>The Official Red Hat Linux Reference Guide-/proc-4

The Official Red Hat Linux Reference Guide-/proc-4

时间:2007-03-31  来源:zhangzijian

原文:http://www.redhat.com/docs/manuals/linux/RHL-7.3-Manual/ref-guide/s1-proc-sysctl.html

Using sysctl

The sysctl command is used to view, set, and automated kernel settings in the /proc/sys/ directory.

To get a quick overview of all settings configurable in the /proc/sys/ directory, type the sysctl -a command as root. This will create a large, comprehensive list, a small portion of which looks something like this:

net.ipv4.route.min_delay = 2 kernel.sysrq = 0 kernel.sem = 250 32000 32 128

This is the same basic information you would see if you viewed each of the files individually. The only difference is the file location. The /proc/sys/net/ipv4/route/min_delay file is signified by net.ipv4.route.min_delay, with the directory slashes replaced by dots and the proc.sys portion assumed.

The sysctl command can be use in place of echo to assign values to writable files in the /proc/sys/ directory. For instance instead of using this command:

echo 1 > /proc/sys/kernel/sysrq

You can use this sysctl command:

sysctl -w kernel.sysrq="1" kernel.sysrq = 1

While quickly setting single values like this in /proc/sys/ is helpful during testing, it does not work as well on a production system, as all /proc/sys/ special settings are lost when the machine is rebooted. To preserve the settings that you like to make permanently to your kernel, add them to the /etc/sysctl.conf file.

Every time the system boots, the /etc/rc.d/rc.sysinit script is executed by init. This script contains a command to execute sysctl using /etc/sysctl.conf as the values to set. Therefore, any values added to /etc/sysctl.conf will take effect after the system boots.

相关阅读 更多 +
排行榜 更多 +
暗夜格斗手游

暗夜格斗手游

棋牌卡牌 下载
魔渊之刃手游

魔渊之刃手游

角色扮演 下载
像素火影次世代手游版

像素火影次世代手游版

体育竞技 下载