git: f56e0d4755c5 - main - procstat: Add handling for inotify descriptors
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 04 Jul 2025 14:56:07 UTC
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=f56e0d4755c521b50bf313a85fd399c2b6a7a4bb
commit f56e0d4755c521b50bf313a85fd399c2b6a7a4bb
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2025-06-09 20:11:08 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2025-07-04 14:42:34 +0000
procstat: Add handling for inotify descriptors
MFC after: 3 months
Sponsored by: Klara, Inc.
---
usr.bin/procstat/procstat.1 | 3 +++
usr.bin/procstat/procstat_files.c | 9 +++++++++
2 files changed, 12 insertions(+)
diff --git a/usr.bin/procstat/procstat.1 b/usr.bin/procstat/procstat.1
index cc775ffe133b..1e05e235e619 100644
--- a/usr.bin/procstat/procstat.1
+++ b/usr.bin/procstat/procstat.1
@@ -377,6 +377,8 @@ eventfd
fifo
.It h
shared memory
+.It i
+inotify descriptor
.It k
kqueue
.It m
@@ -862,6 +864,7 @@ procstat: procstat_getprocs()
.Xr sockstat 1 ,
.Xr cap_enter 2 ,
.Xr cap_rights_limit 2 ,
+.Xr inotify 2 ,
.Xr mlock 2 ,
.Xr mlockall 2 ,
.Xr libprocstat 3 ,
diff --git a/usr.bin/procstat/procstat_files.c b/usr.bin/procstat/procstat_files.c
index d61cf1693053..aa4850632aa7 100644
--- a/usr.bin/procstat/procstat_files.c
+++ b/usr.bin/procstat/procstat_files.c
@@ -226,6 +226,10 @@ static struct cap_desc {
{ CAP_BINDAT, "ba" },
{ CAP_CONNECTAT, "ca" },
+ /* Inotify descriptor rights. */
+ { CAP_INOTIFY_ADD, "ina" },
+ { CAP_INOTIFY_RM, "inr" },
+
/* Aliases and defines that combine multiple rights. */
{ CAP_PREAD, "prd" },
{ CAP_PWRITE, "pwr" },
@@ -416,6 +420,11 @@ procstat_files(struct procstat *procstat, struct kinfo_proc *kipp)
xo_emit("{eq:fd_type/eventfd}");
break;
+ case PS_FST_TYPE_INOTIFY:
+ str = "i";
+ xo_emit("{eq:fd_type/inotify}");
+ break;
+
case PS_FST_TYPE_NONE:
str = "?";
xo_emit("{eq:fd_type/none}");