GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
POLLINFO(1) FreeBSD General Commands Manual POLLINFO(1)

pollinfolist file descriptors causing wait in poll and select

pollinfo [-v] [--id pid]

The pollinfo utility lists all threads (light-weigt processes, lwps) in the process specified by the id argument, which are sleeping in the select(2) or poll(2) families of syscalls. For each such thread, the list of the file descriptors passed to the syscall to wait for readiness, together with the type of the wait (read/write/exception) is printed.

If the -v option is specified, additional information about file descriptors is printed on the same line, in the format of the procstat(1) files subcommand.

Passing the -v option twice also prints internal debugging information about pollinfo running.

# ps l 2381
UID  PID PPID  C PRI NI   VSZ  RSS MWCHAN STAT TT     TIME COMMAND
123 2381    1 29  20  0 20584 5604 select Ss    -  0:00.39 /usr/sbin/ntpd -p /v
# pollinfo --id 2381 -v
lwp id 100259 (ntpd) selecting on:
      20 i    s - rw---n-- 1 0 UDP ::.123 ::.0
      21 i    s - rw---n-- 1 0 UDP *:123 *:0
      22 i    s - rw---n-- 1 0 UDP 192.168.130.12:123 *:0
      23 i    s - rw---n-- 1 0 UDP fe80::2a80:23ff:fea2:37bc.123 ::.0
      24 i    s - rw---n-- 1 0 UDP ::1.123 ::.0
      25 i    s - rw---n-- 1 0 UDP fe80::1.123 ::.0
      26 i    s - rw---n-- 1 0 UDP 127.0.0.1:123 *:0

procstat(1), select(2), poll(2), ppoll(2), pselect(2), ptrace(2)

pollinfo is FreeBSD -specific and only works on FreeBSD.

pollinfo uses ptrace(2) to attach to the target process and gather information about sleeping threads and syscall arguments. It needs permissions to attach, and it must be the only debugger, due to way the ptrace(2) facility work.

If the process debugging is disabled for the target, pollinfo cannot work.

Killing pollinfo while the utility is attached to the target, also kills the target.

Konstantin Belousov <kib@FreeBSD.org>.

April 4, 2025 FreeBSD 14.3-RELEASE

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.