Python Scripts

= CPU check of Remote Server = import paramiko

ssh = paramiko.SSHClient ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy) ssh.connect( '10.107.88.93', username = 'aman', password = 'Passion@123' ) stdin, stdout, stderr = ssh.exec_command( 'top -bn2 | grep "Cpu(s)"' ) output = stdout.read ssh.close

stat = output.split idle = float(stat[24]) cpu = (100-idle)

print cpu


 * References