def alarm_task(): # print "alarm task start" alarm_body = [] alarm_body.extend(cpu_base_alarm()) alarm_body.extend(cpu_load_alarm()) alarm_body.extend(cpu_temperature_alarm()) alarm_body.extend(mem_alarm()) alarm_body.extend(swap_alarm()) alarm_body.extend(fs_alarm()) alarm_body.extend(pscpu_alarm()) alarm_body.extend(psmem_alarm()) task_producer("warningQueue", alarm_body, None)
def sensor_task(): dict = {"x-message-ttl": 60000} body = deal_cpu_sensor() task_producer("cputemper", body, dict)
def fans_task(): dict = {"x-message-ttl": 60000} body = get_fans() task_producer("fun", body, dict)
def process_info_task(): dict = {"x-message-ttl": 8000} body = get_ps_basic_info() task_producer("processInfo_queue", body, dict)
def network_io_task(): # print "network io task start" dict = {"x-message-ttl": 60000} body = get_network_io() task_producer("networkio", body, dict)
def network_socket_task(): # print "socket task start" dict = {"x-message-ttl": 60000} body = get_socket_info() task_producer("networksocket", body, dict)
def mem_basic_info_task(): # print "mem info task start" dict = {"x-message-ttl": 60000} body = getmembasicinfo() task_producer("membaseinfo", body, dict)
def cpu_load_task(): # print "cpu load task start" cpu_dict = {"x-message-ttl": 60000} body = getcpuload() task_producer("cpuload", body, cpu_dict)
def network_throughput_task(): # print "network throughput task start" dict = {"x-message-ttl": 60000} body = get_throughput_info() task_producer("networkthroughput", body, dict)
def disk_block_task(): # print "disk block task start" dict = {"x-message-ttl": 60000} body = get_disk_block() task_producer("diskblock", body, dict)
def disk_io_task(): # print "disk io task start" dict = {"x-message-ttl": 60000} body = get_disk_io() task_producer("diskinfo", body, dict)
def mem_numstat_task(): # print "mem numa task start" dict = {"x-message-ttl": 12000} body = get_numastat_info() task_producer("numstatinfo", body, dict)
def mem_slab_task(): # print "mem slab task start" dict = {"x-message-ttl": 60000} body = get_slab_info() task_producer("memslab", body, dict)
def mem_page_task(): # print "mem page task start" dict = {"x-message-ttl": 60000} body = getpaginfo() task_producer("mempage", body, dict)
def network_iptraffic_task(): # print "ip traffic task start" dict = {"x-message-ttl": 60000} body = get_iptrafic_info() task_producer("networktraffic", body, dict)
def cpu_info_taks(): # print "cpu info task start" cpu_dict = {"x-message-ttl": 60000} body = getcpuinfo() task_producer("cpuinfo", body, cpu_dict)
def network_udp_task(): # print "udp task start" dict = {"x-message-ttl": 60000} body = get_udp_info() task_producer("networkudp", body, dict)
def cpu_interrupt_task(): # print "cpu interrupt task start" cpu_dict = {"x-message-ttl": 12000} body = getinterrupts() task_producer("interrupt", body, cpu_dict)
def single_cpu_task(): print "single cpu task start" cpu_dict = {"x-message-ttl": 60000} body = getpercpuinfo() task_producer("singlecpuinfo", body, cpu_dict)