notebook
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
"""Jednorazovy status check ingestu na serveru."""
|
||||
import sys
|
||||
import paramiko
|
||||
|
||||
c = paramiko.SSHClient()
|
||||
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
c.connect("192.168.1.76", username="root", password="7309208104", timeout=10)
|
||||
|
||||
cmd = (
|
||||
"date; "
|
||||
"echo ---PROC---; "
|
||||
"docker exec python-runner ps aux 2>/dev/null | grep mailstore_ingest | grep -v grep; "
|
||||
"echo ---FOLDERS_DONE---; "
|
||||
"grep -c 'k dobrani=' /mnt/user/Scripts/MailStore/ingest_full.log; "
|
||||
"echo ---TAIL---; "
|
||||
"tail -3 /mnt/user/Scripts/MailStore/ingest_full.log"
|
||||
)
|
||||
i, o, e = c.exec_command(cmd)
|
||||
sys.stdout.buffer.write(o.read())
|
||||
c.close()
|
||||
Reference in New Issue
Block a user