Jan Vcelak b5568e4
%global uses_systemd (0%{?fedora} >= 15)
Jan Vcelak 5725c96
b093181
Summary: A dynamic adaptive system tuning daemon
b093181
Name: tuned
Jan Vcelak b5568e4
Version: 0.2.22
Jan Vcelak b5568e4
Release: 1%{?dist}
b093181
License: GPLv2+
b093181
Group: System Environment/Daemons
b093181
# The source for this package was pulled from upstream git.  Use the
b093181
# following commands to get the corresponding tarball:
9e6caf4
#  git clone git://git.fedorahosted.org/git/tuned.git
b093181
#  cd tuned
b093181
#  git checkout v%{version}
b093181
#  make archive
b093181
Source: tuned-%{version}.tar.bz2
9e6caf4
URL: https://fedorahosted.org/tuned/
b093181
Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Jan Vcelak e917ff8
BuildRequires: python, systemd-units
Jan Vcelak d473bea
Requires: usermode ethtool udev
b093181
Requires(post): chkconfig
b093181
Requires(preun): chkconfig
b093181
Requires(preun): initscripts
b093181
Requires(postun): initscripts
b093181
BuildArch: noarch
b093181
b093181
%description
b093181
The tuned package contains a daemon that tunes system settings dynamically.
b093181
It does so by monitoring the usage of several system components periodically.
b093181
Based on that information components will then be put into lower or higher
b093181
power saving modes to adapt to the current usage. Currently only ethernet
b093181
network and ATA harddisk devices are implemented.
b093181
b093181
%package utils
b093181
Summary: Disk and net statistic monitoring systemtap scripts
ac80ed0
Requires: systemtap
b093181
Group: Applications/System
b093181
b093181
%description utils
b093181
The tuned-utils package contains several systemtap scripts to allow detailed
b093181
manual monitoring of the system. Instead of the typical IO/sec it collects
b093181
minimal, maximal and average time between operations to be able to
b093181
identify applications that behave power inefficient (many small operations
b093181
instead of fewer large ones).
b093181
b093181
%prep
b093181
%setup -q
b093181
b093181
%build
b093181
b093181
%install
b093181
rm -rf %{buildroot}
Jan Vcelak b5568e4
%if %uses_systemd
Jan Vcelak b5568e4
    make install DESTDIR=%{buildroot} INITSYSTEM=systemd
Jan Vcelak b5568e4
%else
Jan Vcelak b5568e4
    make install DESTDIR=%{buildroot}
Jan Vcelak 5725c96
%endif
Jan Vcelak 5725c96
b093181
%clean
b093181
rm -rf %{buildroot}
b093181
b093181
%post
Jan Vcelak b5568e4
%if !%uses_systemd
Jan Vcelak b5568e4
    /sbin/chkconfig --add tuned
Jan Vcelak b5568e4
%endif
77ec7e1
/sbin/chkconfig --add ktune
b093181
b093181
%preun
b093181
if [ $1 = 0 ] ; then
Jan Vcelak b5568e4
    /sbin/service tuned stop &>/dev/null
Jan Vcelak b5568e4
    /sbin/service ktune stop &>/dev/null
Jan Vcelak b5568e4
Jan Vcelak b5568e4
    %if !%uses_systemd
Jan Vcelak b5568e4
        /sbin/chkconfig --del tuned
Jan Vcelak b5568e4
    %endif
77ec7e1
    /sbin/chkconfig --del ktune
b093181
fi
b093181
b093181
%postun
b093181
if [ "$1" -ge "1" ] ; then
Jan Vcelak b5568e4
    /sbin/service tuned condrestart &>/dev/null || :
Jan Vcelak b5568e4
    /sbin/service ktune condrestart &>/dev/null || :
