0

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.

Pawankumar Dubey
  • 387
  • 1
  • 6
  • 21
  • 1
    This is duplicate of https://stackoverflow.com/questions/276052/how-to-get-current-cpu-and-ram-usage-in-python If you get your answers there, please close this one. – rubayeet Jan 03 '18 at 13:22
  • I agree but then i need to install python and your mentioned utility in client provided hardware. I cannot afford it the same to be done to every hardware client provides. Plus we keep on formatting the hardware everyday due to build change. – Pawankumar Dubey Jan 03 '18 at 13:25
  • 1
    I'd suggest you edit your question accordingly. It does not reflect the restrictions you mentioned. – rubayeet Jan 03 '18 at 13:49

0 Answers0