Update to 0.4.5-1
This commit is contained in:
parent
e258aa1627
commit
f6422e6e22
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1,3 @@
|
|||||||
python-linux-procfs-0.4.4.tar.bz2
|
python-linux-procfs-0.4.4.tar.bz2
|
||||||
|
/python-linux-procfs-0.4.6.tar.bz2
|
||||||
|
/python-linux-procfs-0.4.5.tar.bz2
|
||||||
|
@ -0,0 +1,43 @@
|
|||||||
|
From 816b3fc12ed1eab106970db0cd493c14d0654005 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Petr Oros <poros@redhat.com>
|
||||||
|
Date: Wed, 27 Mar 2013 09:38:07 +0100
|
||||||
|
Subject: [PATCH] pidstats: Added support for parsing cgroups as a per thread attribute
|
||||||
|
|
||||||
|
Signed-off-by: Petr Oros <poros@redhat.com>
|
||||||
|
---
|
||||||
|
procfs/procfs.py | 12 ++++++++++++
|
||||||
|
1 files changed, 12 insertions(+), 0 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/procfs/procfs.py b/procfs/procfs.py
|
||||||
|
index c0ceec8..533a709 100755
|
||||||
|
--- a/procfs/procfs.py
|
||||||
|
+++ b/procfs/procfs.py
|
||||||
|
@@ -165,6 +165,8 @@ class process:
|
||||||
|
self.load_cmdline()
|
||||||
|
elif attr == "threads":
|
||||||
|
self.load_threads()
|
||||||
|
+ elif attr == "cgroups":
|
||||||
|
+ self.load_cgroups()
|
||||||
|
|
||||||
|
return getattr(self, attr)
|
||||||
|
|
||||||
|
@@ -181,6 +183,16 @@ class process:
|
||||||
|
# remove thread leader
|
||||||
|
del self.threads[self.pid]
|
||||||
|
|
||||||
|
+ def load_cgroups(self):
|
||||||
|
+ f = file("/proc/%d/cgroup" % self.pid)
|
||||||
|
+ self.cgroups = ""
|
||||||
|
+ for line in reversed(f.readlines()):
|
||||||
|
+ if len(self.cgroups):
|
||||||
|
+ self.cgroups = self.cgroups + "," + line[:-1]
|
||||||
|
+ else:
|
||||||
|
+ self.cgroups = line[:-1]
|
||||||
|
+ f.close()
|
||||||
|
+
|
||||||
|
class pidstats:
|
||||||
|
|
||||||
|
def __init__(self, basedir = "/proc"):
|
||||||
|
--
|
||||||
|
1.7.1
|
||||||
|
|
@ -1,13 +1,16 @@
|
|||||||
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||||
%{!?python_ver: %define python_ver %(%{__python} -c "import sys ; print sys.version[:3]")}
|
%{!?python_ver: %define python_ver %(%{__python} -c "import sys ; print sys.version[:3]")}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Name: python-linux-procfs
|
Name: python-linux-procfs
|
||||||
Version: 0.4.4
|
Version: 0.4.5
|
||||||
Release: 8%{?dist}
|
Release: 1%{?dist}
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
Summary: Linux /proc abstraction classes
|
Summary: Linux /proc abstraction classes
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
Source: http://userweb.kernel.org/~acme/python-linux-procfs/%{name}-%{version}.tar.bz2
|
Source: http://userweb.kernel.org/~acme/python-linux-procfs/%{name}-%{version}.tar.bz2
|
||||||
|
Patch0: 0001-pidstats-Added-support-for-parsing-cgroups-as-a-per-.patch
|
||||||
URL: http://userweb.kernel.org/~acme/python-linux-procfs
|
URL: http://userweb.kernel.org/~acme/python-linux-procfs
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
@ -18,6 +21,7 @@ Abstractions to extract information from the Linux kernel /proc files.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__python} setup.py build
|
%{__python} setup.py build
|
||||||
@ -39,6 +43,9 @@ rm -rf %{buildroot}
|
|||||||
%doc COPYING
|
%doc COPYING
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jun 6 2013 Jiri Kastner <jkastner@redhat.com> - 0.4.5-1
|
||||||
|
- Added support for parsing cgroups as a per thread attribute
|
||||||
|
|
||||||
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.4-8
|
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.4-8
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user