From: Eugene Lubarsky <elubarsky.linux@gmail.com>
To: linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, adobriyan@gmail.com,
avagin@gmail.com, dsahern@gmail.com
Subject: [RFC PATCH 3/5] fs/proc: Introduce /proc/all/status
Date: Tue, 11 Aug 2020 00:58:50 +1000 [thread overview]
Message-ID: <20200810145852.9330-4-elubarsky.linux@gmail.com> (raw)
In-Reply-To: <20200810145852.9330-1-elubarsky.linux@gmail.com>
Returns status lines for all visible processes in the existing format.
Signed-off-by: Eugene Lubarsky <elubarsky.linux@gmail.com>
---
fs/proc/base.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 8396a38ba7d2..5982fd43dd21 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -3897,6 +3897,14 @@ static int proc_all_statm(struct seq_file *m, void *v)
}
+
+static int proc_all_status(struct seq_file *m, void *v)
+{
+ struct all_iter *iter = (struct all_iter *) v;
+
+ return proc_pid_status(m, iter->ns, iter->tgid_iter.task->thread_pid, iter->tgid_iter.task);
+}
+
#define PROC_ALL_OPS(NAME) static const struct seq_operations proc_all_##NAME##_ops = { \
.start = proc_all_start, \
.next = proc_all_next, \
@@ -3906,6 +3914,7 @@ static int proc_all_statm(struct seq_file *m, void *v)
PROC_ALL_OPS(stat);
PROC_ALL_OPS(statm);
+PROC_ALL_OPS(status);
#define PROC_ALL_CREATE(NAME) \
do { \
@@ -3922,4 +3931,5 @@ void __init proc_all_init(void)
PROC_ALL_CREATE(stat);
PROC_ALL_CREATE(statm);
+ PROC_ALL_CREATE(status);
}
--
2.25.1
next prev parent reply other threads:[~2020-08-10 14:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-10 14:58 [RFC PATCH 0/5] Introduce /proc/all/ to gather stats from all processes Eugene Lubarsky
2020-08-10 14:58 ` [RFC PATCH 1/5] fs/proc: Introduce /proc/all/stat Eugene Lubarsky
2020-08-10 14:58 ` [RFC PATCH 2/5] fs/proc: Introduce /proc/all/statm Eugene Lubarsky
2020-08-10 14:58 ` Eugene Lubarsky [this message]
2020-08-10 14:58 ` [RFC PATCH 4/5] fs/proc: Introduce /proc/all/io Eugene Lubarsky
2020-08-10 14:58 ` [RFC PATCH 5/5] fs/proc: Introduce /proc/all/statx Eugene Lubarsky
2020-08-10 15:04 ` [RFC PATCH 0/5] Introduce /proc/all/ to gather stats from all processes Greg KH
2020-08-10 15:27 ` Eugene Lubarsky
2020-08-10 15:41 ` Greg KH
2020-08-25 9:59 ` Eugene Lubarsky
2020-08-12 7:51 ` Andrei Vagin
2020-08-13 4:47 ` David Ahern
2020-08-13 8:03 ` Andrei Vagin
2020-08-13 15:01 ` Eugene Lubarsky
2020-08-20 17:41 ` Andrei Vagin
2020-08-25 10:00 ` Eugene Lubarsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200810145852.9330-4-elubarsky.linux@gmail.com \
--to=elubarsky.linux@gmail.com \
--cc=adobriyan@gmail.com \
--cc=avagin@gmail.com \
--cc=dsahern@gmail.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox