2015-01-11 10:17:10 +00:00
|
|
|
table_name("process_open_sockets")
|
2015-02-07 03:05:50 +00:00
|
|
|
description("Processes which have open network sockets on the system.")
|
2015-01-11 10:17:10 +00:00
|
|
|
schema([
|
2015-06-01 22:53:52 +00:00
|
|
|
Column("pid", INTEGER, "Process (or thread) ID", index=True),
|
2015-10-26 08:14:51 +00:00
|
|
|
Column("fd", BIGINT, "Socket file descriptor number"),
|
|
|
|
Column("socket", BIGINT, "Socket handle or inode number"),
|
2015-02-10 04:13:11 +00:00
|
|
|
Column("family", INTEGER, "Network protocol (IPv4, IPv6)"),
|
|
|
|
Column("protocol", INTEGER, "Transport protocol (TCP/UDP)"),
|
|
|
|
Column("local_address", TEXT, "Socket local address"),
|
|
|
|
Column("remote_address", TEXT, "Socket remote address"),
|
|
|
|
Column("local_port", INTEGER, "Socket local port"),
|
|
|
|
Column("remote_port", INTEGER, "Socket remote port"),
|
2015-06-06 08:59:04 +00:00
|
|
|
Column("path", TEXT, "For UNIX sockets (family=AF_UNIX), the domain path"),
|
2015-01-11 10:17:10 +00:00
|
|
|
])
|
2019-11-01 00:17:24 +00:00
|
|
|
extended_schema(lambda: LINUX() or DARWIN() or WINDOWS(), [
|
2018-02-22 00:36:51 +00:00
|
|
|
Column("state", TEXT, "TCP socket state"),
|
2018-05-15 10:28:42 +00:00
|
|
|
])
|
|
|
|
extended_schema(LINUX, [
|
2018-02-22 00:36:51 +00:00
|
|
|
Column("net_namespace", TEXT, "The inode number of the network namespace"),
|
|
|
|
])
|
2015-01-11 10:17:10 +00:00
|
|
|
implementation("system/process_open_sockets@genOpenSockets")
|
2015-06-01 22:53:52 +00:00
|
|
|
examples([
|
|
|
|
"select * from process_open_sockets where pid = 1",
|
|
|
|
])
|