Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1300328 > unrolled thread
| Started by | Geliang Tang <geliangtang@163.com> |
|---|---|
| First post | 2016-01-03 17:10 +0100 |
| Last post | 2016-01-04 02:20 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] cgroup: make /proc/cgroups aligned Geliang Tang <geliangtang@163.com> - 2016-01-03 17:10 +0100
Re: [PATCH] cgroup: make /proc/cgroups aligned Zefan Li <lizefan@huawei.com> - 2016-01-04 02:20 +0100
| From | Geliang Tang <geliangtang@163.com> |
|---|---|
| Date | 2016-01-03 17:10 +0100 |
| Subject | [PATCH] cgroup: make /proc/cgroups aligned |
| Message-ID | <qMToe-7DP-33@gated-at.bofh.it> |
This patch makes /proc/cgroups aligned like this:
$ cat /proc/cgroups
#subsys_name hierarchy num_cgroups enabled
cpuset 11 1 1
cpu 2 1 1
cpuacct 2 1 1
blkio 12 1 1
memory 3 1 1
devices 4 83 1
freezer 10 1 1
perf_event 9 1 1
hugetlb 7 1 1
intel_rdt 6 1 1
pids 8 1 1
debug 5 1 1
Signed-off-by: Geliang Tang <geliangtang@163.com>
---
kernel/cgroup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index f1603c1..063b28f 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -5411,7 +5411,7 @@ static int proc_cgroupstats_show(struct seq_file *m, void *v)
mutex_lock(&cgroup_mutex);
for_each_subsys(ss, i)
- seq_printf(m, "%s\t%d\t%d\t%d\n",
+ seq_printf(m, "%12s\t%9d\t%11d\t%7d\n",
ss->legacy_name, ss->root->hierarchy_id,
atomic_read(&ss->root->nr_cgrps),
cgroup_ssid_enabled(i));
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Zefan Li <lizefan@huawei.com> |
|---|---|
| Date | 2016-01-04 02:20 +0100 |
| Message-ID | <qN1Yt-4Lg-5@gated-at.bofh.it> |
| In reply to | #1300328 |
On 2016/1/4 0:08, Geliang Tang wrote: > This patch makes /proc/cgroups aligned like this: > $ cat /proc/cgroups > #subsys_name hierarchy num_cgroups enabled > cpuset 11 1 1 > cpu 2 1 1 > cpuacct 2 1 1 > blkio 12 1 1 > memory 3 1 1 > devices 4 83 1 > freezer 10 1 1 > perf_event 9 1 1 > hugetlb 7 1 1 > intel_rdt 6 1 1 > pids 8 1 1 > debug 5 1 1 > > Signed-off-by: Geliang Tang <geliangtang@163.com> This change is not acceptable because it may break userspace. > --- > kernel/cgroup.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/cgroup.c b/kernel/cgroup.c > index f1603c1..063b28f 100644 > --- a/kernel/cgroup.c > +++ b/kernel/cgroup.c > @@ -5411,7 +5411,7 @@ static int proc_cgroupstats_show(struct seq_file *m, void *v) > mutex_lock(&cgroup_mutex); > > for_each_subsys(ss, i) > - seq_printf(m, "%s\t%d\t%d\t%d\n", > + seq_printf(m, "%12s\t%9d\t%11d\t%7d\n", > ss->legacy_name, ss->root->hierarchy_id, > atomic_read(&ss->root->nr_cgrps), > cgroup_ssid_enabled(i)); > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web