Skip to main content
procfs3
-------

procfs3 is a python3 version of procfs <https://github.com/pmuller/procfs>.
It was converted using 2to3 with some manual fixes and some tests thrown in.
To run the tests, run::
python3 tests/doctests.py

Easy to use
```````````

::

>>> from procfs import Proc
>>> proc = Proc()

>>> proc.loadavg
{'average': {1: 0.0, 5: 0.0, 15: 0.0},
'entities': {'current': 1, 'total': 117},
'last_pid': 3068}

>>> proc.net.dev.eth1.receive.bytes
117997558

>>> proc.meminfo.MemFree
57044

>>> proc.net.snmp.Udp
{'InDatagrams': 3394, 'OutDatagrams': 3399, 'RcvbufErrors': 0,
'InErrors': 0, 'SndbufErrors': 0, 'NoPorts': 4}


Process information
```````````````````

::

>>> proc.self
<Process 3068: python>

>>> proc.self.parent
<Process 17423: bash>

>>> proc.self.uptime
datetime.timedelta(0, 346, 380262)

>>> proc.processes
<Processes: [<Process 1: init>, <Process 2: kthreadd>, <Process 3: migration/0>, <Process 4: ksoftirqd/0>, <Process 5: watchdog/0>, <Process 6: migration/1>, <Process 7: ksoftirqd/1>, <Process 8: watchdog/1>, <Process 9: events/0>, <Process 10: events/1>, ...]>
>>> len(proc.processes)
110

>>> proc.processes.cmdline('(vim|ssh)')
<Processes: [<Process 2956: vim>, <Process 3044: vim>, <Process 3136: vim>, <Process 10422: sshd>, <Process 10440: sshd>, <Process 10504: sshd>]>

>>> proc.processes.uid(1000)
<Processes: [<Process 1120: bash>, <Process 2593: bash>, <Process 2956: vim>, <Process 3044: vim>, <Process 3093: python>, <Process 10504: sshd>, <Process 10505: bash>, <Process 10875: screen>, <Process 10876: screen>, <Process 12908: bash>, ...]>

>>> proc.processes.user('pmuller').cmdline('python')[0]
<Process 3093: python>


Links
`````

* `github <http://github.com/galini/procfs3>`_

Metadata

Release files for procfs3 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for procfs3 0.1.3
File Size Uploaded
procfs3-0.1.3.tar.gz 13.7 kB Details

Release files / procfs3-0.1.3.tar.gz

Download URL procfs3-0.1.3.tar.gz
Size 13.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8e7a1feca0b312d81004b18346861f31de6e9131d96a3ed5f9a8b458bf1f6455
BLAKE2b-256 checksum
How to use checksums
e9a872e373e766750b19218931af6a586d49fa7f5d5d9021888f8814192c89c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.3 This release

1 release file

0.1.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page