Skip to content

Commit

Permalink
Added Windows Process Monitoring Plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
dgildeh committed Jun 27, 2016
1 parent d71c363 commit 6617b2a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
.idea/
18 changes: 18 additions & 0 deletions windows.process.py
@@ -0,0 +1,18 @@
#!/usr/bin/env python
import subprocess
import csv
import sys

# set to the name of the process as shown by task manager under details i.e not the display name
PROCESS = ''

p_tasklist = subprocess.Popen('tasklist.exe /fo csv',
stdout=subprocess.PIPE,
universal_newlines=True)

pythons_tasklist = []
for p in csv.DictReader(p_tasklist.stdout):
if p['Image Name'] == PROCESS:
sys.exit(0)

sys.exit (2)

0 comments on commit 6617b2a

Please sign in to comment.