• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

docs/H19-Dec-2020-4,7043,542

psutil/H03-May-2022-43,05132,208

psutil.egg-info/H03-May-2022-553482

scripts/H19-Dec-2020-4,9203,688

.coveragercH A D22-Nov-2020550 3331

.flake8H A D22-Nov-2020364 1513

.gitignoreH A D22-Nov-2020137 2019

CONTRIBUTING.mdH A D18-Dec-20201.5 KiB3429

CREDITSH A D18-Dec-202010.6 KiB728533

HISTORY.rstH A D19-Dec-2020191.1 KiB4,2473,772

INSTALL.rstH A D18-Dec-20202.8 KiB11675

LICENSEH A D22-Nov-20201.5 KiB3023

MANIFEST.inH A D19-Dec-20205 KiB154153

MakefileH A D19-Dec-202011.4 KiB331233

PKG-INFOH A D19-Dec-202025.5 KiB553482

README.rstH A D18-Dec-202019.6 KiB513439

make.batH A D22-Nov-20201.3 KiB3832

setup.cfgH A D19-Dec-202038 53

setup.pyH A D03-May-202215 KiB449375

README.rst

1|  |downloads| |stars| |forks| |contributors| |coverage| |quality|
2|  |version| |py-versions| |packages| |license|
3|  |github-actions| |appveyor| |doc| |twitter| |tidelift|
4
5.. |downloads| image:: https://img.shields.io/pypi/dm/psutil.svg
6    :target: https://pepy.tech/project/psutil
7    :alt: Downloads
8
9.. |stars| image:: https://img.shields.io/github/stars/giampaolo/psutil.svg
10    :target: https://github.com/giampaolo/psutil/stargazers
11    :alt: Github stars
12
13.. |forks| image:: https://img.shields.io/github/forks/giampaolo/psutil.svg
14    :target: https://github.com/giampaolo/psutil/network/members
15    :alt: Github forks
16
17.. |contributors| image:: https://img.shields.io/github/contributors/giampaolo/psutil.svg
18    :target: https://github.com/giampaolo/psutil/graphs/contributors
19    :alt: Contributors
20
21.. |quality| image:: https://img.shields.io/codacy/grade/ce63e7f7f69d44b5b59682196e6fbfca.svg
22    :target: https://www.codacy.com/app/g-rodola/psutil?utm_source=github.com&utm_medium=referral&utm_content=giampaolo/psutil&utm_campaign=Badge_Grade
23    :alt: Code quality
24
25.. |github-actions| image:: https://img.shields.io/github/workflow/status/giampaolo/psutil/CI?label=Linux%2C%20macOS%2C%20FreeBSD
26    :target: https://github.com/giampaolo/psutil/actions?query=workflow%3ACI
27    :alt: Linux, macOS, Windows tests
28
29.. |appveyor| image:: https://img.shields.io/appveyor/ci/giampaolo/psutil/master.svg?maxAge=3600&label=Windows
30    :target: https://ci.appveyor.com/project/giampaolo/psutil
31    :alt: Windows tests (Appveyor)
32
33.. |coverage| image:: https://coveralls.io/repos/github/giampaolo/psutil/badge.svg?branch=master
34    :target: https://coveralls.io/github/giampaolo/psutil?branch=master
35    :alt: Test coverage (coverall.io)
36
37.. |doc| image:: https://readthedocs.org/projects/psutil/badge/?version=latest
38    :target: http://psutil.readthedocs.io/en/latest/?badge=latest
39    :alt: Documentation Status
40
41.. |version| image:: https://img.shields.io/pypi/v/psutil.svg?label=pypi
42    :target: https://pypi.org/project/psutil
43    :alt: Latest version
44
45.. |py-versions| image:: https://img.shields.io/pypi/pyversions/psutil.svg
46    :target: https://pypi.org/project/psutil
47    :alt: Supported Python versions
48
49.. |packages| image:: https://repology.org/badge/tiny-repos/python:psutil.svg
50    :target: https://repology.org/metapackage/python:psutil/versions
51    :alt: Binary packages
52
53.. |license| image:: https://img.shields.io/pypi/l/psutil.svg
54    :target: https://github.com/giampaolo/psutil/blob/master/LICENSE
55    :alt: License
56
57.. |twitter| image:: https://img.shields.io/twitter/follow/grodola.svg?label=follow&style=flat&logo=twitter&logoColor=4FADFF
58    :target: https://twitter.com/grodola
59    :alt: Twitter Follow
60
61.. |tidelift| image:: https://tidelift.com/badges/github/giampaolo/psutil?style=flat
62    :target: https://tidelift.com/subscription/pkg/pypi-psutil?utm_source=pypi-psutil&utm_medium=referral&utm_campaign=readme
63    :alt: Tidelift
64
65-----
66
67.. raw:: html
68
69    <div align="center">
70        <a href="https://github.com/giampaolo/psutil"><img src="https://github.com/giampaolo/psutil/raw/master/docs/_static/psutil-logo.png" /></a>
71        <br />
72        <br />
73        <a href="https://github.com/giampaolo/psutil"><b>Home</b></a>&nbsp;&nbsp;&nbsp;
74        <a href="https://github.com/giampaolo/psutil/blob/master/INSTALL.rst"><b>Install</b></a>&nbsp;&nbsp;&nbsp;
75        <a href="https://psutil.readthedocs.io/"><b>Documentation</b></a>&nbsp;&nbsp;&nbsp;
76        <a href="https://pypi.org/project/psutil/#files"><b>Download</b></a>&nbsp;&nbsp;&nbsp;
77        <a href="https://groups.google.com/g/psutil"><b>Forum</b></a>&nbsp;&nbsp;&nbsp;
78        <a href="https://gmpy.dev/tags/psutil"><b>Blog</b></a>&nbsp;&nbsp;&nbsp;
79        <a href="#funding"><b>Funding</b></a>&nbsp;&nbsp;&nbsp;
80        <a href="https://github.com/giampaolo/psutil/blob/master/HISTORY.rst"><b>What's new</b></a>&nbsp;&nbsp;&nbsp;
81    </div>
82
83Summary
84=======
85
86psutil (process and system utilities) is a cross-platform library for
87retrieving information on **running processes** and **system utilization**
88(CPU, memory, disks, network, sensors) in Python.
89It is useful mainly for **system monitoring**, **profiling and limiting process
90resources** and **management of running processes**.
91It implements many functionalities offered by classic UNIX command line tools
92such as *ps, top, iotop, lsof, netstat, ifconfig, free* and others.
93psutil currently supports the following platforms:
94
95- **Linux**
96- **Windows**
97- **macOS**
98- **FreeBSD, OpenBSD**, **NetBSD**
99- **Sun Solaris**
100- **AIX**
101
102Supported Python versions are **2.6**, **2.7**, **3.4+** and
103`PyPy <http://pypy.org/>`__.
104
105Funding
106=======
107
108While psutil is free software and will always be, the project would benefit
109immensely from some funding.
110Keeping up with bug reports and maintenance has become hardly sustainable for
111me alone in terms of time.
112If you're a company that's making significant use of psutil you can consider
113becoming a sponsor via `GitHub <https://github.com/sponsors/giampaolo>`__,
114`Open Collective <https://opencollective.com/psutil>`__ or
115`PayPal <https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A9ZS7PKKRM3S8>`__
116and have your logo displayed in here and psutil `doc <https://psutil.readthedocs.io>`__.
117
118Sponsors
119========
120
121.. raw:: html
122
123    <div>
124        <a href="https://tidelift.com/subscription/pkg/pypi-psutil?utm_source=pypi-psutil&utm_medium=referral&utm_campaign=readme">
125            <img src="https://github.com/giampaolo/psutil/raw/master/docs/_static/tidelift-logo.png" />
126        </a>
127    </div>
128    <sup><a href="https://github.com/sponsors/giampaolo">add your logo</a></sup>
129
130Supporters
131==========
132
133None yet.
134
135.. raw:: html
136
137    <sup><a href="https://github.com/sponsors/giampaolo">add your avatar</a></sup>
138
139Contributing
140============
141
142See `CONTRIBUTING.md <https://github.com/giampaolo/psutil/blob/master/CONTRIBUTING.md>`__ guidelines.
143
144Example usages
145==============
146
147This represents pretty much the whole psutil API.
148
149CPU
150---
151
152.. code-block:: python
153
154    >>> import psutil
155    >>>
156    >>> psutil.cpu_times()
157    scputimes(user=3961.46, nice=169.729, system=2150.659, idle=16900.540, iowait=629.59, irq=0.0, softirq=19.42, steal=0.0, guest=0, nice=0.0)
158    >>>
159    >>> for x in range(3):
160    ...     psutil.cpu_percent(interval=1)
161    ...
162    4.0
163    5.9
164    3.8
165    >>>
166    >>> for x in range(3):
167    ...     psutil.cpu_percent(interval=1, percpu=True)
168    ...
169    [4.0, 6.9, 3.7, 9.2]
170    [7.0, 8.5, 2.4, 2.1]
171    [1.2, 9.0, 9.9, 7.2]
172    >>>
173    >>> for x in range(3):
174    ...     psutil.cpu_times_percent(interval=1, percpu=False)
175    ...
176    scputimes(user=1.5, nice=0.0, system=0.5, idle=96.5, iowait=1.5, irq=0.0, softirq=0.0, steal=0.0, guest=0.0, guest_nice=0.0)
177    scputimes(user=1.0, nice=0.0, system=0.0, idle=99.0, iowait=0.0, irq=0.0, softirq=0.0, steal=0.0, guest=0.0, guest_nice=0.0)
178    scputimes(user=2.0, nice=0.0, system=0.0, idle=98.0, iowait=0.0, irq=0.0, softirq=0.0, steal=0.0, guest=0.0, guest_nice=0.0)
179    >>>
180    >>> psutil.cpu_count()
181    4
182    >>> psutil.cpu_count(logical=False)
183    2
184    >>>
185    >>> psutil.cpu_stats()
186    scpustats(ctx_switches=20455687, interrupts=6598984, soft_interrupts=2134212, syscalls=0)
187    >>>
188    >>> psutil.cpu_freq()
189    scpufreq(current=931.42925, min=800.0, max=3500.0)
190    >>>
191    >>> psutil.getloadavg()  # also on Windows (emulated)
192    (3.14, 3.89, 4.67)
193
194Memory
195------
196
197.. code-block:: python
198
199    >>> psutil.virtual_memory()
200    svmem(total=10367352832, available=6472179712, percent=37.6, used=8186245120, free=2181107712, active=4748992512, inactive=2758115328, buffers=790724608, cached=3500347392, shared=787554304)
201    >>> psutil.swap_memory()
202    sswap(total=2097147904, used=296128512, free=1801019392, percent=14.1, sin=304193536, sout=677842944)
203    >>>
204
205Disks
206-----
207
208.. code-block:: python
209
210    >>> psutil.disk_partitions()
211    [sdiskpart(device='/dev/sda1', mountpoint='/', fstype='ext4', opts='rw,nosuid', maxfile=255, maxpath=4096),
212     sdiskpart(device='/dev/sda2', mountpoint='/home', fstype='ext, opts='rw', maxfile=255, maxpath=4096)]
213    >>>
214    >>> psutil.disk_usage('/')
215    sdiskusage(total=21378641920, used=4809781248, free=15482871808, percent=22.5)
216    >>>
217    >>> psutil.disk_io_counters(perdisk=False)
218    sdiskio(read_count=719566, write_count=1082197, read_bytes=18626220032, write_bytes=24081764352, read_time=5023392, write_time=63199568, read_merged_count=619166, write_merged_count=812396, busy_time=4523412)
219    >>>
220
221Network
222-------
223
224.. code-block:: python
225
226    >>> psutil.net_io_counters(pernic=True)
227    {'eth0': netio(bytes_sent=485291293, bytes_recv=6004858642, packets_sent=3251564, packets_recv=4787798, errin=0, errout=0, dropin=0, dropout=0),
228     'lo': netio(bytes_sent=2838627, bytes_recv=2838627, packets_sent=30567, packets_recv=30567, errin=0, errout=0, dropin=0, dropout=0)}
229    >>>
230    >>> psutil.net_connections(kind='tcp')
231    [sconn(fd=115, family=<AddressFamily.AF_INET: 2>, type=<SocketType.SOCK_STREAM: 1>, laddr=addr(ip='10.0.0.1', port=48776), raddr=addr(ip='93.186.135.91', port=80), status='ESTABLISHED', pid=1254),
232     sconn(fd=117, family=<AddressFamily.AF_INET: 2>, type=<SocketType.SOCK_STREAM: 1>, laddr=addr(ip='10.0.0.1', port=43761), raddr=addr(ip='72.14.234.100', port=80), status='CLOSING', pid=2987),
233     ...]
234    >>>
235    >>> psutil.net_if_addrs()
236    {'lo': [snicaddr(family=<AddressFamily.AF_INET: 2>, address='127.0.0.1', netmask='255.0.0.0', broadcast='127.0.0.1', ptp=None),
237            snicaddr(family=<AddressFamily.AF_INET6: 10>, address='::1', netmask='ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff', broadcast=None, ptp=None),
238            snicaddr(family=<AddressFamily.AF_LINK: 17>, address='00:00:00:00:00:00', netmask=None, broadcast='00:00:00:00:00:00', ptp=None)],
239     'wlan0': [snicaddr(family=<AddressFamily.AF_INET: 2>, address='192.168.1.3', netmask='255.255.255.0', broadcast='192.168.1.255', ptp=None),
240               snicaddr(family=<AddressFamily.AF_INET6: 10>, address='fe80::c685:8ff:fe45:641%wlan0', netmask='ffff:ffff:ffff:ffff::', broadcast=None, ptp=None),
241               snicaddr(family=<AddressFamily.AF_LINK: 17>, address='c4:85:08:45:06:41', netmask=None, broadcast='ff:ff:ff:ff:ff:ff', ptp=None)]}
242    >>>
243    >>> psutil.net_if_stats()
244    {'lo': snicstats(isup=True, duplex=<NicDuplex.NIC_DUPLEX_UNKNOWN: 0>, speed=0, mtu=65536),
245     'wlan0': snicstats(isup=True, duplex=<NicDuplex.NIC_DUPLEX_FULL: 2>, speed=100, mtu=1500)}
246    >>>
247
248Sensors
249-------
250
251.. code-block:: python
252
253    >>> import psutil
254    >>> psutil.sensors_temperatures()
255    {'acpitz': [shwtemp(label='', current=47.0, high=103.0, critical=103.0)],
256     'asus': [shwtemp(label='', current=47.0, high=None, critical=None)],
257     'coretemp': [shwtemp(label='Physical id 0', current=52.0, high=100.0, critical=100.0),
258                  shwtemp(label='Core 0', current=45.0, high=100.0, critical=100.0)]}
259    >>>
260    >>> psutil.sensors_fans()
261    {'asus': [sfan(label='cpu_fan', current=3200)]}
262    >>>
263    >>> psutil.sensors_battery()
264    sbattery(percent=93, secsleft=16628, power_plugged=False)
265    >>>
266
267Other system info
268-----------------
269
270.. code-block:: python
271
272    >>> import psutil
273    >>> psutil.users()
274    [suser(name='giampaolo', terminal='pts/2', host='localhost', started=1340737536.0, pid=1352),
275     suser(name='giampaolo', terminal='pts/3', host='localhost', started=1340737792.0, pid=1788)]
276    >>>
277    >>> psutil.boot_time()
278    1365519115.0
279    >>>
280
281Process management
282------------------
283
284.. code-block:: python
285
286    >>> import psutil
287    >>> psutil.pids()
288    [1, 2, 3, 4, 5, 6, 7, 46, 48, 50, 51, 178, 182, 222, 223, 224, 268, 1215,
289     1216, 1220, 1221, 1243, 1244, 1301, 1601, 2237, 2355, 2637, 2774, 3932,
290     4176, 4177, 4185, 4187, 4189, 4225, 4243, 4245, 4263, 4282, 4306, 4311,
291     4312, 4313, 4314, 4337, 4339, 4357, 4358, 4363, 4383, 4395, 4408, 4433,
292     4443, 4445, 4446, 5167, 5234, 5235, 5252, 5318, 5424, 5644, 6987, 7054,
293     7055, 7071]
294    >>>
295    >>> p = psutil.Process(7055)
296    >>> p
297    psutil.Process(pid=7055, name='python3', status='running', started='09:04:44')
298    >>> p.name()
299    'python'
300    >>> p.exe()
301    '/usr/bin/python'
302    >>> p.cwd()
303    '/home/giampaolo'
304    >>> p.cmdline()
305    ['/usr/bin/python', 'main.py']
306    >>>
307    >>> p.pid
308    7055
309    >>> p.ppid()
310    7054
311    >>> p.children(recursive=True)
312    [psutil.Process(pid=29835, name='python3', status='sleeping', started='11:45:38'),
313     psutil.Process(pid=29836, name='python3', status='waking', started='11:43:39')]
314    >>>
315    >>> p.parent()
316    psutil.Process(pid=4699, name='bash', status='sleeping', started='09:06:44')
317    >>> p.parents()
318    [psutil.Process(pid=4699, name='bash', started='09:06:44'),
319     psutil.Process(pid=4689, name='gnome-terminal-server', status='sleeping', started='0:06:44'),
320     psutil.Process(pid=1, name='systemd', status='sleeping', started='05:56:55')]
321    >>>
322    >>> p.status()
323    'running'
324    >>> p.username()
325    'giampaolo'
326    >>> p.create_time()
327    1267551141.5019531
328    >>> p.terminal()
329    '/dev/pts/0'
330    >>>
331    >>> p.uids()
332    puids(real=1000, effective=1000, saved=1000)
333    >>> p.gids()
334    pgids(real=1000, effective=1000, saved=1000)
335    >>>
336    >>> p.cpu_times()
337    pcputimes(user=1.02, system=0.31, children_user=0.32, children_system=0.1, iowait=0.0)
338    >>> p.cpu_percent(interval=1.0)
339    12.1
340    >>> p.cpu_affinity()
341    [0, 1, 2, 3]
342    >>> p.cpu_affinity([0, 1])  # set
343    >>> p.cpu_num()
344    1
345    >>>
346    >>> p.memory_info()
347    pmem(rss=10915840, vms=67608576, shared=3313664, text=2310144, lib=0, data=7262208, dirty=0)
348    >>> p.memory_full_info()  # "real" USS memory usage (Linux, macOS, Win only)
349    pfullmem(rss=10199040, vms=52133888, shared=3887104, text=2867200, lib=0, data=5967872, dirty=0, uss=6545408, pss=6872064, swap=0)
350    >>> p.memory_percent()
351    0.7823
352    >>> p.memory_maps()
353    [pmmap_grouped(path='/lib/x8664-linux-gnu/libutil-2.15.so', rss=32768, size=2125824, pss=32768, shared_clean=0, shared_dirty=0, private_clean=20480, private_dirty=12288, referenced=32768, anonymous=12288, swap=0),
354     pmmap_grouped(path='/lib/x8664-linux-gnu/libc-2.15.so', rss=3821568, size=3842048, pss=3821568, shared_clean=0, shared_dirty=0, private_clean=0, private_dirty=3821568, referenced=3575808, anonymous=3821568, swap=0),
355     pmmap_grouped(path='[heap]',  rss=32768, size=139264, pss=32768, shared_clean=0, shared_dirty=0, private_clean=0, private_dirty=32768, referenced=32768, anonymous=32768, swap=0),
356     pmmap_grouped(path='[stack]', rss=2465792, size=2494464, pss=2465792, shared_clean=0, shared_dirty=0, private_clean=0, private_dirty=2465792, referenced=2277376, anonymous=2465792, swap=0),
357     ...]
358    >>>
359    >>> p.io_counters()
360    pio(read_count=478001, write_count=59371, read_bytes=700416, write_bytes=69632, read_chars=456232, write_chars=517543)
361    >>>
362    >>> p.open_files()
363    [popenfile(path='/home/giampaolo/monit.py', fd=3, position=0, mode='r', flags=32768),
364     popenfile(path='/var/log/monit.log', fd=4, position=235542, mode='a', flags=33793)]
365    >>>
366    >>> p.connections(kind='tcp')
367    [pconn(fd=115, family=<AddressFamily.AF_INET: 2>, type=<SocketType.SOCK_STREAM: 1>, laddr=addr(ip='10.0.0.1', port=48776), raddr=addr(ip='93.186.135.91', port=80), status='ESTABLISHED'),
368     pconn(fd=117, family=<AddressFamily.AF_INET: 2>, type=<SocketType.SOCK_STREAM: 1>, laddr=addr(ip='10.0.0.1', port=43761), raddr=addr(ip='72.14.234.100', port=80), status='CLOSING')]
369    >>>
370    >>> p.num_threads()
371    4
372    >>> p.num_fds()
373    8
374    >>> p.threads()
375    [pthread(id=5234, user_time=22.5, system_time=9.2891),
376     pthread(id=5237, user_time=0.0707, system_time=1.1)]
377    >>>
378    >>> p.num_ctx_switches()
379    pctxsw(voluntary=78, involuntary=19)
380    >>>
381    >>> p.nice()
382    0
383    >>> p.nice(10)  # set
384    >>>
385    >>> p.ionice(psutil.IOPRIO_CLASS_IDLE)  # IO priority (Win and Linux only)
386    >>> p.ionice()
387    pionice(ioclass=<IOPriority.IOPRIO_CLASS_IDLE: 3>, value=0)
388    >>>
389    >>> p.rlimit(psutil.RLIMIT_NOFILE, (5, 5))  # set resource limits (Linux only)
390    >>> p.rlimit(psutil.RLIMIT_NOFILE)
391    (5, 5)
392    >>>
393    >>> p.environ()
394    {'LC_PAPER': 'it_IT.UTF-8', 'SHELL': '/bin/bash', 'GREP_OPTIONS': '--color=auto',
395    'XDG_CONFIG_DIRS': '/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg',
396     ...}
397    >>>
398    >>> p.as_dict()
399    {'status': 'running', 'num_ctx_switches': pctxsw(voluntary=63, involuntary=1), 'pid': 5457, ...}
400    >>> p.is_running()
401    True
402    >>> p.suspend()
403    >>> p.resume()
404    >>>
405    >>> p.terminate()
406    >>> p.kill()
407    >>> p.wait(timeout=3)
408    <Exitcode.EX_OK: 0>
409    >>>
410    >>> psutil.test()
411    USER         PID %CPU %MEM     VSZ     RSS TTY        START    TIME  COMMAND
412    root           1  0.0  0.0   24584    2240            Jun17   00:00  init
413    root           2  0.0  0.0       0       0            Jun17   00:00  kthreadd
414    ...
415    giampaolo  31475  0.0  0.0   20760    3024 /dev/pts/0 Jun19   00:00  python2.4
416    giampaolo  31721  0.0  2.2  773060  181896            00:04   10:30  chrome
417    root       31763  0.0  0.0       0       0            00:05   00:00  kworker/0:1
418    >>>
419
420Further process APIs
421--------------------
422
423.. code-block:: python
424
425    >>> import psutil
426    >>> for proc in psutil.process_iter(['pid', 'name']):
427    ...     print(proc.info)
428    ...
429    {'pid': 1, 'name': 'systemd'}
430    {'pid': 2, 'name': 'kthreadd'}
431    {'pid': 3, 'name': 'ksoftirqd/0'}
432    ...
433    >>>
434    >>> psutil.pid_exists(3)
435    True
436    >>>
437    >>> def on_terminate(proc):
438    ...     print("process {} terminated".format(proc))
439    ...
440    >>> # waits for multiple processes to terminate
441    >>> gone, alive = psutil.wait_procs(procs_list, timeout=3, callback=on_terminate)
442    >>>
443
444Popen wrapper:
445
446.. code-block:: python
447
448    >>> import psutil
449    >>> from subprocess import PIPE
450    >>> p = psutil.Popen(["/usr/bin/python", "-c", "print('hello')"], stdout=PIPE)
451    >>> p.name()
452    'python'
453    >>> p.username()
454    'giampaolo'
455    >>> p.communicate()
456    ('hello\n', None)
457    >>> p.wait(timeout=2)
458    0
459    >>>
460
461Windows services
462----------------
463
464.. code-block:: python
465
466    >>> list(psutil.win_service_iter())
467    [<WindowsService(name='AeLookupSvc', display_name='Application Experience') at 38850096>,
468     <WindowsService(name='ALG', display_name='Application Layer Gateway Service') at 38850128>,
469     <WindowsService(name='APNMCP', display_name='Ask Update Service') at 38850160>,
470     <WindowsService(name='AppIDSvc', display_name='Application Identity') at 38850192>,
471     ...]
472    >>> s = psutil.win_service_get('alg')
473    >>> s.as_dict()
474    {'binpath': 'C:\\Windows\\System32\\alg.exe',
475     'description': 'Provides support for 3rd party protocol plug-ins for Internet Connection Sharing',
476     'display_name': 'Application Layer Gateway Service',
477     'name': 'alg',
478     'pid': None,
479     'start_type': 'manual',
480     'status': 'stopped',
481     'username': 'NT AUTHORITY\\LocalService'}
482
483Projects using psutil
484=====================
485
486Here's some I find particularly interesting:
487
488- https://github.com/google/grr
489- https://github.com/facebook/osquery/
490- https://github.com/nicolargo/glances
491- https://github.com/Jahaja/psdash
492- https://github.com/ajenti/ajenti
493- https://github.com/home-assistant/home-assistant/
494
495Portings
496========
497
498- Go: https://github.com/shirou/gopsutil
499- C: https://github.com/hamon-in/cpslib
500- Rust: https://github.com/rust-psutil/rust-psutil
501- Nim: https://github.com/johnscillieri/psutil-nim
502
503Security
504========
505
506To report a security vulnerability, please use the `Tidelift security
507contact`_.  Tidelift will coordinate the fix and disclosure.
508
509.. _`Giampaolo Rodola`: https://gmpy.dev/about
510.. _`donation`: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A9ZS7PKKRM3S8
511.. _Tidelift security contact: https://tidelift.com/security
512.. _Tidelift Subscription: https://tidelift.com/subscription/pkg/pypi-psutil?utm_source=pypi-psutil&utm_medium=referral&utm_campaign=readme
513