Ping specified IPs, send mail when IPs were down.
Ex.
python pingservers.py 192.168.0.1,192.168.0.2
Split large file to smaller ones, every smaller file contains 100000 lines.
Ex.
python splitfile.py D:\largefile.log
largefile.log will be splitted to
largefile.1.log
largefile.2.log
largefile.3.log
largefile.4.log
largefile.5.log
...etc
Iterate a path to find a keyword.
Print the found line and previous line
Ex. python print_previousline_by_keyword.py D:\logs\ Exception
The behavior is just like "grep & grep again"
- Search keyword1 in all files
- Search keyword2 in all files, print line when keyword1 was same as keyword2
Ex. python search_keyword.py D:\logs\ "Exception.* clientJID=(?P<keyword1>.+)/.+" "play\. .+clientJID:(?P<keyword2>.+)/.+"
Search specified keyword regular expression
Ex. python print_keyword.py D:\logs "=clientJID=(?P.+)/.+"
Test nginx location
Ex. python testnginx_location.py /