sys-process/ctop: bump to 1.0.0

This commit is contained in:
Julian Ospald 2016-05-14 22:33:53 +02:00
parent b9b4f7bb26
commit b800eaa1ac
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28
3 changed files with 0 additions and 71 deletions

View File

@ -12,9 +12,3 @@ SLOT="0"
PLATFORMS="~amd64 ~x86" PLATFORMS="~amd64 ~x86"
MYOPTIONS="" MYOPTIONS=""
# upstream backports
DEFAULT_SRC_PREPARE_PATCHES=(
"${FILES}"/${PNV}-rel-paths.patch
"${FILES}"/${PNV}-blkio.patch
)

View File

@ -1,38 +0,0 @@
From 093d4c2b604f6e94d01420c0937d5fe574c49a40 Mon Sep 17 00:00:00 2001
From: Jean-Tiare Le Bigot <jt@yadutaf.fr>
Date: Tue, 19 Jan 2016 08:36:07 +0100
Subject: [PATCH] workaround broken blkio on some system. Fixes #15
---
cgroup_top.py | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/cgroup_top.py b/cgroup_top.py
index fece4a6..8bbb8f0 100755
--- a/cgroup_top.py
+++ b/cgroup_top.py
@@ -26,6 +26,7 @@
import pwd
import time
import pty
+import errno
import subprocess
import multiprocessing
@@ -346,8 +347,14 @@ def collect(measures):
collect_ensure_common(cur[cgroup.name], cgroup)
# Collect BlockIO stats
- cur[cgroup.name]['blkio.throttle.io_service_bytes'] = cgroup['blkio.throttle.io_service_bytes']
- cur[cgroup.name]['blkio.throttle.io_service_bytes.diff'] = {'total':0}
+ try:
+ cur[cgroup.name]['blkio.throttle.io_service_bytes'] = cgroup['blkio.throttle.io_service_bytes']
+ cur[cgroup.name]['blkio.throttle.io_service_bytes.diff'] = {'total':0}
+ except IOError as e:
+ # Workaround broken systems (see #15)
+ if e.errno == errno.ENOENT:
+ continue
+ raise
# Collect BlockIO increase on run > 1
if cgroup.name in prev:

View File

@ -1,27 +0,0 @@
From 180b94124cc17afa60cd9126fee2e004a26c43f2 Mon Sep 17 00:00:00 2001
From: Jean-Tiare Le Bigot <jt@yadutaf.fr>
Date: Fri, 15 May 2015 22:21:26 +0200
Subject: [PATCH] fix #7: use relative path to which
Signed-off-by: Jean-Tiare Le Bigot <jt@yadutaf.fr>
---
CHANGELOG | 1 +
cgroup_top.py | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/cgroup_top.py b/cgroup_top.py
index f073518..6a1ea66 100755
--- a/cgroup_top.py
+++ b/cgroup_top.py
@@ -41,7 +41,10 @@
sys.exit(0)
def cmd_exists(cmd):
- return subprocess.call(["/bin/which", cmd], stdout=subprocess.PIPE, stderr=subprocess.PIPE) == 0
+ try:
+ return subprocess.call(["which", cmd], stdout=subprocess.PIPE, stderr=subprocess.PIPE) == 0
+ except OSError:
+ return False
HAS_LXC = cmd_exists('lxc-start')
HAS_DOCKER = cmd_exists('docker')