Classes | |
class | CPUMonitor |
Functions | |
def | check_clock_speed |
Checks clock speed from reading from CPU info. | |
def | check_core_temps |
Check CPU core temps. | |
def | check_ipmi |
def | check_memory |
Uses 'free -m' to check free memory. | |
def | check_mpstat |
def | check_uptime |
Uses 'uptime' to see load average. | |
def | get_core_temp_names |
Returns names for core temperature files Returns list of names, each name can be read like file. | |
def | update_status_stale |
Variables | |
string | action = "store" |
tuple | cpu_node = CPUMonitor(hostname, options.diag_hostname) |
has_error_core_count = False | |
has_warned_mpstat = False | |
string | help = "Computer name in diagnostics output (ex: 'c1')" |
tuple | hostname = socket.gethostname() |
string | metavar = "DIAG_HOSTNAME" |
tuple | parser = optparse.OptionParser(usage="usage: cpu_monitor.py [--diag-hostname=cX]") |
tuple | rate = rospy.Rate(1.0) |
dictionary | stat_dict = { 0: 'OK', 1: 'Warning', 2: 'Error' } |
int | usage_old = 0 |
Use mpstat to find CPU usage. |
def cpu_monitor.check_clock_speed | ( | enforce_speed | ) |
Checks clock speed from reading from CPU info.
Definition at line 227 of file cpu_monitor.py.
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 cpu_monitor.py.
def cpu_monitor.check_ipmi | ( | ) |
Definition at line 65 of file cpu_monitor.py.
def cpu_monitor.check_memory | ( | ) |
Uses 'free -m' to check free memory.
Definition at line 327 of file cpu_monitor.py.
def cpu_monitor.check_mpstat | ( | core_count = -1 | ) |
Definition at line 378 of file cpu_monitor.py.
def cpu_monitor.check_uptime | ( | load1_threshold, | |
load5_threshold | |||
) |
Uses 'uptime' to see load average.
Definition at line 284 of file cpu_monitor.py.
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 cpu_monitor.py.
def cpu_monitor.update_status_stale | ( | stat, | |
last_update_time | |||
) |
Definition at line 495 of file cpu_monitor.py.
string cpu_monitor::action = "store" |
Definition at line 817 of file cpu_monitor.py.
tuple cpu_monitor::cpu_node = CPUMonitor(hostname, options.diag_hostname) |
Definition at line 826 of file cpu_monitor.py.
Definition at line 377 of file cpu_monitor.py.
cpu_monitor::has_warned_mpstat = False |
Definition at line 376 of file cpu_monitor.py.
string cpu_monitor::help = "Computer name in diagnostics output (ex: 'c1')" |
Definition at line 815 of file cpu_monitor.py.
tuple cpu_monitor::hostname = socket.gethostname() |
Definition at line 810 of file cpu_monitor.py.
string cpu_monitor::metavar = "DIAG_HOSTNAME" |
Definition at line 816 of file cpu_monitor.py.
tuple cpu_monitor::parser = optparse.OptionParser(usage="usage: cpu_monitor.py [--diag-hostname=cX]") |
Definition at line 813 of file cpu_monitor.py.
tuple cpu_monitor::rate = rospy.Rate(1.0) |
Definition at line 828 of file cpu_monitor.py.
dictionary cpu_monitor::stat_dict = { 0: 'OK', 1: 'Warning', 2: 'Error' } |
Definition at line 62 of file cpu_monitor.py.
int cpu_monitor::usage_old = 0 |
Use mpstat to find CPU usage.
Definition at line 375 of file cpu_monitor.py.