Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
How to create a system log checker using python
SUBMITTED BY:
alemotta
DATE:
April 13, 2017, 9:13 p.m.
FORMAT:
Text only
SIZE:
274 Bytes
Raw
Download
Tweet
HITS:
573
Go to comments
Report
How to create a system log checker using python
#!/usr/bin/env python
logfile = open("/var/log/syslog", "r")
for line in logfile:
line_split = line.split()
print line_split
list = line_split[0], line_split[1], line_split[2], line_split[4]
print list
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus