pydu/docs/process.rst

16 lines
452 B
ReStructuredText
Raw Normal View History

Process
-------
2018-03-10 05:12:01 +00:00
Utils for handling processes.
2018-01-27 03:06:47 +00:00
.. note:: ``pydu.process`` is based on ``psutil``. Need to ``pip install psutil`` first.
.. py:function:: pydu.process.get_processes_by_path(path)
Get processes which are running on given path or sub path of given path.
>>> from pydu.process import get_processes_by_path
>>> get_processes_by_path('/usr/bin/python')
[{'cmdline': '/usr/bin/python2.7', 'pid': 23383, 'name': 'python'}]