Exemplo n.º 1
0
def run_pid_monitor_main():
    data = GetPid()
    data.run_pid()
    pid_lists = ReadExcel()
    pids = pid_lists.read_excel('pid.xls')
    if len(pids)==2:
        run_pid_monitor()
    else:
        print("error")
        run_pid_monitor_main()
Exemplo n.º 2
0
 def get_picture(self,file_name,pid_name):
     findname = BaseFile()
     find_name = findname.find_file(file_name)
     if find_name:
         read_excel = ReadExcel()
         cpu_list = read_excel.read_excel(find_name)
         cpu_title_list = self.pid_name+'_Cpu_Count/%'
         cpu_picture = Picture(cpu_list, cpu_title_list, pid_name+'Percent/(%)', 100, pid_name)
         cpu_picture.get_picture()
     else:
         print("未正确生成但进程CPU数据文档")
Exemplo n.º 3
0
 def get_picture(self):
     findname = BaseFile()
     find_name = findname.find_file('cpu.xls')
     if find_name:
         read_excel = ReadExcel()
         cpu_list = read_excel.read_excel(find_name)
         cpu_title_list = 'Cpu_Total_Percent/100%'
         cpu_picture = Picture(cpu_list,cpu_title_list,'CpuPercent/(%)',100,'cpu')
         cpu_picture.get_picture()
     else:
         print("未正确生成CPU数据文档")
Exemplo n.º 4
0
 def get_picture(self):
     findname = BaseFile()
     find_name = findname.find_file('gpu.xls')
     if find_name:
         read_excel = ReadExcel()
         gpu_list = read_excel.read_excel(find_name)
         gpu_data = self.get_gpu()
         yheight = gpu_data[0]['total']
         gpu_title_list = 'Gpu_Total_Percent=' + str(yheight) + 'GB'
         gpu_picture = Picture(gpu_list, gpu_title_list, 'GpuPercent/(GB)', yheight, 'gpu')
         gpu_picture.get_picture()
     else:
         print("未生成GPU文档")
Exemplo n.º 5
0
 def get_picture(self):
     findname = BaseFile()
     find_name = findname.find_file('mem.xls')
     if find_name:
         read_excel = ReadExcel()
         mem_list = read_excel.read_excel(find_name)
         # 获取系统总内存数据
         mem_data = self.get_memory()
         total_mem = round(mem_data[0], 2)  # 系统总内存数据保留2位小数
         total_mem_list = 'Memory total=' + str(total_mem) + 'GB'
         mem_picture = Picture(mem_list, total_mem_list, 'Memory/(GB)', total_mem, 'mem')
         mem_picture.get_picture()
     else:
         print("未正确生成内存文档")
Exemplo n.º 6
0
 def get_picture(self,file_name,pid_name):
     findname = BaseFile()
     find_name = findname.find_file(file_name)
     print(find_name)
     if find_name:
         read_excel = ReadExcel()
         gpu_list = read_excel.read_excel(find_name)
         # 获取系统总内存数据
         base_total_mem = MemoryInfo()
         mem_data = base_total_mem.get_memory()
         total_mem = round(mem_data[0], 2)  # 系统总内存数据保留2位小数
         yheight = total_mem
         gpu_title_list = self.pid_name+'_Memory_Count(Total_Memory=' + str(total_mem) + 'GB)'
         gpu_picture = Picture(gpu_list, gpu_title_list, self.pid_name + '_Used_Memory/(GB)', yheight, pid_name)
         gpu_picture.get_picture()
     else:
         print("未正确生成文档")
Exemplo n.º 7
0
 def pid_write_excel(self):
     writefile = ReadExcel()
     writefile.new_write_excel(self.get_pid())
Exemplo n.º 8
0
def G():
    pid_lists = ReadExcel()
    pids = pid_lists.read_excel('pid.xls')
    pid_name = 'TSClient.exe'
    data = PidCpu(pid_name,pids[1])
    data.get_pid_run('TSClient_cpu')
Exemplo n.º 9
0
def F():
    pid_lists = ReadExcel()
    pids = pid_lists.read_excel('pid.xls')
    pid_name = 'TALLivePlatform.exe'
    data = PidCpu(pid_name,pids[0])
    data.get_pid_run('TALLivePlatform_cpu')
Exemplo n.º 10
0
def E():
    pid_lists = ReadExcel()
    pids = pid_lists.read_excel('pid.xls')
    pid_name = 'TSClient.exe'
    data = PidMemory(pid_name,pids[1])
    data.get_pid_run('TSClient_memory')
Exemplo n.º 11
0
def D():
    pid_lists = ReadExcel()
    pids= pid_lists.read_excel('pid.xls')
    pid_name = 'TALLivePlatform.exe'
    data = PidMemory(pid_name,pids[0])
    data.get_pid_run('TALLivePlatform_memory')