Added README.Fedora to describe initscript integration
This commit is contained in:
parent
3800869a3e
commit
fb2b381355
35
README.Fedora
Normal file
35
README.Fedora
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
Libcgroup integration into Fedora
|
||||||
|
=================================
|
||||||
|
|
||||||
|
Apart from standard libcgroup features, Fedora adds support for starting system
|
||||||
|
services in given control group(s).
|
||||||
|
|
||||||
|
If a service init script
|
||||||
|
1) uses daemon() function from /etc/init.d/functions to start the service
|
||||||
|
2) and uses /etc/sysconfig/<service name> for its configuration,
|
||||||
|
you can add CGROUP_DAEMON="<space separated list of groups>" to the
|
||||||
|
/etc/sysconfig/<service name> to start the service in given group.
|
||||||
|
|
||||||
|
|
||||||
|
Example
|
||||||
|
-------
|
||||||
|
How to start Apache web server in group cpu,cpuacct:/daemons/http:
|
||||||
|
1. Configure your group in /etc/cgconfig.conf (see cgconfig.conf man page).
|
||||||
|
2. Add following line to /etc/sysconfig/httpd:
|
||||||
|
CGROUP_DAEMON="cpu,cpuacct:/daemons/http"
|
||||||
|
|
||||||
|
During next boot (or after restart of cgconfig and httpd services), your http
|
||||||
|
daemon and all its children should be started in the given groups.
|
||||||
|
|
||||||
|
|
||||||
|
Details
|
||||||
|
-------
|
||||||
|
The daemon() function in /etc/init.d/functions was modified to start the daemon
|
||||||
|
in control group(s) specified by CGROUP_DAEMON environment variable. Therefore it
|
||||||
|
won't work on all services, but only those which satisfy the two aforementioned
|
||||||
|
conditions.
|
||||||
|
|
||||||
|
CGROUP_DAEMON can contain more than one control group, separate them with space
|
||||||
|
then:
|
||||||
|
CGROUP_DAEMON="cpu:/daemons/http cpuacct:/daemons"
|
||||||
|
|
@ -4,10 +4,11 @@ Name: libcgroup
|
|||||||
Summary: Tools and libraries to control and monitor control groups
|
Summary: Tools and libraries to control and monitor control groups
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Version: 0.34
|
Version: 0.34
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: http://libcg.sourceforge.net/
|
URL: http://libcg.sourceforge.net/
|
||||||
Source0: http://downloads.sourceforge.net/libcg/%{name}-%{version}.tar.bz2
|
Source0: http://downloads.sourceforge.net/libcg/%{name}-%{version}.tar.bz2
|
||||||
|
Source1: README.Fedora
|
||||||
Patch0: fedora-fix-initscripts.patch
|
Patch0: fedora-fix-initscripts.patch
|
||||||
Patch1: fedora-workaround-for-sysdefault.patch
|
Patch1: fedora-workaround-for-sysdefault.patch
|
||||||
Patch2: fedora-config.patch
|
Patch2: fedora-config.patch
|
||||||
@ -121,6 +122,9 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jan 18 2010 Jan Safranek <jsafrane@redhat.com> 0.34-4
|
||||||
|
- Added README.Fedora to describe initscript integration
|
||||||
|
|
||||||
* Mon Oct 19 2009 Jan Safranek <jsafrane@redhat.com> 0.34-3
|
* Mon Oct 19 2009 Jan Safranek <jsafrane@redhat.com> 0.34-3
|
||||||
- Change the default configuration to mount everything to /cgroup
|
- Change the default configuration to mount everything to /cgroup
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user