Skip to content

Commit 1b782b3

Browse files
committed
Add proc pids
1 parent d5cdc3c commit 1b782b3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

linuxpy/proc.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,3 +241,11 @@ def snmp():
241241
SNMP statistics.
242242
"""
243243
return dict(iter_snmp())
244+
245+
246+
def iter_pids():
247+
return (int(item.name) for item in PROC_PATH.iterdir() if item.name.isdigit())
248+
249+
250+
def pids():
251+
return tuple(iter_pids())

0 commit comments

Comments
 (0)