#!/usr/bin/env python # # This is a quick and dirty version of a script what needs to be done for a final version # # TODO: Create a library like the ones available for perl, call Config.pm and Metric.pm # # import subprocess PROCESSNAME="node" ############### DO NOT EDIT BELLOW THIS LINE ##################### COMMAND = "ps --no-heading -C" + PROCESSNAME + " -o cp,vsz,rss,sz,cmd" return_code = subprocess.Popen(COMMAND,stdout=subprocess.PIPE, shell=True) for line in return_code.stdout.readlines(): words = line.split(None, 5) print "" print "" print "" print ""