b093181
fi
b093181
b093181
%files
b093181
%defattr(-,root,root,-)
979b1a3
%doc AUTHORS ChangeLog COPYING INSTALL NEWS README doc/DESIGN.txt doc/TIPS.txt ktune/README.ktune doc/examples
b093181
%config(noreplace) %{_sysconfdir}/tuned.conf
8b1eb97
%config(noreplace) %{_sysconfdir}/pam.d/tuned-adm
8b1eb97
%config(noreplace) %{_sysconfdir}/security/console.apps/tuned-adm
cf632b2
%{_sysconfdir}/bash_completion.d
b093181
%{_sbindir}/tuned
77ec7e1
%{_sbindir}/tuned-adm
8b1eb97
# consolehelper hard link
8b1eb97
%{_bindir}/tuned-adm
cf632b2
%config(noreplace) %{_sysconfdir}/tune-profiles/active-profile
77ec7e1
%{_sysconfdir}/tune-profiles
b093181
%{_datadir}/tuned
Jan Vcelak 346e332
%{_mandir}/man1/tuned-adm.*
Jan Vcelak 346e332
%{_mandir}/man5/tuned.conf.*
Jan Vcelak 346e332
%{_mandir}/man8/tuned.*
cf632b2
%config(noreplace) %{_sysconfdir}/sysconfig/ktune
cf632b2
%config(noreplace) %{_sysconfdir}/ktune.d/tunedadm.conf
cf632b2
%dir %{_sysconfdir}/ktune.d
Jan Vcelak 5725c96
%dir %{_localstatedir}/log/tuned
Jan Vcelak 5725c96
%dir %{_localstatedir}/run/tuned
Jan Vcelak d473bea
%attr(0755,root,root) /lib/udev/tuned-mpath-iosched
Jan Vcelak d473bea
/lib/udev/rules.d/*
Jan Vcelak b5568e4
%{_libexecdir}/tuned/
Jan Vcelak b5568e4
%if %uses_systemd
Jan Vcelak 5725c96
%{_sysconfdir}/tmpfiles.d
Jan Vcelak b5568e4
%{_unitdir}/tuned.service
Jan Vcelak b5568e4
# compatibility
Jan Vcelak b5568e4
%{_initddir}/ktune
Jan Vcelak b5568e4
%else
Jan Vcelak b5568e4
%{_initddir}/tuned
Jan Vcelak b5568e4
%{_initddir}/ktune
Jan Vcelak 5725c96
%endif
b093181
b093181
%files utils
b093181
%defattr(-,root,root,-)
b093181
%doc doc/README.utils
77ec7e1
%doc doc/README.scomes
cf632b2
%doc COPYING
77ec7e1
%{_sbindir}/varnetload
b093181
%{_sbindir}/netdevstat
b093181
%{_sbindir}/diskdevstat
c881a79
%{_sbindir}/scomes
Jan Vcelak 346e332
%{_mandir}/man8/varnetload.*
Jan Vcelak 346e332
%{_mandir}/man8/netdevstat.*
Jan Vcelak 346e332
%{_mandir}/man8/diskdevstat.*
Jan Vcelak 346e332
%{_mandir}/man8/scomes.*
77ec7e1
b093181
b093181
%changelog
Jan Vcelak b5568e4
* Tue Mar 20 2012 Jan Vcelak <jvcelak@redhat.com> 0.2.22-1
Jan Vcelak b5568e4
- fix: daemonization race with systemd
Jan Vcelak b5568e4
- enhancement: add pmqos-static daemon (used by ktune to set kernel PM QoS parameters)
Jan Vcelak b5568e4
- fix: handle IOError in net plugin
Jan Vcelak b5568e4
- enhancement: add support for radeon power savings
Jan Vcelak b5568e4
- enhancement: better formula for calculation scomes scores
Jan Vcelak b5568e4
- enhancement: better disks detection mechanism
Jan Vcelak b5568e4
- enhancement: support for disk scheduler quantum setting
Jan Vcelak b5568e4
- enhancement: diskdevstat, netdevstat cmdline error handling
Jan Vcelak b5568e4
- tuned-adm:
Jan Vcelak b5568e4
  + fix: enabling services compatibly with systemd and sysvinit
Jan Vcelak b5568e4
  + fix: crash when active-profile file is missing
Jan Vcelak b5568e4
  + enhancement: sort list of profiles
Jan Vcelak b5568e4
- profile changes:
Jan Vcelak b5568e4
  + latency-performance: add cpu_dma_latency=0
Jan Vcelak b5568e4
  + all: add virtual disks (vd*) to ktune.sysconfig
Jan Vcelak b5568e4
  + new profile: virtual-host
Jan Vcelak b5568e4
  + new profile: virtual-guest
5739203
Jan Vcelak 9716141
* Tue Jun 21 2011 Jan Vcelak <jvcelak@redhat.com> 0.2.21-1
Jan Vcelak 9716141
- fix: crash when ethtool advertised modes in unknown format (#689715)
Jan Vcelak 9716141
- fix: check if ELEVATOR_KTUNE_DEVS is set
Jan Vcelak 9716141
- typo fix: scomes, pooling -> polling
Jan Vcelak 9716141
- fix: handle exceptions when determining type of network device (#707079)
Jan Vcelak 9716141
- remove hal-disable-polling as HAL is being removed from Fedora (#710920)
Jan Vcelak 9716141
- fix: add LSB headers to ktune initscript not to cause deadlock in systemd (#690177)
Jan Vcelak 9716141
- fix: incorrect handling of stdin/stdout/stderr during daemon creation (#695480)
Jan Vcelak 9716141
Jan Vcelak 346e332
* Fri Mar 18 2011 Jan Vcelak <jvcelak@redhat.com> 0.2.20-1
Jan Vcelak 346e332
- new manual pages: diskdevstat, netdevstat, scomes, and varnetload
Jan Vcelak 346e332
- updated obsolete parts in the other manual pages
Jan Vcelak 346e332
- laptop-battery-powersave profile fixes
Jan Vcelak 346e332
- support for new network device naming
Jan Vcelak 346e332
- EEE PC dynamic FSB reclocking is done dynamicly in CPU plugin (Jaroslav Skarvada)
8ca52fc
Jan Vcelak d473bea
* Mon Jan 10 2011 Jan Vcelak <jvcelak@redhat.com> 0.2.19-1
Jan Vcelak d473bea
- reduced FSB support on Asus EEE netbooks with Intel Atom
Jan Vcelak d473bea
- consolidate ktune script functions in tuning profiles
Jan Vcelak d473bea
- disable tuned daemon on s390/s390x architectures
Jan Vcelak d473bea
- set readahead by multiplying previous setting
Jan Vcelak d473bea
- udev rules and script for CFQ and multipath scheduler tuning
Jan Vcelak d473bea
Jan Vcelak 5725c96
* Mon Nov 29 2010 Jan Vcelak <jvcelak@redhat.com> 0.2.18-1
Jan Vcelak 5725c96
- fix hal-disable-polling if no CD drives present
Jan Vcelak 5725c96
- setup tmpfiles.d config to autocreate runtime directory on F15
Jan Vcelak 5725c96
Jan Vcelak 0ef33bc
* Wed Oct 06 2010 Jan Vcelak <jvcelak@redhat.com> 0.2.17-1
Jan Vcelak 0ef33bc
- added 'enterprise-storage' profile
Jan Vcelak 0ef33bc
- added support for architecture-specific configuration files
Jan Vcelak 0ef33bc
- special sysctl setting for s390x arch in 'throughtput-performance' profile
Jan Vcelak 0ef33bc
- apply I/O scheduler setting to device mapper devices
Jan Vcelak 0ef33bc
- workaround for hal-disable-polling bug
Jan Vcelak 0ef33bc
- fixed problem with network cards that provide unparsable supported network modes (#620686)
Jan Vcelak 0ef33bc
eba902d
* Wed Aug 11 2010 David Malcolm <dmalcolm@redhat.com> - 0.2.15-2
eba902d
- recompiling .py files against Python 2.7 (rhbz#623413)
eba902d
cf632b2
* Tue Jul 13 2010 Jan Vcelak <jvcelak@redhat.com> 0.2.15-1
cf632b2
- overall profiles update
cf632b2
- 'tuned-adm active' shows status of tuned and ktune services as well
cf632b2
- proper configuration files setup after fresh instalation
cf632b2
- tuned-utils: added license text
cf632b2
0e5088e
* Fri Jun 04 2010 Jan Vcelak <jvcelak@redhat.com> 0.2.14-1
0e5088e
- bash completion support
0e5088e
- tuned-adm: profile validity check
0e5088e
979b1a3
* Tue May 04 2010 Jan Vcelak <jvcelak@redhat.com> 0.2.13-1
979b1a3
- Fixed 588736 - tuned should not apply /etc/sysctl.ktune settings (Jan Vcelak)
979b1a3
- Fixed 577971 - error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key (Thomas Woerner)
979b1a3
8f03773
* Tue Mar 30 2010 Jan Vcelak <jvcelak@redhat.com> 0.2.12-1
8f03773
- Fixed 577983 - AttributeError: Nettool instance has no attribute 'interface'
8f03773
a16e4a5
* Mon Mar 22 2010 Phil Knirsch <pknirsch@redhat.com> 0.2.11-1
a16e4a5
- Added support for display of currently active profile
a16e4a5
- Fix missing help command
a16e4a5
- Large update to documentation and manpages
a16e4a5
- Updated several of the profiles
a16e4a5
- Updated ALPM powersave code in the various powersave profiles
a16e4a5
- Disabled USB autosuspend in laptop-battery-powersave for now
a16e4a5
fb1e5d5
* Wed Feb 03 2010 Jan Vcelak <jvcelak@redhat.com> 0.2.10-1
fb1e5d5
- Log file moved to separate directory.
fb1e5d5
b0d7dbd
* Mon Feb 01 2010 Jan Vcelak <jvcelak@redhat.com> 0.2.9-1
b0d7dbd
- New release.
b0d7dbd
b08fdfc
* Tue Jan 26 2010 Jan Vcelak <jvcelak@redhat.com> 0.2.8-2
b08fdfc
- Included Thomas Woerner's patch checking user rights when executing
b08fdfc
  ktune service commands.
b08fdfc
- Included Jan Vcelak's patch fixing logging module initialization.
b08fdfc
efd73dd
* Fri Jan 08 2010 Jan Vcelak <jvcelak@redhat.com> 0.2.8-1
efd73dd
- New release. Adds logging support.
efd73dd
b17e634
* Mon Dec 21 2009 Jan Vcelak <jvcelak@redhat.com> 0.2.7-2
b17e634
- Fixed 542305 - [abrt] crash detected in tuned-0.2.5-2.fc12
b17e634
  Some ethernet cards are not supported by 'ethtool'.
b17e634
9803a00
* Fri Dec 11 2009 Thomas Woerner <twoerner@redhat.com> 0.2.7-1
9803a00
- Updated ktune to version 0.4-1
9803a00
  - Supports start and stop options in profile scripts calls
9803a00
  - Fixed CMDLINE_ELEVATOR test (rhbz#496940#c9)
9803a00
51e9e30
* Tue Dec 08 2009 Phil Knirsch <pknirsch@redhat.com> 0.2.6-1
51e9e30
- Included Jan Vcelak's patch for pyo and pyc files
51e9e30
- Updated ktune.sh script for laptop-battery-powersave profile with latest
51e9e30
  ALPM mechanism
51e9e30
- Fixed ktune.sh script for laptop-battery-powersave profile to stop printing
51e9e30
  errors when files in /sys are missing
51e9e30
0706a67
* Thu Nov 26 2009 Petr Lautrbach <plautrba@redhat.com> 0.2.5-2
51e9e30
- Added python into build requires
0706a67
- Resolves: #539949
0706a67
eb338bb
* Tue Nov 03 2009 Phil Knirsch <pknirsch@redhat.com> 0.2.5-1
eb338bb
- Moved from prerelease to normal
eb338bb
- Added missing ethtool requires
eb338bb
- Fixed 532209 - init priority wrong for ktune (Jan Vcelak)
eb338bb
- Fixed 530457 - [abrt] crash detected in tuned-0.2.5-0.1.fc12 (Jan Vcelak)
eb338bb
- Added detection of netcard supported speeds (Jan Vcelak)
eb338bb
- Fix ktune.sh script for stopping in regard to ALPM and CDROM polling (Phil Knirsch)
a30538c
8b1eb97
* Mon Oct 19 2009 Marcela Mašláňová <mmaslano@redhat.com> 0.2.5-0.3
8b1eb97
- new release
8b1eb97
8b1eb97
* Thu Oct 15 2009 Petr Lautrbach <plautrba@redhat.com> 0.2.5-0.2
8b1eb97
- Allow run tuned-adm as root for users at the physical console
8b1eb97
8b1eb97
* Mon Oct 12 2009 Petr Lautrbach <plautrba@redhat.com> 0.2.5-0.1
8b1eb97
- Removed dependence on kobo
8b1eb97
- Bumped to 0.2.5 pre release version
8b1eb97
9e6caf4
* Wed Sep 23 2009 Petr Lautrbach <plautrba@redhat.com> 0.2.4-2
9e6caf4
- fixed url to fedorahosted project page
9e6caf4
- Resolves: #519019
9e6caf4
c6e9fad
* Mon Sep 21 2009 Petr Lautrbach <plautrba@redhat.com> 0.2.4-1
c6e9fad
- Update release to tuned-0.2.4
c6e9fad
- Resolves: #523385
c6e9fad
637d564
* Tue Aug 18 2009 Phil Knirsch <pknirsch@redhat.com> 0.2.3-1
637d564
- Updated documentation
637d564
- Few more fixes for tuned-adm
637d564
637d564
* Fri Aug 14 2009 Phil Knirsch <pknirsch@redhat.com>  0.2.2-1
637d564
- Updates to the ktune scripts
637d564
- Added support for start/stop of the ktune scripts and ktune initscript
637d564
77ec7e1
* Tue Aug 04 2009 Phil Knirsch <pknirsch@redhat.com> - 0.2.1-1
77ec7e1
- Added first set of profiles
77ec7e1
- Added tuned-adm tool for profile switching
77ec7e1
- Fixed several issues with the tuned-adm tool
77ec7e1
77ec7e1
* Mon Jul 27 2009 Thomas Woerner <twoerner@redhat.com> - 0.2.0-1
77ec7e1
- Integrated ktune-0.4
77ec7e1
33d5dc0
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.6-2
33d5dc0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
33d5dc0
77ec7e1
* Thu Jul 16 2009 Phil Knirsch <pknirsch@redhat.com> - 0.1.7-1
77ec7e1
- Added first version CPU tuning and monitoring plugins
77ec7e1
77ec7e1
* Thu Jun 25 2009 Petr Lautrbach <plautrba@redhat.com> - 0.1.6-1
77ec7e1
- added scomes
c881a79
c7020f4
* Wed Mar 25 2009 Phil Knirsch <pknirsch@redhat.com> - 0.1.5-1
c7020f4
- Updated documentation, thanks to Marcela Maslanova!
c7020f4
- Updated diskdevstat and netdevstat to have command line arguments
c7020f4
- Added the possibility to output a histogram at the end of the
c7020f4
  run for detailed information about the collected data
c7020f4
ac80ed0
* Fri Mar 06 2009 Phil Knirsch <pknirsch@redhat.com> - 0.1.4-1
ac80ed0
- Dropped unecessary kernel-debuginfo requires from tuned-utils
ac80ed0
b093181
* Mon Mar 02 2009 Phil Knirsch <pknirsch@redhat.com> - 0.1.3-1
b093181
- Fixed placement of doc entry at tuned-utils package
b093181
b093181
* Thu Feb 26 2009 Phil Knirsch <pknirsch@redhat.com> - 0.1.2-1
b093181
- Added config file option to enable/disable plugins
b093181
- Switched from ConfigParser to RawConfigParser
b093181
- Renamed doc/README.txt to doc/DESIGN.txt
b093181
- Added tuned.conf man page
b093181
- Updated tuned man page
b093181
- Updated package descriptions (#487312)
b093181
- Added documentation for utils scripts (#487312)
b093181
b093181
* Wed Feb 25 2009 Phil Knirsch <pknirsch@redhat.com> - 0.1.1-1
b093181
- Bump version
b093181
- Added comment in empty __init__.py files
b093181
- Fixed BuildRoot tag to use latest recommendation of FPG
b093181
- Lots of whitespace changes
b093181
- Some minor README changes
b093181
- Added a changelog rule in Makefile
b093181
- Fixed rpmlint error messages
b093181
- Add init() methods to each plugin
b093181
- Call plugin init() methods during tuned's init()
b093181
- Add support for command line parameters
b093181
      o -c conffile|--config==conffile to specify the location of the config file
b093181
      o -d to start tuned as a daemon (instead of as normal app)
b093181
- Readded the debug output in case tuned isn't started as as daemon
b093181
- Fixed initialization of max transfer values for net tuning plugin
b093181
- Added complete cleanup code in case of tuned exiting and/or
b093181
  getting a SIGTERM to restore default values
b093181
- Made the disk tuning pluging less nosy if started as non-daemon
b093181
- Fixed missing self. in the tuned.py config handling
b093181
- Added a manpage
b093181
- Fixed summary
b093181
- Added missing GPL notic to tuned.py
b093181
- Added explanation for Source entry in specfile
b093181
- Added a distarchive target for the Makefile for proper tagging in git
b093181
- Added a explanation how to create the tarball via git in the specfile
b093181
- Fixed the defattr() lines in the specfile to conform FRG
b093181
b093181
* Mon Feb 23 2009 Phil Knirsch <pknirsch@redhat.com> - 0.1.0-1
b093181
- Initial version