Giter Club home page Giter Club logo

psutil-extra's Introduction

psutil-extra

PyPI Python Versions Documentation Status GitHub Actions Cirrus CI codecov

Some helper functions to go along with the ones in psutil.

Documentation

Examples

>>> import os
>>> import resource
>>> import psutil
>>> import psutil_extra
>>> proc = psutil.Process()
>>> os.getgroups()
[1000]
>>> psutil_extra.proc_getgroups(proc)  # Availability: Linux, macOS, FreeBSD, OpenBSD, NetBSD, DragonFlyBSD, Solaris
[1000]
>>> psutil_extra.proc_get_umask(proc)  # Availability: Linux (kernel 4.7 or newer), FreeBSD
18
>>> resource.getrlimit(resource.RLIMIT_NOFILE)
(1024, 524288)
>>> psutil_extra.proc_rlimit(proc, resource.RLIMIT_NOFILE)  # Availability: Linux, FreeBSD, NetBSD
(1024, 524288)
>>> psutil_extra.proc_get_sigmasks()  # Availability: Linux, macOS, FreeBSD, OpenBSD, NetBSD, DragonFlyBSD
ProcessSignalMasks(pending=set(), blocked=set(), ignored={25, 13}, caught={32, 33, 2, 28}, process_pending=set())

Platform support

The following platforms have first-class support (the CI builds run tests on these platforms, and all available interfaces should work properly):

  • Linux
  • macOS
  • FreeBSD

In addition, psutil_extra should work on the following platforms, but no testing has been performed:

  • OpenBSD
  • NetBSD
  • DragonFlyBSD
  • Solaris

Some notes:

  • Windows support is not planned. Most of the interfaces that psutil_extra currently supports are fairly Unix-specific.
  • Most of psutil_extra's interfaces work on Windows Subsystem for Linux, but some of them don't work properly on WSL 1. See the documentation for more details.

psutil-extra's People

Contributors

cptpcrd avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.