parent
a2e80c6ca6
commit
370b2333ed
@ -1,3 +1,3 @@
|
||||
include README Makefile MANIFEST MANIFEST.in AUTHORS COPYING INSTALL ChangeLog TODO
|
||||
include README Makefile MANIFEST MANIFEST.in AUTHORS COPYING INSTALL NEWS ChangeLog TODO
|
||||
include t/README
|
||||
include doc/*.txt doc/Makefile doc/*.conf doc/callouts.xsl doc/*.1 doc/*.html
|
||||
|
@ -0,0 +1,79 @@
|
||||
============================================================
|
||||
|
||||
Cpuset 1.5.0 (February 7, 2009)
|
||||
https://forgesvn1.novell.com/svn/cpuset/tags/rel_1.5.0
|
||||
http://download.opensuse.org/repositories/home:/tsariounov:/cpuset/
|
||||
|
||||
Major upgrade since 1.04. This release includes a number of bug fixes and
|
||||
enhancements as outlined below. The release number also has transitioned to a
|
||||
three-digit number. This release has many usability enhancements from the
|
||||
past months experience. It also includes a lengthy tutorial to introduce
|
||||
users to the tool.
|
||||
|
||||
The bug numbers refer to cpuset's bugzilla instance which can be found
|
||||
here: http://devzilla.novell.com/cpuset
|
||||
|
||||
Fixed Bugs:
|
||||
* Fix bug #1: Origination cpuset not accepted for process move...
|
||||
* Fix bug #2: Proc move from set to set does not recognize...
|
||||
* Fix bug #3: Interspersed arguments do not work
|
||||
* Fix bug #4: Add policy and priority to proc output list
|
||||
* Fix bug #5: Add ability to move all threads in a process container wi.
|
||||
* Fix bug #6: The -a option for set listing should be the default
|
||||
* Fix bug #7: Add destination cpuset for the proc move command
|
||||
* Fix bug #8: Let leading slash for nested cpuset spec be optional
|
||||
* Fix bug #9: Rearrange info output some, include machine readable output
|
||||
* Fix bug #10: Add a recursive cpuset delete with option
|
||||
* Fix bug #11: Add a configuration file
|
||||
* Fix bug #12: Add hex mask output for cpuset definition spec (cpuspec)
|
||||
* Fix bug #13: Add cpuset rename option to set command
|
||||
* Fix bug #21: Create shield shortcuts
|
||||
|
||||
Other fixes:
|
||||
* Changed behavior of shield command, now it behaves more like the proc move
|
||||
command: -s or -u needs a -p to shield or unshield, however, the shortcut of
|
||||
shield pidspec still works.
|
||||
* Fixed exception when using cset with pipes
|
||||
* Fixed set list behavior if --set was specified but not --list
|
||||
* Added error message if proc list command does not specify a set
|
||||
* Fixed exception if proc is used with -l and -s
|
||||
* Location for cpuset filesystem mount can be specified in config file
|
||||
* Changed proc option -a/--all to --force only
|
||||
* Updated copyrights, URLs and documentation
|
||||
* Added spec file to svn which is used in build service
|
||||
* Cleaned up status output for clarity and consistency
|
||||
* Additional minor corner case bug fixes included
|
||||
|
||||
============================================================
|
||||
|
||||
Cpuset 1.04 (September 2, 2008)
|
||||
https://forgesvn1.novell.com/svn/cpuset/tags/rel_1.04
|
||||
http://download.opensuse.org/repositories/home:/tsariounov:/cpuset/
|
||||
|
||||
Minor bug fixes and inclusion in SLERT10SP2 and slotted for SLES11.
|
||||
|
||||
============================================================
|
||||
|
||||
Cpuset 1.03 (July 18, 2008)
|
||||
https://forgesvn1.novell.com/svn/cpuset/tags/rel_1.03
|
||||
http://download.opensuse.org/repositories/home:/tsariounov:/cpuset/
|
||||
|
||||
Fixed class variables that made import of cset.as python library possible.
|
||||
|
||||
============================================================
|
||||
|
||||
Cpuset 1.02 (June 10, 2008)
|
||||
https://forgesvn1.novell.com/svn/cpuset/tags/rel_1.02
|
||||
http://download.opensuse.org/repositories/home:/tsariounov:/cpuset/
|
||||
|
||||
Minor fixes.
|
||||
|
||||
============================================================
|
||||
|
||||
Cpuset 1.0 (May 30, 2008)
|
||||
https://forgesvn1.novell.com/svn/cpuset/tags/rel_1.0
|
||||
http://download.opensuse.org/repositories/home:/tsariounov:/cpuset/
|
||||
|
||||
First full-featured public release complete with man pages and html docs.
|
||||
|
||||
============================================================
|
@ -0,0 +1,82 @@
|
||||
#
|
||||
# spec file for package cpuset (Version 1.04)
|
||||
#
|
||||
# Copyright (c) 2008 Novell, Inc. Waltham, MA, USA
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself.
|
||||
#
|
||||
# Please submit bugfixes or comments via http://devzilla.novell.com/cpuset
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
Name: cpuset
|
||||
Version: 1.5.0
|
||||
Release: 1
|
||||
License: GPL v2 only
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Url: http://developer.novell.com/wiki/index.php/Cpuset
|
||||
Group: System/Management
|
||||
Summary: Allows manipulation of cpusets on system and provides higher level functions
|
||||
Source: %{name}-%{version}.tar.gz
|
||||
BuildRequires: python-devel
|
||||
|
||||
%if 0%{?suse_version} > 0
|
||||
%py_requires
|
||||
%endif
|
||||
|
||||
%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||
|
||||
%description
|
||||
|
||||
Cpuset 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.
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Alex Tsariounov <alext@novell.com>
|
||||
|
||||
%prep
|
||||
%setup
|
||||
|
||||
|
||||
%build
|
||||
CFLAGS="%{optflags}" \
|
||||
%{__python} setup.py build
|
||||
#make doc ->not yet, asciidoc is missing...
|
||||
|
||||
|
||||
%install
|
||||
# Install binaries, but do not install docs via setup.py
|
||||
%{__python} setup.py install --root=%{buildroot} --prefix=%{_prefix} --install-data=/eraseme
|
||||
%{__rm} -rf %{buildroot}/eraseme
|
||||
|
||||
# Install documentation
|
||||
%{__mkdir_p} %{buildroot}/%{_defaultdocdir}/cpuset
|
||||
%{__cp} NEWS README INSTALL AUTHORS COPYING %{buildroot}/%{_defaultdocdir}/cpuset/
|
||||
%{__mkdir_p} %{buildroot}/%{_mandir}/man1
|
||||
cd doc
|
||||
%{__gzip} *.1
|
||||
%{__cp} *.1.gz %{buildroot}/%{_mandir}/man1
|
||||
%{__cp} *.txt %{buildroot}/%{_defaultdocdir}/cpuset/
|
||||
%{__mkdir} %{buildroot}/%{_defaultdocdir}/cpuset/html
|
||||
%{__cp} *.html %{buildroot}/%{_defaultdocdir}/cpuset/html/
|
||||
|
||||
|
||||
%clean
|
||||
%{__rm} -rf %{buildroot}
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/cset
|
||||
%{python_sitelib}/*
|
||||
%{_mandir}/man1/*
|
||||
%{_defaultdocdir}/*
|
||||
|
||||
|
||||
%changelog
|
@ -0,0 +1,76 @@
|
||||
""" Cpuset Configuration Module
|
||||
|
||||
The config module maintains global (class) variables of the various
|
||||
configuration parameters for the cpuset application. These are filled in from
|
||||
applicable configuration file passed as a path to the ReadConfigFile() method,
|
||||
if desired. The class variables are given default values in the module source.
|
||||
Anything found in the configuration files in the list of paths will override
|
||||
these defaults.
|
||||
"""
|
||||
|
||||
__copyright__ = """
|
||||
Copyright (C) 2009 Novell Inc.
|
||||
Author: Alex Tsariounov <alext@novell.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License version 2 as
|
||||
published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
"""
|
||||
|
||||
import sys
|
||||
import types
|
||||
import ConfigParser
|
||||
|
||||
############################################################################
|
||||
# Default configuration variable values
|
||||
############################################################################
|
||||
defloc = '/etc/cset.conf' # default config file location
|
||||
mread = False # machine readable output, usually set
|
||||
# via option -m/--machine
|
||||
mountpoint = '/cpusets' # cpuset filessytem mount point
|
||||
############################################################################
|
||||
|
||||
def ReadConfigFiles(path=None):
|
||||
if path == None: path = defloc
|
||||
cf = ConfigParser.ConfigParser()
|
||||
try:
|
||||
fr = cf.read(path)
|
||||
if len(fr) == 0: return
|
||||
# can't use logging, too early...
|
||||
if len(cf.sections()) != 1:
|
||||
print "cset: warning, more than one section found in config file:", cf.sections()
|
||||
if 'default' not in cf.sections():
|
||||
print 'cset: [default] section not found in config file "%s"' % path
|
||||
sys.exit(3)
|
||||
|
||||
except ConfigParser.MissingSectionHeaderError:
|
||||
f = open(path)
|
||||
cstr = f.read()
|
||||
f.close()
|
||||
import StringIO
|
||||
cf.readfp(StringIO.StringIO('[default]\n' + cstr))
|
||||
|
||||
# override our globals...
|
||||
for opt in cf.options('default'):
|
||||
typ = type(globals()[opt])
|
||||
if typ == types.BooleanType:
|
||||
globals()[opt] = cf.getboolean('default', opt)
|
||||
elif typ == types.IntType:
|
||||
globals()[opt] = cf.getint('default', opt)
|
||||
else:
|
||||
globals()[opt] = cf.get('default', opt)
|
||||
|
||||
# Importing module autoinitializes it
|
||||
def __init():
|
||||
ReadConfigFiles()
|
||||
|
||||
__init()
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue