Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type OpenFile ¶
type OpenFile struct {
Command string `json:"command"`
PID int32 `json:"pid"`
User string `json:"user"`
FD string `json:"fd"`
Type string `json:"type"`
Device string `json:"device,omitempty"`
Size int64 `json:"size,omitempty"`
Node string `json:"node,omitempty"`
Name string `json:"name"`
State string `json:"state,omitempty"`
Protocol string `json:"protocol,omitempty"`
LocalIP string `json:"local_ip,omitempty"`
LocalPort uint32 `json:"local_port,omitempty"`
RemoteIP string `json:"remote_ip,omitempty"`
RemotePort uint32 `json:"remote_port,omitempty"`
}
OpenFile represents an open file or network connection
type Options ¶
type Options struct {
PID int // -p: show files for specific PID
User string // -u: show files for specific user
Port int // -i: show files using specific port
Protocol string // -i: filter by protocol (tcp, udp)
Network bool // -i: show network files only
Files bool // show file descriptors (default behavior)
Command string // -c: filter by command name prefix
NoHeaders bool // -n: don't print headers
JSON bool // -j: output as JSON
IPv4 bool // -4: show only IPv4
IPv6 bool // -6: show only IPv6
Listen bool // show only listening sockets
Established bool // show only established connections
}
Options configures the lsof command behavior
Click to show internal directories.
Click to hide internal directories.