# resource - pydoc - phpman

Help on module resource:

## NAME
    resource

## MODULE REFERENCE
    <https://docs.python.org/3.10/library/resource.html>

    The following documentation is automatically generated from the Python
    source files.  It may be incomplete, incorrect or include features that
    are considered implementation detail and may vary between Python
    implementations.  When in doubt, consult the module reference at the
    location listed above.

## CLASSES
    builtins.tuple(builtins.object)
        struct_rusage

### class struct_rusage
     |  struct_rusage(iterable=(), /)
     |
     |  struct_rusage: Result from getrusage.
     |
     |  This object may be accessed either as a tuple of
     |      (utime,stime,maxrss,ixrss,idrss,isrss,minflt,majflt,
     |      nswap,inblock,oublock,msgsnd,msgrcv,nsignals,nvcsw,nivcsw)
     |  or via the attributes ru_utime, ru_stime, ru_maxrss, and so on.
     |
     |  Method resolution order:
     |      struct_rusage
     |      builtins.tuple
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  __reduce__(...)
     |      Helper for pickle.
     |
     |  __repr__(self, /)
     |      Return repr(self).
     |
     |  ----------------------------------------------------------------------
     |  Static methods defined here:
     |
     |  __new__(*args, **kwargs) from builtins.type
     |      Create and return a new object.  See help(type) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  ru_idrss
     |      unshared data size
     |
     |  ru_inblock
     |      block input operations
     |
     |  ru_isrss
     |      unshared stack size
     |
     |  ru_ixrss
     |      shared memory size
     |
     |  ru_majflt
     |      page faults requiring I/O
     |
     |  ru_maxrss
     |      max. resident set size
     |
     |  ru_minflt
     |      page faults not requiring I/O
     |
     |  ru_msgrcv
     |      IPC messages received
     |
     |  ru_msgsnd
     |      IPC messages sent
     |
     |  ru_nivcsw
     |      involuntary context switches
     |
     |  ru_nsignals
     |      signals received
     |
     |  ru_nswap
     |      number of swap outs
     |
     |  ru_nvcsw
     |      voluntary context switches
     |
     |  ru_oublock
     |      block output operations
     |
     |  ru_stime
     |      system time used
     |
     |  ru_utime
     |      user time used
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  __match_args__ = ('ru_utime', 'ru_stime', 'ru_maxrss', 'ru_ixrss', 'ru...
     |
     |  n_fields = 16
     |
     |  n_sequence_fields = 16
     |
     |  n_unnamed_fields = 0
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.tuple:
     |
     |  __add__(self, value, /)
     |      Return self+value.
     |
     |  __contains__(self, key, /)
     |      Return key in self.
     |
     |  __eq__(self, value, /)
     |      Return self==value.
     |
     |  __ge__(self, value, /)
     |      Return self>=value.
     |
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |
     |  __getitem__(self, key, /)
     |      Return self[key].
     |
     |  __getnewargs__(self, /)
     |
     |  __gt__(self, value, /)
     |      Return self>value.
     |
     |  __hash__(self, /)
     |      Return hash(self).
     |
     |  __iter__(self, /)
     |      Implement iter(self).
     |
     |  __le__(self, value, /)
     |      Return self<=value.
     |
     |  __len__(self, /)
     |      Return len(self).
     |
     |  __lt__(self, value, /)
     |      Return self<value.
     |
     |  __mul__(self, value, /)
     |      Return self*value.
     |
     |  __ne__(self, value, /)
     |      Return self!=value.
     |
     |  __rmul__(self, value, /)
     |      Return value*self.
     |
     |  count(self, value, /)
     |      Return number of occurrences of value.
     |
     |  index(self, value, start=0, stop=9223372036854775807, /)
     |      Return first index of value.
     |
     |      Raises ValueError if the value is not present.
     |
     |  ----------------------------------------------------------------------
     |  Class methods inherited from builtins.tuple:
     |
     |  __class_getitem__(...) from builtins.type
     |      See PEP 585

## FUNCTIONS
### getpagesize

### getrlimit

### getrusage

### prlimit
        prlimit(pid, resource, [limits])

### setrlimit

## DATA
    RLIMIT_AS = 9
    RLIMIT_CORE = 4
    RLIMIT_CPU = 0
    RLIMIT_DATA = 2
    RLIMIT_FSIZE = 1
    RLIMIT_MEMLOCK = 8
    RLIMIT_MSGQUEUE = 12
    RLIMIT_NICE = 13
    RLIMIT_NOFILE = 7
    RLIMIT_NPROC = 6
    RLIMIT_OFILE = 7
    RLIMIT_RSS = 5
    RLIMIT_RTPRIO = 14
    RLIMIT_RTTIME = 15
    RLIMIT_SIGPENDING = 11
    RLIMIT_STACK = 3
    RLIM_INFINITY = -1
    RUSAGE_CHILDREN = -1
    RUSAGE_SELF = 0
    RUSAGE_THREAD = 1

## FILE
    /usr/lib/python3.10/lib-dynload/resource.cpython-310-x86_64-linux-gnu.so


