Exemple #1
0
    def isolate_cpus(self, cpus):
        self.previous_pid_affinities, \
          self.previous_irq_affinities = tuna.isolate_cpus(cpus, self.cpus.nr_cpus)

        if self.previous_pid_affinities:
            self.procview.refresh()

        if self.previous_irq_affinities:
            self.irqview.refresh()
Exemple #2
0
	def isolate_cpus(self, cpus):
		self.previous_pid_affinities, \
		  self.previous_irq_affinities = tuna.isolate_cpus(cpus, self.cpus.nr_cpus)

		if self.previous_pid_affinities:
			self.procview.refresh()

		if self.previous_irq_affinities:
			self.irqview.refresh()
Exemple #3
0
			# thread list, i.e. we would print all the threads
			# in the system when we should print nothing.
			if not op_list and type(a) == type(''):
				thread_list_str = do_list_op(op, thread_list_str,
							     a.split(","))
			if not op:
				irq_list = None
		elif o in ("-f", "--filter"):
			filter = True
		elif o in ("-g", "--gui"):
			run_gui = True
		elif o in ("-i", "--isolate"):
			if not cpu_list:
				print "tuna: --isolate " + _("requires a cpu list!")
				sys.exit(2)
			tuna.isolate_cpus(cpu_list, get_nr_cpus())
		elif o in ("-I", "--include"):
			if not cpu_list:
				print "tuna: --include " + _("requires a cpu list!")
				sys.exit(2)
			tuna.include_cpus(cpu_list, get_nr_cpus())
		elif o in ("-p", "--priority"):
			if not thread_list:
				print ("tuna: %s " % o) + _("requires a thread list!")
				sys.exit(2)
			try:
				tuna.threads_set_priority(thread_list, a, affect_children)
			except (SystemError, OSError) as err: # (3, 'No such process') old python-schedutils incorrectly raised SystemError
				print "tuna: %s" % err
				sys.exit(2)
		elif o in ("-P", "--show_threads"):
Exemple #4
0
     # thread list, i.e. we would print all the threads
     # in the system when we should print nothing.
     if not op_list and type(a) == type(''):
         thread_list_str = consolewriter.do_list_op(
             op, thread_list_str, a.split(","))
     if not op:
         irq_list = None
 elif o in ("-f", "--filter"):
     filter = True
 elif o in ("-g", "--gui"):
     run_gui = True
 elif o in ("-i", "--isolate"):
     if not cpu_list:
         print "tuna: --isolate " + _("requires a cpu list!")
         sys.exit(2)
     tuna.isolate_cpus(cpu_list, consolewriter.get_nr_cpus())
 elif o in ("-I", "--include"):
     if not cpu_list:
         print "tuna: --include " + _("requires a cpu list!")
         sys.exit(2)
     tuna.include_cpus(cpu_list, consolewriter.get_nr_cpus())
 elif o in ("-p", "--priority"):
     if not thread_list:
         print("tuna: %s " % o) + _("requires a thread list!")
         sys.exit(2)
     try:
         tuna.threads_set_priority(thread_list, a, affect_children)
     except (
             SystemError, OSError
     ) as err:  # (3, 'No such process') old python-schedutils incorrectly raised SystemError
         print "tuna: %s" % err
Exemple #5
0
     # threads was found, which would result in an empty
     # thread list, i.e. we would print all the threads
     # in the system when we should print nothing.
     if not op_list and type(a) == type(""):
         thread_list_str = do_list_op(op, thread_list_str, a.split(","))
     if not op:
         irq_list = None
 elif o in ("-f", "--filter"):
     filter = True
 elif o in ("-g", "--gui"):
     run_gui = True
 elif o in ("-i", "--isolate"):
     if not cpu_list:
         print "tuna: --isolate " + _("requires a cpu list!")
         sys.exit(2)
     tuna.isolate_cpus(cpu_list, get_nr_cpus())
 elif o in ("-I", "--include"):
     if not cpu_list:
         print "tuna: --include " + _("requires a cpu list!")
         sys.exit(2)
     tuna.include_cpus(cpu_list, get_nr_cpus())
 elif o in ("-p", "--priority"):
     if not thread_list:
         print ("tuna: %s " % o) + _("requires a thread list!")
         sys.exit(2)
     try:
         tuna.threads_set_priority(thread_list, a, affect_children)
     except (
         SystemError,
         OSError,
     ) as err:  # (3, 'No such process') old python-schedutils incorrectly raised SystemError