You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documented feature of filtering processes that use UDP protocol with the specified state does not work on the latest (at the time of writing this) version of macOS Sonoma 14.6.
To Reproduce
Steps to reproduce the behavior (tried both the macOS supplied lsof revision 4.91 and the latest version 4.99.3 installed using Homebrew):
Run this example from the lsof man documentation: sudo lsof -iUDP -sUDP:Idle
See error:
lsof: unknown -s protocol: "UDP:Idle"
Expected behavior
The normal output showing the results if present.
Program output
lsof: unknown -s protocol: "UDP:Idle"
lsof 4.91
latest revision: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/
latest FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ
latest man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man
usage: [-?abhlnNoOPRtUvVX] [+|-c c] [+|-d s] [+D D] [+|-f[cgG]]
[-F [f]] [-g [s]] [-i [i]] [+|-L [l]] [+|-M] [-o [o]] [-p s]
[+|-r [t]] [-s [p:s]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [--] [names]
Use the ``-h'' option to get more help information.
Environment (please complete the following information):
Kernel: Darwin Kernel Version 23.6.0
OS: macOS Sonoma 14.6 (23G80)
lsof Version: 4.91 and 4.99.3
Origin: version 4.91 that came with macOS and version 4.99.3 that was installed using Homebrew
Additional context
Quote from the man lsof documentation:
Two common UDP state names are Unbound and Idle.
The text was updated successfully, but these errors were encountered:
informatik01
changed the title
[BUG]
[BUG] Cannot specify state for UDP protocol
Aug 4, 2024
The real problem is, the macOS kernel does not provide the information to lsof: no UDP socket info in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/proc_info.h
@jiegec
So there is no solution / workaround to this problem?
If not, at least it would be nice to mention such moments in the man documentation to avoid confusion. It's not uncommon to mention platform specific nuances in the documentation so that users would be aware etc.
@jiegec So there is no solution / workaround to this problem?
No that I am aware as of now. But I am not expert on this, you could investigate further to see if there is such way to find status.
If not, at least it would be nice to mention such moments in the man documentation to avoid confusion. It's not uncommon to mention platform specific nuances in the documentation so that users would be aware etc.
Describe the bug
The documented feature of filtering processes that use UDP protocol with the specified state does not work on the latest (at the time of writing this) version of macOS Sonoma 14.6.
To Reproduce
Steps to reproduce the behavior (tried both the macOS supplied lsof revision 4.91 and the latest version 4.99.3 installed using Homebrew):
sudo lsof -iUDP -sUDP:Idle
Expected behavior
The normal output showing the results if present.
Program output
Environment (please complete the following information):
4.91
and4.99.3
Additional context
Quote from the
man lsof
documentation:The text was updated successfully, but these errors were encountered: