Classes | Functions | Variables
cpu_monitor Namespace Reference

Classes

class  CPUMonitor
 

Functions

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)
 

Variables

 _Thread__stop
 
 action
 
 args
 
 cpu_node = CPUMonitor(hostname, options.diag_hostname)
 
 default
 
 dest
 
 file
 
bool has_error_core_count = False
 
bool has_warned_mpstat = False
 
 help
 
 hostname = socket.gethostname()
 
 metavar
 
 options
 
 parser = optparse.OptionParser(usage="usage: cpu_monitor.py [--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 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.

Variable Documentation

cpu_monitor._Thread__stop
private

Definition at line 59 of file cpu_monitor.py.

cpu_monitor.action

Definition at line 816 of file cpu_monitor.py.

cpu_monitor.args

Definition at line 817 of file cpu_monitor.py.

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

Definition at line 825 of file cpu_monitor.py.

cpu_monitor.default

Definition at line 816 of file cpu_monitor.py.

cpu_monitor.dest

Definition at line 813 of file cpu_monitor.py.

cpu_monitor.file

Definition at line 822 of file cpu_monitor.py.

bool cpu_monitor.has_error_core_count = False

Definition at line 377 of file cpu_monitor.py.

bool cpu_monitor.has_warned_mpstat = False

Definition at line 376 of file cpu_monitor.py.

cpu_monitor.help

Definition at line 814 of file cpu_monitor.py.

cpu_monitor.hostname = socket.gethostname()

Definition at line 809 of file cpu_monitor.py.

cpu_monitor.metavar

Definition at line 815 of file cpu_monitor.py.

cpu_monitor.options

Definition at line 817 of file cpu_monitor.py.

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

Definition at line 812 of file cpu_monitor.py.

cpu_monitor.rate = rospy.Rate(1.0)

Definition at line 827 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.



pr2_computer_monitor
Author(s): Kevin Watts (watts@willowgarage.com)
autogenerated on Tue Jun 1 2021 02:50:51