Raised when no process with the given PID/parameter was found in the current process list.
psutil.AccessDenied
Exception raised when permission to perform an action is denied.
A class which represents an OS process.
New in 0.1.2
New in 0.1.2
New in 0.1.2
New in 0.1.2
New in 0.1.2
Return a list of current running PIDs.
Check whether the given PID exists in the current process list.
Return an iterator yielding a Process class instances for all running processes on the local machine.
Return the current system-wide CPU utilization as a percentage. For highest accuracy, it is recommended that this be called at least 1/10th of a second after importing the module or calling cpu_percent() in a previous call, to allow for a larger time delta from which to calculate the percentage value.
New in 0.1.2
Return system CPU times as a CPUTimes class object. Every CPU time is accessible in form of a CPUTimes attribute and represents the time CPU has spent in the given mode.
The attributes availability varies depending on the platform. Here follows a list of all available attributes:
- user
- system
- idle
- nice (UNIX)
- iowait (Linux)
- irq (Linux, FreeBSD)
- softirq (Linux)
New in 0.1.2
psutil.TOTAL_PHYMEM
psutil.avail_phymem()
psutil.used_phymem()
Return the amount of total, available and used physical memory on the system, in bytes.
New in 0.1.2
psutil.total_virtmem()
psutil.avail_virtmem()
psutil.used_virtmem()
Return the amount of total, available and used virtual memory on the system, in bytes.
On Linux they match the values returned by free command line utility. On OS X and FreeBSD they represent the same values as returned by sysctl vm.vmtotal. On Windows they are determined by reading the *PageFile values of MEMORYSTATUSEX structure.
New in 0.1.2