update
This commit is contained in:
parent
a8c7b56703
commit
96b077f202
@ -1,6 +1,7 @@
|
|||||||
from mystic_bbs import *
|
from mystic_bbs import *
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import os, subprocess
|
import os, subprocess
|
||||||
|
from time import sleep
|
||||||
|
|
||||||
now = datetime.now()
|
now = datetime.now()
|
||||||
TEXT = str(getcfg()['text'])
|
TEXT = str(getcfg()['text'])
|
||||||
@ -9,6 +10,7 @@ CFG = str(getcfg())
|
|||||||
USER = str(getuser())
|
USER = str(getuser())
|
||||||
HANDLE = str(getuser()['handle'])
|
HANDLE = str(getuser()['handle'])
|
||||||
|
|
||||||
|
|
||||||
def dispHeader():
|
def dispHeader():
|
||||||
A = mci2str('AV')
|
A = mci2str('AV')
|
||||||
V = mci2str('IL')
|
V = mci2str('IL')
|
||||||
@ -52,7 +54,7 @@ def dispQuickLog(log="mis"):
|
|||||||
LOGDIR = "/mystic/logs"
|
LOGDIR = "/mystic/logs"
|
||||||
|
|
||||||
if log.lower() == "mis":
|
if log.lower() == "mis":
|
||||||
logFile = 'grep -vE "HTTP|BINKP|HostName|Blocked|Connect|EVENT" `ls -1hrt '+LOGDIR+'/mis.*.log|tail -1`|tail -n5|head -n4|cut -c -76'
|
logFile = 'grep -avE "HTTP|BINKP|HostName|Blocked|Connect|EVENT" `ls -1hrt '+LOGDIR+'/mis.*.log|tail -1`|tail -n5|head -n4|cut -c -76'
|
||||||
logFileStatus = ' |14MIS.LOG|07 '
|
logFileStatus = ' |14MIS.LOG|07 '
|
||||||
elif log.lower() == "mutil":
|
elif log.lower() == "mutil":
|
||||||
logFile = 'tail -n4 '+LOGDIR+'/mutil.latest.log|cut -c -76'
|
logFile = 'tail -n4 '+LOGDIR+'/mutil.latest.log|cut -c -76'
|
||||||
@ -65,7 +67,7 @@ def dispQuickLog(log="mis"):
|
|||||||
|
|
||||||
SY = 19
|
SY = 19
|
||||||
OS = 0
|
OS = 0
|
||||||
lines = os.popen('grep -vE "HTTP|BINKP|HostName|Blocked|Connect|EVENT" `ls -1hrt '+LOGDIR+'/mis.*.log|tail -1`|tail -n5|head -n4|cut -c -76').readlines()
|
lines = os.popen('grep -avE "HTTP|BINKP|HostName|Blocked|Connect|EVENT" `ls -1hrt '+LOGDIR+'/mis.*.log|tail -1`|tail -n5|head -n4|cut -c -76').readlines()
|
||||||
lines = os.popen(logFile).readlines()
|
lines = os.popen(logFile).readlines()
|
||||||
lines = map(lambda s: s.strip(), lines)
|
lines = map(lambda s: s.strip(), lines)
|
||||||
for line in lines:
|
for line in lines:
|
||||||
@ -81,4 +83,22 @@ def init():
|
|||||||
dispQuickLog('mis')
|
dispQuickLog('mis')
|
||||||
|
|
||||||
init()
|
init()
|
||||||
|
|
||||||
|
def main():
|
||||||
|
timer = 0
|
||||||
|
finished = False
|
||||||
|
|
||||||
|
while not finished:
|
||||||
|
dispHeader()
|
||||||
|
dispTotals()
|
||||||
|
dispSysInfo()
|
||||||
|
dispQuickLog('mis')
|
||||||
|
sleep(5);
|
||||||
|
timer = timer + 1
|
||||||
|
if timer > 5:
|
||||||
|
finished = True
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|
||||||
gotoxy(1,24); writeln("|PA")
|
gotoxy(1,24); writeln("|PA")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user