Classes | Functions | Variables
cpu_monitor Namespace Reference

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.

Function Documentation

def cpu_monitor.check_clock_speed (   enforce_speed)

Checks clock speed from reading from CPU info.

Definition at line 220 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 180 of file cpu_monitor.py.

Definition at line 58 of file cpu_monitor.py.

Uses 'free -m' to check free memory.

Definition at line 320 of file cpu_monitor.py.

def cpu_monitor.check_mpstat (   core_count = -1)

Definition at line 371 of file cpu_monitor.py.

def cpu_monitor.check_uptime (   load1_threshold,
  load5_threshold 
)

Uses 'uptime' to see load average.

Definition at line 277 of file cpu_monitor.py.

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

Definition at line 467 of file cpu_monitor.py.

def cpu_monitor.update_status_stale (   stat,
  last_update_time 
)

Definition at line 488 of file cpu_monitor.py.


Variable Documentation

string cpu_monitor::action = "store"

Definition at line 809 of file cpu_monitor.py.

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

Definition at line 818 of file cpu_monitor.py.

Definition at line 370 of file cpu_monitor.py.

Definition at line 369 of file cpu_monitor.py.

string cpu_monitor::help = "Computer name in diagnostics output (ex: 'c1')"

Definition at line 807 of file cpu_monitor.py.

tuple cpu_monitor::hostname = socket.gethostname()

Definition at line 802 of file cpu_monitor.py.

string cpu_monitor::metavar = "DIAG_HOSTNAME"

Definition at line 808 of file cpu_monitor.py.

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

Definition at line 805 of file cpu_monitor.py.

tuple cpu_monitor::rate = rospy.Rate(1.0)

Definition at line 820 of file cpu_monitor.py.

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

Definition at line 55 of file cpu_monitor.py.

Use mpstat to find CPU usage.

Definition at line 368 of file cpu_monitor.py.



pr2_computer_monitor
Author(s): Kevin Watts (watts@willowgarage.com)
autogenerated on Fri Dec 6 2013 20:23:59