Tuna's homepage's dependencies section
by Erwann Roussy
Hello
I recently try to compile tuna from source and struggle with dependencies.
I ran onto this web page : https://rt.wiki.kernel.org/index.php/Tuna which I think is Tuna's homepage and that list four dependencies.
From what I understand, python3-inet_diag is no longer required nor maintained and python3-ethtool was still required for the last release but isn't anymore.
Could you please remove these dependencies from this page, or at least indicate for what commit/release they are needed ?
Best regards
Erwann Roussy
1 year
[PATCH v2] tuna: Fix cgroup process run without a terminal
by Leah Leshchinsky
When process not run with terminal, a default size must be provided.
Set default width to 80 to account for this condition.
Signed-off-by: Leah Leshchinsky <lleshchi(a)redhat.com>
---
target branch: main
pull from: git@gitlab.com:lleshchi/tuna.git
branch: main_format
commit: 4834fddf559459d1dde868f5f5a7986fc13f0e52
diff --git a/tuna-cmd.py b/tuna-cmd.py
index 630c8bc..4e809dd 100755
--- a/tuna-cmd.py
+++ b/tuna-cmd.py
@@ -31,6 +31,7 @@ import procfs
from tuna import tuna, sysfs
import logging
import time
+import shutil
def get_loglevel(level):
if level.isdigit() and int(level) in range(0,5):
@@ -440,9 +441,10 @@ def ps_show(ps, affect_children, thread_list, cpu_list,
# Width of terminal in columns
- columns = None
+ columns = 80
if cgroups:
- _, columns = os.popen('stty size', 'r').read().split()
+ if os.isatty(sys.stdout.fileno()):
+ columns = shutil.get_terminal_size().columns
for pid in ps_list:
ps_show_thread(pid, affect_children, ps, has_ctxt_switch_info,
--
2.38.1
1 year
[PATCH v2] tuna: Fix cgroup process run without a terminal
by Leah Leshchinsky
When process not run with terminal, a default size must be provided.
Set default width to 80 to account for this condition.
Signed-off-by: Leah Leshchinsky <lleshchi(a)redhat.com>
---
target branch: getopt
pull from: git@gitlab.com:lleshchi/tuna.git
branch: getopt_format
commit: 960eadfbebdf611127e6fa9251a1c7a33f7a492b
diff --git a/tuna-cmd.py b/tuna-cmd.py
index 54dc567..f5dafa7 100755
--- a/tuna-cmd.py
+++ b/tuna-cmd.py
@@ -31,6 +31,7 @@ import procfs
from tuna import tuna, sysfs
import logging
import time
+import shutil
def get_loglevel(level):
if level.isdigit() and int(level) in range(0,5):
@@ -353,9 +354,10 @@ def ps_show(ps, affect_children, thread_list, cpu_list,
ps_list.sort()
# Width of terminal in columns
- columns = None
+ columns = 80
if cgroups:
- _, columns = os.popen('stty size', 'r').read().split()
+ if os.isatty(sys.stdout.fileno()):
+ columns = shutil.get_terminal_size().columns
for pid in ps_list:
ps_show_thread(pid, affect_children, ps, has_ctxt_switch_info,
--
2.38.1
1 year
[PATCH] tuna: Fix cgroup process run without a terminal
by Leah Leshchinsky
When process not run with terminal, no column information will be
available through 'stty' command.
Set default width to 80 to account for this condition.
Signed-off-by: Leah Leshchinsky <lleshchi(a)redhat.com>
---
target branch: main
pull from: git@gitlab.com:lleshchi/tuna.git
branch: main_format
commit: a410ba54a5cd995ea4b64b484403a21a972ea87b
diff --git a/tuna-cmd.py b/tuna-cmd.py
index 630c8bc..9862f86 100755
--- a/tuna-cmd.py
+++ b/tuna-cmd.py
@@ -440,10 +440,15 @@ def ps_show(ps, affect_children, thread_list, cpu_list,
# Width of terminal in columns
- columns = None
- if cgroups:
- _, columns = os.popen('stty size', 'r').read().split()
+ columns = 80
+ if cgroups:
+ try:
+ # This can fail if not running on a term, default to 80 in that case
+ with os.popen('stty size', 'r') as p:
+ _, columns = p.read().split()
+ except:
+ pass
for pid in ps_list:
ps_show_thread(pid, affect_children, ps, has_ctxt_switch_info,
sock_inodes, sock_inode_re, cgroups, columns, compact)
--
2.38.1
1 year
[PATCH] tuna: Fix cgroup process run without a terminal
by Leah Leshchinsky
When process not run with terminal, no column information will be
available through 'stty' command.
Set default width to 80 to account for this condition.
Signed-off-by: Leah Leshchinsky <lleshchi(a)redhat.com>
---
target branch: getopt
pull from: git@gitlab.com:lleshchi/tuna.git
branch: getopt_format
commit: 4a27664a3e2584e76b336084951933559ab58c34
diff --git a/tuna-cmd.py b/tuna-cmd.py
index 54dc567..42aa326 100755
--- a/tuna-cmd.py
+++ b/tuna-cmd.py
@@ -353,10 +353,15 @@ def ps_show(ps, affect_children, thread_list, cpu_list,
ps_list.sort()
# Width of terminal in columns
- columns = None
- if cgroups:
- _, columns = os.popen('stty size', 'r').read().split()
+ columns = 80
+ if cgroups:
+ try:
+ # This can fail if not running on a term, default to 80 in that case
+ with os.popen('stty size', 'r') as p:
+ _, columns = p.read().split()
+ except:
+ pass
for pid in ps_list:
ps_show_thread(pid, affect_children, ps, has_ctxt_switch_info,
sock_inodes, sock_inode_re, cgroups, columns, compact)
--
2.38.1
1 year
[PATCH v3] tuna: Default to width 80 terminal
by Leah Leshchinsky
When process not run with terminal, no column information will be
available through 'stty' command.
Set default width to 80 to account for this condition.
Signed-off-by: Leah Leshchinsky <lleshchi(a)redhat.com>
---
target branch: main
pull from: git@gitlab.com:lleshchi/tuna.git
branch: main_format
commit: 77445f9bfb0d4d55915ade5a6ef139861f5b1ec6
diff --git a/tuna-cmd.py b/tuna-cmd.py
index 630c8bc..725a7e9 100755
--- a/tuna-cmd.py
+++ b/tuna-cmd.py
@@ -440,10 +440,13 @@ def ps_show(ps, affect_children, thread_list, cpu_list,
# Width of terminal in columns
- columns = None
+ columns = 80
if cgroups:
- _, columns = os.popen('stty size', 'r').read().split()
-
+ try:
+ with os.popen('stty size', 'r') as p:
+ _, columns = p.read().split()
+ except:
+ pass
for pid in ps_list:
ps_show_thread(pid, affect_children, ps, has_ctxt_switch_info,
sock_inodes, sock_inode_re, cgroups, columns, compact)
--
2.38.1
1 year
[PATCH v2] tuna: Default to width 80 terminal
by Leah Leshchinsky
When process not run with terminal, no column information will be
available through 'stty' command.
Set default width to 80 to account for this condition.
Signed-off-by: Leah Leshchinsky <lleshchi(a)redhat.com>
---
target branch: getopt
diff --git a/tuna-cmd.py b/tuna-cmd.py
index 54dc567..2224c2b 100755
--- a/tuna-cmd.py
+++ b/tuna-cmd.py
@@ -353,10 +353,12 @@ def ps_show(ps, affect_children, thread_list, cpu_list,
ps_list.sort()
# Width of terminal in columns
- columns = None
if cgroups:
- _, columns = os.popen('stty size', 'r').read().split()
-
+ try:
+ with os.popen('stty size', 'r') as p:
+ _, columns = p.read().split()
+ except:
+ columns = 80
for pid in ps_list:
ps_show_thread(pid, affect_children, ps, has_ctxt_switch_info,
sock_inodes, sock_inode_re, cgroups, columns, compact)
--
2.38.1
1 year
[PATCH v2] tuna: Default to width 80 terminal
by Leah Leshchinsky
When process not run with terminal, no column information will be
available through 'stty' command.
Set default width to 80 to account for this condition.
Signed-off-by: Leah Leshchinsky <lleshchi(a)redhat.com>
---
target branch: main
diff --git a/tuna-cmd.py b/tuna-cmd.py
index 630c8bc..e8d26d3 100755
--- a/tuna-cmd.py
+++ b/tuna-cmd.py
@@ -440,10 +440,12 @@ def ps_show(ps, affect_children, thread_list, cpu_list,
# Width of terminal in columns
- columns = None
if cgroups:
- _, columns = os.popen('stty size', 'r').read().split()
-
+ try:
+ with os.popen('stty size', 'r') as p:
+ _, columns = p.read().split()
+ except:
+ columns = 80
for pid in ps_list:
ps_show_thread(pid, affect_children, ps, has_ctxt_switch_info,
sock_inodes, sock_inode_re, cgroups, columns, compact)
--
2.38.1
1 year
[PATCH] tuna: Default to width 80 terminal
by Leah Leshchinsky
When process not run with terminal, no column information will be
available through 'stty' command.
Set default width to 80 to account for this condition.
Signed-off-by: Leah Leshchinsky <lleshchi(a)redhat.com>
---
target branch: getopt
diff --git a/tuna-cmd.py b/tuna-cmd.py
index 54dc567..accca4a 100755
--- a/tuna-cmd.py
+++ b/tuna-cmd.py
@@ -353,10 +353,11 @@ def ps_show(ps, affect_children, thread_list, cpu_list,
ps_list.sort()
# Width of terminal in columns
- columns = None
+ columns = 80
if cgroups:
- _, columns = os.popen('stty size', 'r').read().split()
-
+ size = os.popen('stty size', 'r').read().split()
+ if len(size) == 2:
+ _, columns = size
for pid in ps_list:
ps_show_thread(pid, affect_children, ps, has_ctxt_switch_info,
sock_inodes, sock_inode_re, cgroups, columns, compact)
--
2.38.1
1 year
[PATCH] tuna: Default to width 80 terminal
by Leah Leshchinsky
When process not run with terminal, no column information will be
available through 'stty' command.
Set default width to 80 to account for this condition.
Signed-off-by: Leah Leshchinsky <lleshchi(a)redhat.com>
---
target branch: main
diff --git a/tuna-cmd.py b/tuna-cmd.py
index 630c8bc..40d3da8 100755
--- a/tuna-cmd.py
+++ b/tuna-cmd.py
@@ -440,10 +440,11 @@ def ps_show(ps, affect_children, thread_list, cpu_list,
# Width of terminal in columns
- columns = None
+ columns = 80
if cgroups:
- _, columns = os.popen('stty size', 'r').read().split()
-
+ size = os.popen('stty size', 'r').read().split()
+ if len(size) == 2:
+ _, columns = size
for pid in ps_list:
ps_show_thread(pid, affect_children, ps, has_ctxt_switch_info,
sock_inodes, sock_inode_re, cgroups, columns, compact)
--
2.38.1
1 year