cpuset/doc/cset.txt

163 lines
5.6 KiB
Plaintext
Raw Normal View History

cset(1)
======
Alex Tsariounov <alext@novell.com>
v1.5.3, December 2010
NAME
----
cset - manage cpusets functions in the Linux kernel
SYNOPSIS
--------
[verse]
2009-12-08 04:52:22 +00:00
'cset' [--version | --help | --tohex]
'cset' [help <command> | <command> --help]
'cset' [cset options] <command> [command options] [args]
DESCRIPTION
-----------
NOTE: In general, you need to have root permissions to run cset. The
tool mounts the cpusets filesystem and manipulates it. Non-root users
do not have permission for these actions.
2009-12-08 04:55:02 +00:00
Cset is a Python application to make using the cpusets facilities in
the Linux kernel easier. The actual included command is called 'cset'
and it allows manipulation of cpusets on the system and provides
higher level functions such as implementation and control of a basic
cpu shielding setup.
2009-12-08 04:55:02 +00:00
Typical uses of cset include
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Setting up and managing a simple shielded CPU environment::
The concept of 'shielded' cpus is that a certain number of
cpus are partitioned off on the system and only processes that
are of interest are run on these cpus (i.e., inside the shield).
+
For a simple shielded configuration, one typically uses three cpusets:
the root set, a system set and a user set. 'Cset' includes a super
command that implements this strategy and lets you easily manage it.
2009-12-08 04:52:22 +00:00
See 'cset-shield(1)' for more details.
2009-12-08 04:53:31 +00:00
Setting up and managing a complex shielding environment::
Shielding can be more complex of course where concepts such as
priority cpusets and intersecting cpuset can be used. You can
use 'cset' to help manage this type of shielding as well. You
2009-12-08 04:52:22 +00:00
will need to use the 'cset-set(1)' and 'cset-proc(1)'
subcommands directly to do that.
Managing cpusets on the system::
2009-12-08 04:52:22 +00:00
The cset subcommand 'cset-set(1)' allows you to create and
destroy arbitrary cpusets on the system and assign arbitrary
cpus and memory nodes to them. The cpusets so created have to
2009-12-08 04:52:22 +00:00
follow the Linux kernel cpuset rules. See the 'cset-set(1)'
subcommand for more details.
Managing processes that run on various system cpusets::
2009-12-08 04:52:22 +00:00
The cset subcommand 'cset-proc(1)' allows you to manage
processes running on various cpusets created on the system.
You can exec new processes in specific cpusets and move tasks
2009-12-08 04:52:22 +00:00
around existing cpusets. See the 'cset-proc(1)' subcommand
for more details.
OPTIONS
-------
The following generic option flags are available. Additional options
are available per-command, and documented in the command-specific
documentation.
'cset' --version::
2009-12-08 04:52:22 +00:00
Display version information and exits.
'cset' --help::
Prints the synopsis and a list of all commands.
'cset' --log <filename>::
Creates a log file for the current run. All manner of useful
information is stored in this file. This is usually used to
2009-12-08 04:55:02 +00:00
debug cset when things don't go as planned.
2009-12-08 04:52:22 +00:00
'cset' --machine::
Makes cset output information for all operations in a format
that is machine readable (i.e. easy to parse).
'cset' --tohex <CPUSPEC>::
Converts a CPUSPEC (see 'cset-set(1)' for definition) to a
hexadecimal number and outputs it. Useful for setting IRQ
stub affinity to a cpuset definition.
2009-12-08 04:55:02 +00:00
CSET COMMANDS
-------------
The cset commands are divided into groups, according to the primary
purpose of those commands. Following is a short description of each
command. A more detailed description is available in individual
command manpages. Those manpages are named 'cset-<command>(1)'. The
first command, 'help', is especially useful as it prints out a long
summary of what a particular command does.
2009-12-08 04:52:22 +00:00
'cset help command'::
print out a lengthy summary of how the specified subcommand
works
'cset command --help'::
print out an extended synopsis of the specified subcommand
'cset shield'::
supercommand to set up and manage basic shielding (see
2009-12-08 04:52:22 +00:00
'cset-shield(1)')
'cset set'::
2009-12-08 04:52:22 +00:00
create, modify and destroy cpusets (see 'cset-set(1)')
'cset proc'::
create and manage processes within cpusets (see
2009-12-08 04:52:22 +00:00
'cset-proc(1)')
2009-12-08 04:55:02 +00:00
PERSISTENT CPUSETS
------------------
To create a persistent cpuset setup, i.e. one that survives a reboot,
you need to create the file '/etc/init.d/cset'. This distribuition of
cset includes an example cset init.d file found in
'/usr/share/doc/pacakges/cpuset' which is called 'cset.init.d'. You
will need to alter the file to your specifications and copy it to be
the file '/etc/init.d/cset'. See the comments in that file for more
details.
2009-12-08 04:52:22 +00:00
FILES
-----
2009-12-08 04:55:02 +00:00
If used, the init.d script '/etc/init.d/cset' starts and stops a
cpuset configuration on boot and poweroff.
2009-12-08 04:52:22 +00:00
Cpuset uses a configuration file if present on the system. The file
is '/etc/cset.conf' and may contain the following options.
mountpoint = <directory_name>::
Specify the mountpoint where the cpuset filesystem is to be
mounted. By default this is '/cpusets'; however, some people
prefer to mount this in the more traditional '/dev/cpusets'.
LICENSE
-------
Cpuset is licensed under the GNU GPL V2 only.
COPYRIGHT
---------
Copyright (c) 2008-2010 Novell Inc.
AUTHOR
------
2009-12-08 04:52:22 +00:00
Written by Alex Tsariounov <\alext@novell.com>
Some substrate code and ideas were taken from the excellent Stacked
2009-12-08 04:52:22 +00:00
GIT (stgit) v0.13 (see \http://gna.org/projects/stgit and
\http://www.procode.org/stgit). Stacked GIT is under GPL V2 or later.
SEE ALSO
--------
2009-12-08 04:52:22 +00:00
cset-set(1), cset-proc(1), cset-shield(1)
/usr/share/doc/packages/cpuset/html/tutorial.html
2009-12-08 04:55:02 +00:00
/usr/share/doc/packages/cpuset/cset.init.d
2009-12-08 04:52:22 +00:00
taskset(1), chrt(1)
/usr/src/linux/Documentation/cpusets.txt