Execute um script de shell do Python
import subprocess
output = subprocess.check_output('pidstat -p ALL'.split(' '), stderr=subprocess.STDOUT, universal_newlines=True)
print(output)
Wandering Willet