kinghows / Logchart

Logchart

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Logchart

Export log to HTML chart.

chart used pyecharts 1.6+

pip install pyecharts

Logchart.ini:

logfile_directory

monitor_index

execute:

use Logchart.ini:

python Logchart.py

or

input parameters:

python Logchart.py -d D:\GitHub\log

python Logchart.py -d D:\GitHub\log -m "cn_flush_bio,total write bio"

python Logchart_iostat.py -d D:\GitHub\log -m "rMB/s,wMB/s,r_await,w_await,svctm,util" -g "dm-5,dm-6"

Enjoy it!

iomon:

yum install dstat

yum install sysstat -y

mkdir -p /root/monitor/log

chmod +x /root/monitor/iomon.sh

crontab -e

0 0 * * * /bin/bash /root/monitor/iomon.sh >>/root/monitor/iomon.log

0 0 * * * /bin/bash /root/monitor/iomon_email.sh >>/root/monitor/iomon_email.log

exe:

pyinstaller --add-data=".\datasets;pyecharts\datasets." --add-data=".\templates;pyecharts\render\templates." -F -w Logchart.py

pyinstaller --add-data=".\datasets;pyecharts\datasets." --add-data=".\templates;pyecharts\render\templates." -F -w Logchart_dstat.py

pyinstaller --add-data=".\datasets;pyecharts\datasets." --add-data=".\templates;pyecharts\render\templates." -F -w Logchart_iostat.py

好用的DBA系列,喜欢的请打颗星:

About

Logchart

License:MIT License


Languages

Language:HTML 99.6%Language:Python 0.3%Language:Shell 0.0%