I'm making a Python program to assign new values to processes and dynamically monitor them:
import os
import subprocess
#!/usr/bin/env python
print "hello world"
os.system("ps lx")
print "Enter PID"
pid = raw_input()
print "Entered PID",pid
print "Enter new priority"
new = raw_input()
print "Entered new priority is"new
os.system("sudo renice new pid")
I don't know how to call nice
and renice
with arguments in Python.