Вопрос: sysctl.conf

12
pupseg
На сайте с 14.05.2010
Offline
364
#11
Vin_cent:
Команда sysctl -p, его назад не вернёт. Только ребут.

yum -y reinstall initscripts

а эта вернет в дефолтный от инсталляхи?

речь же не про значения , которые ТС когда то делал и забыл.

он хочет вернуть в дефолтное-дефолтное

---------- Добавлено 22.11.2014 в 12:43 ----------

lonelywoolf:
Умиляют такие заявления. glibc не обновляем, да? В данном случае sysctl не вернет значения по дефолту, а вернет только те, что в дефолтном sysctl. странно, да?
Так же перезагрузка требуется при обновлении некоторых модулей ядра. В ядре есть пачка багов, из-за которых долгий аптайм невозможен во многих случаях. Например, не со всяким железом нормально отрабатывают suspend/hibernate, после высокой дисковой активности на некоторых конфигурациях с некоторыми ядрами возможно выпадение в корку некоторого софта... Описывать можно много и долго.

---------- Добавлено 22.11.2014 в 15:04 ----------


О. Вот этот сервер - полльзуетесь kexec или тупо забили на обновления?

RHEL + Oracle RAC intel xeon. очень высоконагруженные задачи финансового плана, работающие 24\7.

простой в час - прямые много милионные финансовые убытки 6 млн клиентов.

аппаратный кластер не перезагружал года три ....

#И конечно, очень интересно было узнать про uptime твоих серверов (скажи спасибо датацентру)# - среднее по больнице - от 100 до 150 дней.

есть с десяток по нескольку лет.

