Add other command interpreters: ruby (common) and tclsh (infrequent)
Javier Fernandez-Sanguino
9 years ago
552 | 552 | |
553 | 553 | try: |
554 | 554 | self.program = os.readlink('/proc/%d/exe' % self.pid) |
555 | # if the executable command is an interpreter such as perl/python, | |
555 | # if the executable command is an interpreter such as perl/python/ruby/tclsh, | |
556 | 556 | # we want to find the real program |
557 | m = re.match("^/usr/bin/(perl|python)", self.program) | |
557 | m = re.match("^/usr/bin/(perl|python|ruby|tclsh)", self.program) | |
558 | 558 | if m: |
559 | 559 | with open('/proc/%d/cmdline' % self.pid, 'r') as cmdline: |
560 | 560 | # only match program in /usr (ex.: /usr/sbin/smokeping) |