Call a shell command from python - subprocess module
import subprocess
# ps -ux | grep 1842 (Assuming 1842 is the process id. replace with process id you get)
p1 = subprocess.Popen(["ps", "-ux"], stdout=subprocess.PIPE)
p2 = subprocess.Popen(["grep", "1842"], stdin=p1.stdout, stdout=subprocess.PIPE)
p1.stdout.close() # Allow p1 to receive a SIGPIPE if p2 exits.
output = p2.communicate()[0]
print output
and parse through output to see its memory utilization