Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import mysql.connector
- import time
- import subprocess
- cnx = mysql.connector.connect(user='root', password='1234', host='46.105.30.230')
- cursor = cnx.cursor()
- while True:
- cursor.execute("show full processlist")
- result=cursor.fetchall()
- print(result)
- time.sleep(1);
- subprocess.Popen("uptime")
- cursor.close()
- cnx.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement