def get_cpu_list(ip, user, passwd):
 cmd = 'statcpu -iter 1 -t'
 showcpu_list = run_ssh_thread(ip, user, passwd, cmd)
 cpu_list = []
 line_num = 0
 for line in showcpu_list:
  line_num += 1
  if (line_num >= 3):
   cpu_stats = line.split()
   if (len(cpu_stats) > 2):
    cpu_list.append(cpu_stats[0].split(',')[0])
 return cpu_list

def get_cpu_list ( ip , user , passwd ) : cmd = 'statcpu -iter 1 -t' showcpu_list = run_ssh_thread ( ip , user , passwd , cmd ) cpu_list = [ ] line_num = 0 for line in showcpu_list : line_num += 1 if ( line_num >= 3 ) : cpu_stats = line . split ( ) if ( len ( cpu_stats ) > 2 ) : cpu_list . append ( cpu_stats [ 0 ] . split ( ',' ) [ 0 ] ) return cpu_list
get a list of cpus to build metric definitions with .