All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cgroup: /proc/cgroups output alignment
@ 2023-01-30  8:58 ` liuq
  0 siblings, 0 replies; 2+ messages in thread
From: liuq @ 2023-01-30  8:58 UTC (permalink / raw)
  To: tj; +Cc: lizefan.x, hannes, cgroups, linux-kernel, liuq

/proc/cgroups output alignment for easy read

Signed-off-by: liuq <liuq131@chinatelecom.cn>
---
 kernel/cgroup/cgroup-v1.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/cgroup/cgroup-v1.c b/kernel/cgroup/cgroup-v1.c
index 52bb5a74a23b..ff82d61ae76f 100644
--- a/kernel/cgroup/cgroup-v1.c
+++ b/kernel/cgroup/cgroup-v1.c
@@ -670,14 +670,14 @@ int proc_cgroupstats_show(struct seq_file *m, void *v)
 	struct cgroup_subsys *ss;
 	int i;
 
-	seq_puts(m, "#subsys_name\thierarchy\tnum_cgroups\tenabled\n");
+	seq_puts(m, "#subsys_name        hierarchy     num_cgroups   enabled\n");
 	/*
 	 * Grab the subsystems state racily. No need to add avenue to
 	 * cgroup_mutex contention.
 	 */
 
 	for_each_subsys(ss, i)
-		seq_printf(m, "%s\t%d\t%d\t%d\n",
+		seq_printf(m, "%-20s%-14d%-14d%-14d\n",
 			   ss->legacy_name, ss->root->hierarchy_id,
 			   atomic_read(&ss->root->nr_cgrps),
 			   cgroup_ssid_enabled(i));
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] cgroup: /proc/cgroups output alignment
@ 2023-01-30  8:58 ` liuq
  0 siblings, 0 replies; 2+ messages in thread
From: liuq @ 2023-01-30  8:58 UTC (permalink / raw)
  To: tj-DgEjT+Ai2ygdnm+yROfE0A
  Cc: lizefan.x-EC8Uxl6Npydl57MIdRCFDg, hannes-druUgvl0LCNAfugRpC6u6w,
	cgroups-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, liuq

/proc/cgroups output alignment for easy read

Signed-off-by: liuq <liuq131-Y1hxUtIYs7aGGVEaKU10Zw@public.gmane.org>
---
 kernel/cgroup/cgroup-v1.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/cgroup/cgroup-v1.c b/kernel/cgroup/cgroup-v1.c
index 52bb5a74a23b..ff82d61ae76f 100644
--- a/kernel/cgroup/cgroup-v1.c
+++ b/kernel/cgroup/cgroup-v1.c
@@ -670,14 +670,14 @@ int proc_cgroupstats_show(struct seq_file *m, void *v)
 	struct cgroup_subsys *ss;
 	int i;
 
-	seq_puts(m, "#subsys_name\thierarchy\tnum_cgroups\tenabled\n");
+	seq_puts(m, "#subsys_name        hierarchy     num_cgroups   enabled\n");
 	/*
 	 * Grab the subsystems state racily. No need to add avenue to
 	 * cgroup_mutex contention.
 	 */
 
 	for_each_subsys(ss, i)
-		seq_printf(m, "%s\t%d\t%d\t%d\n",
+		seq_printf(m, "%-20s%-14d%-14d%-14d\n",
 			   ss->legacy_name, ss->root->hierarchy_id,
 			   atomic_read(&ss->root->nr_cgrps),
 			   cgroup_ssid_enabled(i));
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-30  9:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-30  8:58 [PATCH] cgroup: /proc/cgroups output alignment liuq
2023-01-30  8:58 ` liuq

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.