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

◆ check_clock_speed()

def cpu_monitor.check_clock_speed (   enforce_speed)

Checks clock speed from reading from CPU info.

Definition at line 231 of file cpu_monitor.py.

◆ check_core_temps()

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 189 of file cpu_monitor.py.

◆ check_ipmi()

def cpu_monitor.check_ipmi ( )

Definition at line 65 of file cpu_monitor.py.

◆ check_memory()

def cpu_monitor.check_memory ( )

Uses 'free -m' to check free memory.

Definition at line 335 of file cpu_monitor.py.

◆ check_mpstat()

def cpu_monitor.check_mpstat (   core_count = -1)

Definition at line 387 of file cpu_monitor.py.

◆ check_uptime()

def cpu_monitor.check_uptime (   load1_threshold,
  load5_threshold 
)

Uses 'uptime' to see load average.

Definition at line 290 of file cpu_monitor.py.

◆ get_core_temp_names()

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 485 of file cpu_monitor.py.

◆ update_status_stale()

def cpu_monitor.update_status_stale (   stat,
  last_update_time 
)

Definition at line 508 of file cpu_monitor.py.

Variable Documentation

◆ _Thread__stop

cpu_monitor._Thread__stop
private

Definition at line 59 of file cpu_monitor.py.

◆ action

cpu_monitor.action

Definition at line 831 of file cpu_monitor.py.

◆ args

cpu_monitor.args

Definition at line 832 of file cpu_monitor.py.

◆ cpu_node

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

Definition at line 840 of file cpu_monitor.py.

◆ default

cpu_monitor.default

Definition at line 831 of file cpu_monitor.py.

◆ dest

cpu_monitor.dest

Definition at line 828 of file cpu_monitor.py.

◆ file

cpu_monitor.file

Definition at line 837 of file cpu_monitor.py.

◆ has_error_core_count

bool cpu_monitor.has_error_core_count = False

Definition at line 386 of file cpu_monitor.py.

◆ has_warned_mpstat

bool cpu_monitor.has_warned_mpstat = False

Definition at line 385 of file cpu_monitor.py.

◆ help

cpu_monitor.help

Definition at line 829 of file cpu_monitor.py.

◆ hostname

cpu_monitor.hostname = socket.gethostname()

Definition at line 824 of file cpu_monitor.py.

◆ metavar

cpu_monitor.metavar

Definition at line 830 of file cpu_monitor.py.

◆ options

cpu_monitor.options

Definition at line 832 of file cpu_monitor.py.

◆ parser

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

Definition at line 827 of file cpu_monitor.py.

◆ rate

cpu_monitor.rate = rospy.Rate(1.0)

Definition at line 842 of file cpu_monitor.py.

◆ stat_dict

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

Definition at line 62 of file cpu_monitor.py.

◆ usage_old

int cpu_monitor.usage_old = 0

Use mpstat to find CPU usage.

Definition at line 384 of file cpu_monitor.py.



pr2_computer_monitor
Author(s): Kevin Watts (watts@willowgarage.com)
autogenerated on Thu Sep 26 2024 02:53:24