|
|
|
|
Python
|
8 lines
|
6 sloc
|
0.161 kB
  1. import psutil 
  2.  
  3. process_name = 'smsserver' 
  4.  
  5. for proc in psutil.process_iter(): 
  6. 	print(proc.name()) 
  7. 	if proc.name() == process_name: 
  8. 		print('task running')