pylinux Package

pylinux Module

pylinux.pylinux.arch()[source]

Architecture of the OS

pylinux.pylinux.avg_load()[source]

Average load

pylinux.pylinux.cpuinfo()[source]

Return the data in /proc/cpuinfo as a dictionary of dictionaries

pylinux.pylinux.distro_name()[source]

Linux distribution Name

pylinux.pylinux.distro_nickname()[source]

Distro Nickname

pylinux.pylinux.distro_release()[source]

Release

pylinux.pylinux.freemem()[source]

Free memory

pylinux.pylinux.hostname()[source]

Return the Hostname

pylinux.pylinux.ipaddr()[source]

IP address used to connect to the world

pylinux.pylinux.kernel()[source]

Kernel version

pylinux.pylinux.last_boot()[source]

Time of last boot

pylinux.pylinux.lsof()[source]

Number of Open files

pylinux.pylinux.mounts(nodev=True)[source]

Return current filesystem usage stats . uses df utility command

nodev=True for getting physical FSs
False for all
pylinux.pylinux.netdevs()[source]

Retrieve the Network device information using readproc.py module

pylinux.pylinux.nprocs()[source]

Number of processing units

pylinux.pylinux.processes()[source]

Currently running processes

pylinux.pylinux.totalmem()[source]

Total memory in the system

pylinux.pylinux.uptime()[source]

System uptime

pylinux.pylinux.users()[source]

Currently logged in users

readproc Module

pylinux.readproc.cpuinfo()[source]

Return the information in /proc/cpuinfo as a dictionary in the following format: cpu_info[‘proc0’]={...} cpu_info[‘proc1’]={...}

pylinux.readproc.maps(pid)[source]

Returns the /proc/<pid>maps data as a machine consumable list of dictionary with each item having the following fields:

address permissions offset dev inode pathname

pylinux.readproc.meminfo()[source]

Return the information in /proc/meminfo as a dictionary

pylinux.readproc.netdevs()[source]

RX and TX bytes for each of the network devices

pylinux.readproc.nprocs()[source]

Number of processing units

pylinux.readproc.process_list()[source]

List of all process IDs currently active

pylinux.readproc.process_name(pid)[source]

Given a PID return the process name

pylinux.readproc.pstree(pid)[source]

Find the process tree corresponding to a process with PID, pid

pylinux.readproc.sharedlibs(pid)[source]

Shared libraries used by the process with the given PID

pylinux.readproc.status(pid)[source]

Returns the state of the process as represented in /proc/<pid>status as a machine consumable dictionary

pylinux.readproc.uptime()[source]

Returns system uptime in hours