From: Damir <lost404@gmail.com>
To: shaba@altlinux.ru,
ALT Linux Sisyphus discussions <sisyphus@lists.altlinux.org>
Subject: Re: [sisyphus] Патч, повышающий отзывчивость системы против .bashrc
Date: Fri, 19 Nov 2010 14:43:28 +0300
Message-ID: <AANLkTi=bU0ajyOZCO0pjxpdnBeE48V7O-VCGPeDNmcEL@mail.gmail.com> (raw)
In-Reply-To: <AANLkTikJVg6hQnS_Z3OmORUD5GU2VC=3x1sH9cC6jk2L@mail.gmail.com>
>>> [root@yarilo cgroup]# mkdir -p /sys/fs/cgroup/cpu
>>> mkdir: невозможно создать каталог <</sys/fs/cgroup/cpu>>: Нет такого файла или
>>> каталога
>>>
>>> Почему так происходит?
>> в /sys нельзя самостоятельно создавать директории, этим занимается ядро.
>> И ещё установите пакет cgroup и стартуйте сервис.
В пакете cgroup уже есть все для этого патча? :) Что-то не вижу.
Пришлось допиливать напильником.
Пока более-менее работающий вариант у меня получился такой:
# apt-get install cgroup
редактируется файл /etc/cgconfig.conf
В него добавляется строчки:
group user {
perm {
task {
uid = root;
gid = xgrp;
}
admin {
uid = root;
gid = xgrp;
}
}
cpu {
}
}
То есть патч включается для всех пользователей, входящих в группу xgrp.
# service cgconfig restart
# service cgred restart
# chkconfig cgconfig on
# chkconfig cgred on
Далее, создается файл /etc/profile.d/killer-feature.sh, с правами 755,
и содержимым:
if [ "$PS1" ] ; then
cgcreate -t "$USER:$USER" -a "$USER:$USER" -g "cpu:user/$USER/$$"
cgclassify -g "cpu:user/$USER/$$" $$
fi
После чего достаточно перелогиниться (или выполнить нижеприведенную
команду в шелле):
$ . /etc/profile.d/killer-feature.sh
Проверить, что патч работает, можно так:
$ cat /proc/self/cgroup
У меня вот выводит
7:net_cls:/
6:freezer:/
5:devices:/
4:memory:/
3:cpuacct:/
2:cpu:/user/damir/8834
1:cpuset:/
next prev parent reply other threads:[~2010-11-19 11:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-19 9:42 Sergei Naumov
2010-11-19 10:21 ` Alexey Shabalin
2010-11-19 10:27 ` Alexey Shabalin
2010-11-19 11:43 ` Damir [this message]
2010-11-19 13:05 ` diver
2010-11-19 13:43 ` Damir
2010-11-19 14:48 ` diver
2010-11-19 18:30 ` [sisyphus] =?koi8-r?b?8MHU3g==?=, " Sergei O. Naumov
2010-11-19 18:35 ` Sergei O. Naumov
2010-11-20 14:54 ` diver
2010-11-20 9:36 ` Sergei O. Naumov
2010-11-20 10:47 ` [sisyphus] Патч, " Alexey Borisenkov
2010-11-20 11:24 ` [sisyphus] =?koi8-r?b?8MHU3g==?=, " Sergei O. Naumov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTi=bU0ajyOZCO0pjxpdnBeE48V7O-VCGPeDNmcEL@mail.gmail.com' \
--to=lost404@gmail.com \
--cc=shaba@altlinux.ru \
--cc=sisyphus@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Sisyphus discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
public-inbox-index sisyphus
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sisyphus
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git