psutil._psbsd

FreeBSD, OpenBSD and NetBSD platforms implementation.

Module Contents

__extra__all__ = []
PROC_STATUSES
TCP_STATUSES
PAGESIZE
HAS_PER_CPU_TIMES
HAS_PROC_NUM_THREADS
HAS_PROC_OPEN_FILES
HAS_PROC_NUM_FDS
kinfo_proc_map
NoSuchProcess
ZombieProcess
AccessDenied
TimeoutExpired
svmem
scputimes
pmem
pfullmem
pcputimes
pmmap_grouped
pmmap_ext
sdiskio
virtual_memory()

System virtual memory as a namedtuple.

swap_memory()

System swap memory as (total, used, free, sin, sout) namedtuple.

cpu_times()

Return system per-CPU times as a namedtuple

per_cpu_times()

Return system CPU times as a namedtuple

cpu_count_logical()

Return the number of logical CPUs in the system.

cpu_count_physical()
cpu_stats()

Return various CPU stats as a named tuple.

disk_partitions(all=False)

Return mounted disk partitions as a list of namedtuples. ‘all’ argument is ignored, see: https://github.com/giampaolo/psutil/issues/906

disk_usage
disk_io_counters
net_io_counters
net_if_addrs
net_if_stats()

Get NIC stats (isup, duplex, speed, mtu).

net_connections(kind)

System-wide network connections.

sensors_battery()

Return battery info.

boot_time()

The system boot time expressed in seconds since the epoch.

users()

Return currently connected users as a list of namedtuples.

_pid_0_exists()
pids()

Returns a list of PIDs currently running on the system.

pid_exists(pid)

Return True if pid exists.

wrap_exceptions(fun)

Decorator which translates bare OSError exceptions into NoSuchProcess and AccessDenied.

wrap_exceptions_procfs(inst)

Same as above, for routines relying on reading /proc fs.

class Process(pid)

Bases:object

Wrapper class around underlying C implementation.

__slots__ = ['pid', '_name', '_ppid', '_cache']
memory_full_info
nt_mmap_grouped
nt_mmap_ext
_assert_alive(self)

Raise NSP if the process disappeared on us.

oneshot(self)

Retrieves multiple process info in one shot as a raw tuple.

oneshot_enter(self)
oneshot_exit(self)
name(self)
exe(self)
cmdline(self)
terminal(self)
ppid(self)
uids(self)
gids(self)
cpu_times(self)
cpu_num(self)
memory_info(self)
create_time(self)
num_threads(self)
num_ctx_switches(self)
threads(self)
connections(self, kind='inet')
wait(self, timeout=None)
nice_get(self)
nice_set(self, value)
status(self)
io_counters(self)
cwd(self)

Return process current working directory.

_not_implemented(self)
open_files(self)

Return files opened by process as a list of namedtuples.

num_fds(self)

Return the number of file descriptors opened by this process.

cpu_affinity_get(self)