glances.ipynb
from glances import api
gl = api.GlancesAPI()
gl.plugins()
gl.cpu
gl.cpu.get('total')
gl.mem
gl.mem.get('available')
Display it in a user friendly way:
gl.auto_unit(gl.mem.get('available'))
gl.network
Get the list of networks interfaces:
gl.network.keys()
Get stats for a specific network interface:
gl.network.get('wlp0s20f3')
gl.network.get('wlp0s20f3').get('bytes_recv_rate_per_sec')
Example for the LOAD plugin.
gl.load
Get the limit configured in the glances.conf:
gl.load.fields_description
Get field description and unit:
gl.load.get_limits()
gl.load.get_views()