title: CPU utilization report for multiple servers - Python
body: <p>I'm trying to get ps -aux command output for multiple servers in a excel or csv format. Output needs to be printed for the servers in different sheets. I'm unable to do that. Can someone help me on this by completing this script.</p>
  <pre><code>import paramiko
  import subprocess
  import json
  import csv
  
  with open(r'filepath\serverlist.json') as f:
  data=json.load(f)
  
  
  client = paramiko.SSHClient()
  target_host = txt
  un = 'root'
  pwd = 'xxx'
  client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  client.connect(hostname=target_host,username=un,password=pwd)
  stdin, stdout, stderr = client.exec_command('ps -aux')
  </code></pre>
  <p>Expected output as below for a server and it requires to be saved in different sheet for each server.</p>
  <p><a href="https://i.stack.imgur.com/k1Z8Y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/k1Z8Y.png" alt="enter image description here" /></a></p>