proc.5: document 'subset' mount option.
PATCH 1/1 proc.5: document 'subset' mount option.
From: Matteo Croce <[email protected]>
The 'subset=pid' option was added in commit 6814ef2d, document it.
--- man/man5/proc.5 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
man/man5/proc.5 +6 -1
@@ -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 "=\fIpid\fP (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 ,
Signature · 1 line
2.43.0
Alejandro Colomar
maintainerHi Matteo,
Quoted 14 lines · On Tue, May 14, 2024 at 07:54:49PM GMT, [email protected] wrote:
From: Matteo Croce <[email protected]>
The 'subset=pid' option was added in commit
6814ef2d, document it.Signed-off-by Matteo Croce <[email protected]>--- man/man5/proc.5 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)man/man5/proc.5 +0
-0
man/man5/proc.5 This group should be used instead of approaches such as putting · line 110
Quoted 7 lines
man/man5/proc.5 +3
-1@@ -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 "=\fIpid\fP (since Linux 5.8)"
What is the accepted format? A CSV of pid numbers?
Have a lovely day!
Alex
Quoted 9 lines
man/man5/proc.5 +3
-0+.\" 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 ,Signature · 1 line
2.43.0
Signature · 3 lines
<https://www.alejandro-colomar.es/> A client is hiring kernel driver, mm, and/or crypto developers; contact me if interested.
Il giorno mar 14 mag 2024 alle ore 20:08 Alejandro Colomar <[email protected]> ha scritto:
Quoted 7 lines
What is the accepted format? A CSV of pid numbers?
Have a lovely day!
Alex
Hi Alejandro,
It can only accept the literal "pid" string:
# 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/25146Regards,
Signature · 3 lines
Matteo Croce
perl -e 'for($t=0;;$t++){print chr($t*($t>>8|$t>>13)&255)}' |aplayAlejandro Colomar
maintainerHi Matteo,
Quoted 4 lines · Matteo Croce
Il giorno mar 14 mag 2024 alle ore 20:08 Alejandro Colomar <[email protected]> ha scritto:
Quoted 2 lines
Quoted 8 lines
Quoted 5 lines
What is the accepted format? A CSV of pid numbers?
Have a lovely day!
AlexHi Alejandro,
It can only accept the literal "pid" string:
Then 'pid' should be in bold (B), not italics (I).
Quoted 9 lines
# 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
Hmmm, makes sense.
So, it contains:
/proc/<pid>
/proc/<tid>/proc/self/proc/thread-self
And all others are gone, right?
Is anything else included? Or is anything within those dirs gone?
Have a lovely day!
Alex
Quoted 6 lines
Regards,
Signature · 3 lines
Matteo Croce perl -e 'for($t=0;;$t++){print chr($t*($t>>8|$t>>13)&255)}' |aplay
lol! It keeps funny for a surprising long time.
Signature · 3 lines
<https://www.alejandro-colomar.es/> A client is hiring kernel driver, mm, and/or crypto developers; contact me if interested.
Il giorno mar 14 mag 2024 alle ore 21:06 Alejandro Colomar <[email protected]> ha scritto:
Quoted 10 lines
Hi Matteo,
Quoted 6 lines · Matteo Croce
Il giorno mar 14 mag 2024 alle ore 20:08 Alejandro Colomar <[email protected]> ha scritto:
Quoted 4 lines
What is the accepted format? A CSV of pid numbers?
Quoted 9 lines
Quoted 6 lines
Quoted 3 lines
Have a lovely day!
AlexHi Alejandro,
It can only accept the literal "pid" string:Then 'pid' should be in bold (B), not italics (I).
Ok, I will send a v2
Quoted 14 lines
Quoted 9 lines
# 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/25146Hmmm, makes sense.
So, it contains:
Quoted 9 lines
/proc/<pid>
/proc/<tid>/proc/self/proc/thread-selfAnd all others are gone, right?
Is anything else included? Or is anything within those dirs gone?
Exactly, self and thread-self are the only non-numeric entries in that mounted procfs.
# ls pid |grep -vx '[[:digit:]]*' self thread-self #
Quoted 5 lines
Quoted 2 lines
perl -e 'for($t=0;;$t++){print chr($t*($t>>8|$t>>13)&255)}' |aplay
lol! It keeps funny for a surprising long time.
:)
Signature · 3 lines
Matteo Croce
perl -e 'for($t=0;;$t++){print chr($t*($t>>8|$t>>13)&255)}' |aplayAlejandro Colomar
maintainerHi Matteo,
Quoted 31 lines · Matteo Croce
Il giorno mar 14 mag 2024 alle ore 21:06 Alejandro Colomar <[email protected]> ha scritto:
Quoted 2 lines
Then 'pid' should be in bold (B), not italics (I).
Ok, I will send a v2
Quoted 14 lines
Quoted 9 lines
# 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/25146Hmmm, makes sense.
So, it contains:
Quoted 9 lines
/proc/<pid>
/proc/<tid>/proc/self/proc/thread-selfAnd all others are gone, right?
Is anything else included? Or is anything within those dirs gone?
Quoted 7 lines
Exactly, self and thread-self are the only non-numeric entries in that mounted procfs.
# ls pid |grep -vx '[[:digit:]]*' self thread-self #
Please document that in the commit message.
Have a lovely night!
Alex
Signature · 3 lines
<https://www.alejandro-colomar.es/> A client is hiring kernel driver, mm, and/or crypto developers; contact me if interested.