I have client provided Hardware which is Linux based running quite loaded applications and to connect to it i use putty via windows and execute desired commands. To get certain level of automation i used paramiko from python and run scripts.
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect('160.48.199.99', port=22, username='root', password='')
channel = ssh.invoke_shell()
channel.send('cd /usr/lib/app/tests/\n')
Now, i want to get continuous CPU and memory utilization of the Linux based system using python. I can certainly do this by sending Top
or other similia command but then i will have to use Regex to read string output of console.
I want this to be done via some python 3rd party API which has many additional features so that i can get most information about performance out of it.