Качественная помощь в обслуживании серверов. (/ru/forum/661100) Бесплатных консультаций не даю, не помогаю, не обучаю. Минималка от 100$. Как пропатчить KDE-просьба не спрашивать. Есть форумы (http://linux.org.ru) и полезные сайты (http://www.opennet.ru/).
Vin_cent
На сайте с 22.01.2010
Offline
171
#12

>>yum -y reinstall initscripts

>>а эта вернет в дефолтный от инсталляхи?

Ещё раз - НЕТ.

pupseg
На сайте с 14.05.2010
Offline
364
#13

а я вернул. как так вышло?

[root@node-n12 ~]# cat /etc/sysctl.conf | wc -l

40
[root@node-n12 ~]# du -bs /etc/sysctl.conf
1150 /etc/sysctl.conf
[root@node-n12 ~]# mv /etc/sysctl.conf /etc/sysctl.conf.old
[root@node-n12 ~]# ls -al /etc/sysctl.conf
ls: cannot access /etc/sysctl.conf: No such file or directory
[root@node-n12 ~]# yum reinstall -y initscripts
Loaded plugins: fastestmirror
Setting up Reinstall Process
Determining fastest mirrors
epel/metalink | 41 kB 00:00
* base: mirror.nsc.liu.se
* epel: mirror.imt-systems.com
* extras: centosg4.centos.org
* rpmforge: mirror1.hs-esslingen.de
* updates: centosr4.centos.org
http://centos.alt.ru/repository/centos/6/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 403 Forbidden"
Trying other mirror.
base | 3.7 kB 00:00
base/primary_db | 4.6 MB 00:00
epel | 4.4 kB 00:00
epel/primary_db | 6.4 MB 00:00
extras | 3.4 kB 00:00
extras/primary_db | 29 kB 00:00
rpmforge | 1.9 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 888 kB 00:00
Installed package initscripts-9.03.38-1.el6.centos.2.x86_64 (from updates) not available.
Error: Nothing to do
[root@node-n12 ~]# yum update initscripts
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.nsc.liu.se
* epel: mirror.imt-systems.com
* extras: centosg4.centos.org
* rpmforge: mirror1.hs-esslingen.de
* updates: centosr4.centos.org
http://centos.alt.ru/repository/centos/6/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 403 Forbidden"
Trying other mirror.
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package initscripts.x86_64 0:9.03.38-1.el6.centos.2 will be updated
---> Package initscripts.x86_64 0:9.03.46-1.el6.centos.1 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Updating:
initscripts x86_64 9.03.46-1.el6.centos.1 updates 943 k

Transaction Summary
================================================================================
Upgrade 1 Package(s)

Total download size: 943 k
Is this ok [y/N]: y
Downloading Packages:
initscripts-9.03.46-1.el6.centos.1.x86_64.rpm | 943 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : initscripts-9.03.46-1.el6.centos.1.x86_64 1/2
Cleanup : initscripts-9.03.38-1.el6.centos.2.x86_64 2/2
Verifying : initscripts-9.03.46-1.el6.centos.1.x86_64 1/2
Verifying : initscripts-9.03.38-1.el6.centos.2.x86_64 2/2

Updated:
initscripts.x86_64 0:9.03.46-1.el6.centos.1

Complete!
[root@node-n12 ~]# ls -al /etc/sysctl.conf
-rw-r--r-- 1 root root 1150 Nov 4 15:17 /etc/sysctl.conf
[root@node-n12 ~]# du -bs /etc/sysctl.conf
1150 /etc/sysctl.conf
[root@node-n12 ~]#
lonelywoolf
На сайте с 23.12.2013
Offline
151
#14

pupseg, файл вернет, а измененный конфиг ядра - нет.

Конфиги я не трогал. Дефолтные. Вот вывод с консоли:

[root@localhost woolf]# cat /etc/sysctl.conf
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
[root@localhost woolf]# cat /etc/sysctl.d/*
vm.swappiness = 1
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
[root@localhost woolf]# cat /run/sysctl.d/*
cat: /run/sysctl.d/*: Нет такого файла или каталога
[root@localhost woolf]# cat /usr/lib/sysctl.d/*
# Kernel sysctl configuration file

# Controls the maximum shared segment size, in bytes
kernel.shmmax = 4294967295

# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 268435456# Disable netfilter on bridges.
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.

# See sysctl.d(5) for the description of the files in this directory,
# and systemd-coredump(8) and core(5) for the explanation of the
# setting below.

kernel.core_pattern=|/usr/lib/systemd/systemd-coredump %p %u %g %s %t %e
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.

# See sysctl.d(5) and core(5) for for details.

# System Request functionality of the kernel (SYNC)
kernel.sysrq = 16

# Append the PID to the core filename
kernel.core_uses_pid = 1

# Source route verification
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1

# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.all.accept_source_route = 0

# Promote secondary addresses when the primary address is removed
net.ipv4.conf.default.promote_secondaries = 1
net.ipv4.conf.all.promote_secondaries = 1

# Enable hard and soft link protection
fs.protected_hardlinks = 1
fs.protected_symlinks = 1
fs.inotify.max_user_watches = 524288
# The kernel allocates aio memory on demand, and this number limits the
# number of parallel aio requests; the only drawback of a larger limit is
# that a malicious guest could issue parallel requests to cause the kernel
# to set aside memory. Set this number at least as large as
# 128 * (number of virtual disks on the host)
# Libvirt uses a default of 1M requests to allow 8k disks, with at most
# 64M of kernel memory if all disks hit an aio request at the same time.
fs.aio-max-nr = 1048576
[root@localhost woolf]# sysctl -a | grep vm.dirty_ratio
vm.dirty_ratio = 20
[root@localhost woolf]# sysctl vm.dirty_ratio=40
vm.dirty_ratio = 40
[root@localhost woolf]# sysctl -p
[root@localhost woolf]# sysctl -a | grep vm.dirty_ratio
vm.dirty_ratio = 40
[root@localhost woolf]#



---------- Добавлено 23.11.2014 в 01:04 ----------

Как мы видим, если параметра в конфиге нет, он в дефолт не скинется. Об этом Вам тут толкуют...

Стер обидные слова от греха по дальше, ибо зря я.

Платный и бесплатный хостинг с защитой от DDoS (http://aquinas.su)
12

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий