Classes | Functions | Variables
cpu_monitor Namespace Reference


class  CPUMonitor


def check_clock_speed (enforce_speed)
 Checks clock speed from reading from CPU info. More...
def check_core_temps (sys_temp_strings)
 Check CPU core temps. More...
def check_ipmi ()
def check_memory ()
 Uses 'free -m' to check free memory. More...
def check_mpstat (core_count=-1)
def check_uptime (load1_threshold, load5_threshold)
 Uses 'uptime' to see load average. More...
def get_core_temp_names ()
 Returns names for core temperature files Returns list of names, each name can be read like file. More...
def update_status_stale (stat, last_update_time)


 cpu_node = CPUMonitor(hostname, options.diag_hostname)
bool has_error_core_count = False
bool has_warned_mpstat = False
 hostname = socket.gethostname()
 parser = optparse.OptionParser(usage="usage: [--diag-hostname=cX]")
 rate = rospy.Rate(1.0)
dictionary stat_dict = { 0: 'OK', 1: 'Warning', 2: 'Error' }
int usage_old = 0
 Use mpstat to find CPU usage. More...

Function Documentation

def cpu_monitor.check_clock_speed (   enforce_speed)

Checks clock speed from reading from CPU info.

Definition at line 227 of file

def cpu_monitor.check_core_temps (   sys_temp_strings)

Check CPU core temps.

Use 'find /sys -name temp1_input' to find cores Read from every core, divide by 1000

Definition at line 187 of file

def cpu_monitor.check_ipmi ( )

Definition at line 65 of file

def cpu_monitor.check_memory ( )

Uses 'free -m' to check free memory.

Definition at line 327 of file

def cpu_monitor.check_mpstat (   core_count = -1)

Definition at line 378 of file

def cpu_monitor.check_uptime (   load1_threshold,

Uses 'uptime' to see load average.

Definition at line 284 of file

def cpu_monitor.get_core_temp_names ( )

Returns names for core temperature files Returns list of names, each name can be read like file.

Definition at line 474 of file

def cpu_monitor.update_status_stale (   stat,

Definition at line 495 of file

Variable Documentation


Definition at line 59 of file


Definition at line 816 of file


Definition at line 817 of file

cpu_monitor.cpu_node = CPUMonitor(hostname, options.diag_hostname)

Definition at line 825 of file


Definition at line 816 of file


Definition at line 813 of file


Definition at line 822 of file

bool cpu_monitor.has_error_core_count = False

Definition at line 377 of file

bool cpu_monitor.has_warned_mpstat = False

Definition at line 376 of file

Definition at line 814 of file

cpu_monitor.hostname = socket.gethostname()

Definition at line 809 of file


Definition at line 815 of file


Definition at line 817 of file

cpu_monitor.parser = optparse.OptionParser(usage="usage: [--diag-hostname=cX]")

Definition at line 812 of file

cpu_monitor.rate = rospy.Rate(1.0)

Definition at line 827 of file

dictionary cpu_monitor.stat_dict = { 0: 'OK', 1: 'Warning', 2: 'Error' }

Definition at line 62 of file

int cpu_monitor.usage_old = 0

Use mpstat to find CPU usage.

Definition at line 375 of file

Author(s): Kevin Watts (
autogenerated on Tue Jun 1 2021 02:50:51