//----------------------------------------------------------
sysctl 對於系統調整來說是個很方便的指令。

利用 -a 列出所有可以調整的項目。

利用 -w 重新設定,但是"等號"旁不可以有空格。
//----------------------------------------------------------
sysctl - get or set kernel state

透過 sysctl 設定某kernel state變數值,設定檔 /etc/sysctl.conf

# sysctl --help
語法:
Usage: sysctl [OPTIONS] [KEY[=VALUE]]...

Show/set kernel parameters
參數:
    -e    Don't warn about unknown keys(用=分隔,變數名稱及變數值。預設分隔為:)
    -n    Don't show key names(只顯示變數值,不顯示變數名稱)
    -a    Show all values(顯示目前的sysctl設定值)
    -w    Set values
    -p FILE    Set values from FILE (default /etc/sysctl.conf)
    -q      Set values silently
//----------------------------------------------------------

default kernel.printk = 7 4 1 7

The four values in printk denote:
(1)console_loglevel
(2)default_message_loglevel
(3)minimum_console_loglevel
(4)default_console_loglevel respectively

These values influence printk() behavior when printing or logging error messages。
See man 2 syslog for more info on the different loglevels.

console_loglevel: messages with a higher priority than this will be printed to the console
default_message_loglevel: messages without an explicit priority will be printed with this priority
minimum_console_loglevel: minimum (highest) value to which console_loglevel can be set
default_console_loglevel: default value for console_loglevel

arrow
arrow
    全站熱搜

    BB 發表在 痞客邦 留言(0) 人氣()