Sysinfo Module

This module contains functions for accessing information about the system like CPU usage or temperature.

berrymon.sysinfo.get_cpu_load(format=False) → float[source]

Returns the current system CPU load in percent as floating point number.

Returns:The system’s CPU load in percent.
Return type:float
berrymon.sysinfo.get_cpu_temp() → float[source]

Returns the CPU temperature in Celsius as floating point number.

This function will only work on the Raspberry Pi platform and therefore returns -5 if it’s not executed on a Raspberry Pi.

Returns:The CPU temperature in percent.
Return type:float
berrymon.sysinfo.get_ip() → str[source]

Returns the first of the external IP addresses that are returned by the Linux system command “hostname -I”. If the system is not connected to any network, ‘UNKOWN’ will be returned.

Returns:The external IP address system.
Return type:str
berrymon.sysinfo.get_username() → str[source]

Returns the username of the user that is running the Berrymon process.

Returns:The username of the current user.
Return type:str