Example #1
0
 def __update_topview(self):
     """
     Actualiza topview.
     """
     
     pids_procesos = JAMSS.get_pids()
     
     lista = []
     
     for pid in pids_procesos:
         nombre = JAMSS.get_process_name(pid)
         com = JAMSS.get_process_cmdline(pid)
         
         comandos = ''
         for c in com:
             comandos += "%s " % c
             
         comandos = comandos.strip()
             
         #hijos = JAMSS.get_process_threads(pid)
         
         lista.append( [pid, nombre, comandos] )
         #JAMSS.get_archivos_abiertos_por_proceso(pid)
     
     self.topview.set_tree(lista)
     
     return True
Example #2
0
 def __add_threads(self, pid, iteractual):
     """
     Agrega al treview los procesos hijos de un
     determinado proceso segun pid.
     """
     
     model = self.get_model()
     thread_ids = JAMSS.get_process_threads(pid)
     
     for thread in thread_ids:
         
         thread = int(thread)
         
         if not thread in self.pids:
             self.pids.append(thread)
             
             nombre = JAMSS.get_process_name(thread)
             com = JAMSS.get_process_cmdline(pid)
         
             comandos = ''
             for c in com:
                 comandos += "%s " % c
                 
             comandos = comandos.strip()
             
             model.append(iteractual, [thread, nombre, comandos])
Example #3
0
 def set_tree(self, datos):
     """
     Setea el treeview con los datos de procesos en top.
     Manda expandir el nuevo path en el treeview, lo cual
     desencadena la secuencia de agregado de hijos del proceso.
     """
     
     self.pids = []
     
     model = self.get_model()
     
     model.clear()
     
     iter = model.get_iter_first()
     
     for dato in datos:
         
         pid = int(dato[0])
         
         if not pid in self.pids:
             self.pids.append(pid)
             
             if 'running' in JAMSS.get_process_status(pid)[1]:
                 iteractual = model.append(iter, dato)
                 self.__add_threads(pid, iteractual)
                 
                 path = model.get_path(iteractual)
                 self.expand_to_path(path)
Example #4
0
    def __update_topview(self):
        pids_procesos = JAMSS.get_pids()
        lista = []
        for pid in pids_procesos:
            nombre = JAMSS.get_process_name(pid)
            com = JAMSS.get_process_cmdline(pid)

            comandos = ''
            for c in com:
                comandos += "%s " % c

            comandos = comandos.strip()
            #hijos = JAMSS.get_process_threads(pid)
            lista.append([pid, nombre, comandos])
            #JAMSS.get_archivos_abiertos_por_proceso(pid)

        self.topview.set_tree(lista)
        return True