Performance Tuning for Linux Servers [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Performance Tuning for Linux Servers [Electronic resources] - نسخه متنی

Sandra K. Johnson

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید






The sysctl Interface


The sysctl interface lets you configure kernel parameters at runtime. sysctl lists kernel parameters, modifies the parameters temporarily through the command-line interface, loads the settings from a file, or modifies the kernel parameters permanently by adding in a configuration file for loading at boot time.

The parameters are organized in a hierarchical, or tree, structure. For example, all the parameters related to devices start with dev. The parameters for a specific device, such as cdrom, are under dev.cdrom.

By default, kernel support for sysctl is enabled. To enable sysctl support when building a new kernel, use menuconfig, choose General Setup from the main menu, and select sysctl support. Alternatively, you can edit the configuration file to set the CONFIG_ SYSCTL option.

Using sysctl


The sysctl command usually resides in the /sbin directory. You can view the complete list of tunable parameters and their settings by executing the sysctl a command. To set a specific parameter, use the w option. For example, the following command sets the message queue identifiers to 32:


$ sysctl w kernel.shmmax=32

Note that this change is temporary and does not persist across system reboots.

To make a change that will persist across reboots, use the p option to load a set of values from a configuration file. In the following example, the values from the configuration file /etc/sysctl.conf are loaded:


$ sysctl p /etc/sysctl.conf

For more information on different usage options, refer to the sysctl(8) man page.






The sysctl Interface


The sysctl interface lets you configure kernel parameters at runtime. sysctl lists kernel parameters, modifies the parameters temporarily through the command-line interface, loads the settings from a file, or modifies the kernel parameters permanently by adding in a configuration file for loading at boot time.

The parameters are organized in a hierarchical, or tree, structure. For example, all the parameters related to devices start with dev. The parameters for a specific device, such as cdrom, are under dev.cdrom.

By default, kernel support for sysctl is enabled. To enable sysctl support when building a new kernel, use menuconfig, choose General Setup from the main menu, and select sysctl support. Alternatively, you can edit the configuration file to set the CONFIG_ SYSCTL option.

Using sysctl


The sysctl command usually resides in the /sbin directory. You can view the complete list of tunable parameters and their settings by executing the sysctl a command. To set a specific parameter, use the w option. For example, the following command sets the message queue identifiers to 32:


$ sysctl w kernel.shmmax=32

Note that this change is temporary and does not persist across system reboots.

To make a change that will persist across reboots, use the p option to load a set of values from a configuration file. In the following example, the values from the configuration file /etc/sysctl.conf are loaded:


$ sysctl p /etc/sysctl.conf

For more information on different usage options, refer to the sysctl(8) man page.


/ 227