#有时候我们需要查看服务器上所有进程,来判断哪些进程是否已经称为僵尸进程#!/usr/local/bin/python3.5 import psutil for i in psutil.pids(): p = psutil.Process(i) try: if len(p.exe()) > 1: print(str(p.pid),p.exe(),p.cwd()) except Exception as e: print(e)
END!