Changeset 921

Show
Ignore:
Timestamp:
03/09/08 08:20:19 (13 years ago)
Author:
ppalmers
Message:

fix softirq list

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/support/tools/listirqinfo.py

    r920 r921  
    4848                self.cpu_counts = [] 
    4949        def __str__(self): 
    50                 s = " SoftIRQ %10s: PID %6s, Sched %4s (priority %4s), name: %s" % \ 
     50                s = " SoftIRQ %12s: PID %6s, Sched %4s (priority %4s), name: %s" % \ 
    5151                    (self.name, self.process_id ,self.scheduling_class, self.scheduling_priority, self.fullname) 
    5252                return s 
     
    6666(exitstatus, outtext) = commands.getstatusoutput('ps -eLo pid,cmd,class,rtprio | grep IRQ') 
    6767 
    68 rawstr = r"""([0-9]+) +\[IRQ-([0-9]+)\] +([A-F]{2}) +([0-9]+)""" 
     68rawstr = r"""([0-9]+) +\[IRQ-([0-9]+)\] +([A-Z]{2}) +([0-9]+)""" 
    6969compile_obj = re.compile(rawstr) 
    7070 
     
    8282(exitstatus, outtext) = commands.getstatusoutput('ps -eLo pid,cmd,class,rtprio | grep softirq') 
    8383 
    84 rawstr = r"""([0-9]+) +\[softirq-(.*)\] +([A-F]{2}) +([0-9]+)""" 
     84rawstr = r"""([0-9]+) +\[softirq-(.*)\] +([A-Z]{2}) +([0-9]+)""" 
    8585compile_obj = re.compile(rawstr) 
    8686 
     
    9191                irq = SoftIRQ() 
    9292                irq.process_id = int(match_obj.group(1)) 
    93                 irq.name = match_obj.group(2
    94                 irq.fullname = "softirq-" + irq.name 
     93                irq.name = "%s-%s" % (match_obj.group(2),irq.process_id
     94                irq.fullname = "softirq-%s" % match_obj.group(2) 
    9595                irq.scheduling_class = match_obj.group(3) 
    9696                irq.scheduling_priority = int(match_obj.group(4)) 
    9797                softIRQs[irq.name] = irq 
    9898 
    99 # get PID info 
     99# get irq info 
    100100(exitstatus, outtext) = commands.getstatusoutput('cat /proc/interrupts') 
    101101lines = outtext.splitlines()