* [PATCH v3] proc.5: document 'subset' mount option.
@ 2024-05-14 20:28 technoboy85
2024-05-17 21:21 ` Alejandro Colomar
0 siblings, 1 reply; 2+ messages in thread
From: technoboy85 @ 2024-05-14 20:28 UTC (permalink / raw)
To: Alejandro Colomar; +Cc: linux-man, Matteo Croce
From: Matteo Croce <teknoraver@meta.com>
The 'subset=pid' option was added in commit 6814ef2d, document it.
This option mounts a procfs where only the numeric directories related
to the PIDs are present.
# mount -t proc proc_pid pid -o subset=pid
# mount |grep -w proc_pid
proc_pid on /tmp/proc/pid type proc (rw,relatime,subset=pid)
# ll -d pid/{1,$$,cmdline,version}
ls: cannot access 'pid/cmdline': No such file or directory
ls: cannot access 'pid/version': No such file or directory
dr-xr-xr-x. 9 root root 0 May 14 09:43 pid/1
dr-xr-xr-x. 9 root root 0 May 14 09:43 pid/25146
The only non-numeric entries in that procfs instance are
'self' and 'thread-self':
# ls pid |grep -vx '[[:digit:]]*'
self
thread-self
#
Signed-off-by: Matteo Croce <teknoraver@meta.com>
---
man/man5/proc.5 | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/man/man5/proc.5 b/man/man5/proc.5
index 8022ca49e..cdb4aa859 100644
--- a/man/man5/proc.5
+++ b/man/man5/proc.5
@@ -105,7 +105,12 @@ This group should be used instead of approaches such as putting
nonroot users into the
.BR sudoers (5)
file.
-.\"
+.RE
+.TP
+.BR subset = pid " (since Linux 5.8)"
+.\" commit 6814ef2d992af09451bbeda4770daa204461329e
+Show only the specified subset of procfs hiding all top level files
+and directories in the procfs that are not related to tasks.
.SS Overview
Underneath
.IR /proc ,
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v3] proc.5: document 'subset' mount option.
2024-05-14 20:28 [PATCH v3] proc.5: document 'subset' mount option technoboy85
@ 2024-05-17 21:21 ` Alejandro Colomar
0 siblings, 0 replies; 2+ messages in thread
From: Alejandro Colomar @ 2024-05-17 21:21 UTC (permalink / raw)
To: technoboy85; +Cc: linux-man, Matteo Croce, G. Branden Robinson
[-- Attachment #1: Type: text/plain, Size: 1999 bytes --]
Hi Matteo,
On Tue, May 14, 2024 at 10:28:19PM GMT, technoboy85@gmail.com wrote:
> From: Matteo Croce <teknoraver@meta.com>
>
> The 'subset=pid' option was added in commit 6814ef2d, document it.
> This option mounts a procfs where only the numeric directories related
> to the PIDs are present.
>
> # mount -t proc proc_pid pid -o subset=pid
> # mount |grep -w proc_pid
> proc_pid on /tmp/proc/pid type proc (rw,relatime,subset=pid)
>
> # ll -d pid/{1,$$,cmdline,version}
> ls: cannot access 'pid/cmdline': No such file or directory
> ls: cannot access 'pid/version': No such file or directory
> dr-xr-xr-x. 9 root root 0 May 14 09:43 pid/1
> dr-xr-xr-x. 9 root root 0 May 14 09:43 pid/25146
>
> The only non-numeric entries in that procfs instance are
> 'self' and 'thread-self':
>
> # ls pid |grep -vx '[[:digit:]]*'
> self
> thread-self
> #
>
> Signed-off-by: Matteo Croce <teknoraver@meta.com>
I've applied the patch, with minor fixes (grep for 'semantic newlines'
in man-pages(7)), such as a comma, and different line breaks.
<https://www.alejandro-colomar.es/src/alx/linux/man-pages/man-pages.git/commit/?h=contrib&id=dd465607bc5817819f1e90eb66468e7d9cf9e0b1>
Have a lovely night!
Alex
> ---
> man/man5/proc.5 | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/man/man5/proc.5 b/man/man5/proc.5
> index 8022ca49e..cdb4aa859 100644
> --- a/man/man5/proc.5
> +++ b/man/man5/proc.5
> @@ -105,7 +105,12 @@ This group should be used instead of approaches such as putting
> nonroot users into the
> .BR sudoers (5)
> file.
> -.\"
> +.RE
> +.TP
> +.BR subset = pid " (since Linux 5.8)"
> +.\" commit 6814ef2d992af09451bbeda4770daa204461329e
> +Show only the specified subset of procfs hiding all top level files
> +and directories in the procfs that are not related to tasks.
> .SS Overview
> Underneath
> .IR /proc ,
> --
> 2.43.0
>
--
<https://www.alejandro-colomar.es/>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-05-17 21:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-14 20:28 [PATCH v3] proc.5: document 'subset' mount option technoboy85
2024-05-17 21:21 ` Alejandro Colomar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox