mirror of https://github.com/ShaYmez/HBMonv2.git
commit
9d2c6a0207
|
@ -43,7 +43,7 @@ php support running on the server.
|
|||
|
||||
The logo image you can replace with file image in html directory img/logo.png
|
||||
cp utils/lastheard /etc/cron.daily/
|
||||
chmod +x /etc/cron.daily/lastherad
|
||||
chmod +x /etc/cron.daily/lastheard
|
||||
cp utils/hbmon.service /lib/systemd/system/
|
||||
systemctl enable hbmon
|
||||
systemctl start hbmon
|
||||
|
@ -60,7 +60,7 @@ php support running on the server.
|
|||
|
||||
if int(float(p[9])) > 2:
|
||||
|
||||
If you want to have more than the last 15 entries in the Lastherad table
|
||||
If you want to have more than the last 15 entries in the Lastheard table
|
||||
change in the monitor.py file line from:
|
||||
|
||||
# maximum number of lists in lastheard on the main page
|
||||
|
|
|
@ -9,7 +9,7 @@ The ezSM you can download from: https://www.ezservermonitor.com/
|
|||
mv ezservermonitor-web esm
|
||||
cd esm/conf/
|
||||
|
||||
Edit file esm.config.json and read domunetation about configuration: https://www.ezservermonitor.com/esm-web/documentation
|
||||
Edit file esm.config.json and read documentation about configuration: https://www.ezservermonitor.com/esm-web/documentation
|
||||
Edit file /var/www/html/buttons.html and change link from
|
||||
|
||||
<a href="sysinfo.php"><button class="button link"> System Info </button></a>
|
||||
|
@ -54,7 +54,7 @@ Install package:
|
|||
Change scripts to execute:
|
||||
|
||||
chmod +x /opt/HBMonv2/sysinfo/cpu.sh
|
||||
chmod +x /opt/HBMonv2/sysinfo/grap.sh
|
||||
chmod +x /opt/HBMonv2/sysinfo/graph.sh
|
||||
chmod +x /opt/HBMonv2/sysinfo/rrd-db.sh
|
||||
|
||||
Run script create database
|
||||
|
@ -83,13 +83,7 @@ where is located your html files of HBMon
|
|||
Setup temperature depend of your computer
|
||||
On raspberry pi or PC you can use sensors package to get temperature CPU
|
||||
|
||||
If not avilable set:
|
||||
|
||||
tempcpu=false
|
||||
|
||||
For VPS set:
|
||||
tempcpu=false
|
||||
|
||||
If you don't want to show temperature on the Pi, comment out the line that gets the temp
|
||||
|
||||
Optional display network traffic
|
||||
===============================
|
||||
|
@ -124,8 +118,11 @@ path to your webserver html directory where is html files for HBMon:
|
|||
|
||||
WorkDir:/var/www/html/hbmon/img/mrtg
|
||||
|
||||
or
|
||||
|
||||
Put below lines in section your netrwork card
|
||||
WorkDir:/var/www/html/img/mrtg
|
||||
|
||||
Put below lines in section your network card
|
||||
and replace localhost_2 to your name network card as result cfgmaker generate in mrtg.cfg
|
||||
|
||||
XSize[localhost_2]: 600
|
||||
|
|
|
@ -7,26 +7,22 @@ WEB_PATH='/var/www/html/'
|
|||
|
||||
# Temperature CPU (not working for VPS)
|
||||
|
||||
# Disable = false or enable = true create graph fortemperature CPU
|
||||
|
||||
tempcpu=false
|
||||
|
||||
# Setup temperature for CPU ============
|
||||
|
||||
#For Raspberry PI:
|
||||
|
||||
#For Raspberry PI, comment next 4 lines if you don't want temperature:
|
||||
|
||||
FILE=/sys/class/thermal/thermal_zone0/temp
|
||||
if [[ -f "$FILE" ]]; then
|
||||
tempC=`cat /sys/class/thermal/thermal_zone0/temp |awk '{printf("%.1f",$1)}'`
|
||||
tempC=`cat /sys/class/thermal/thermal_zone0/temp |awk '{printf("%.1f",$1/1000)}'`
|
||||
fi
|
||||
|
||||
# For compuers not like Raspberry PI install package
|
||||
# For computers not like Raspberry PI install package
|
||||
# at install lm-sensors
|
||||
# and run: sensors-detect
|
||||
# after this check result run command: sensors to see temperature CPU, if no set above tempcpu=false
|
||||
# after this check result run command: sensors to see temperature CPU
|
||||
|
||||
# Remove when use for Raspberry PI (see above)
|
||||
if $tempcpu == "True" ; then
|
||||
if [ -z "$tempC" ] ; then
|
||||
tempC=`sensors | grep -i "Core 0" | grep "$1" | sed -re "s/.*:[^+]*?[+]([.0-9]+)[ °]C.*/\1/g"`
|
||||
fi
|
||||
|
||||
|
@ -46,7 +42,7 @@ NOW=`date -u +%s`
|
|||
|
||||
# Update db =====================================================
|
||||
|
||||
if $tempcpu == "True" ; then
|
||||
if [ -n "$tempC" ] ; then
|
||||
/usr/bin/rrdtool update /opt/HBMonv2/sysinfo/tempC.rrd $NOW:$tempC
|
||||
fi
|
||||
|
||||
|
@ -57,7 +53,7 @@ fi
|
|||
# Generate images ================================================================
|
||||
|
||||
|
||||
if $tempcpu == "True" ; then
|
||||
if [ -n "$tempC" ] ; then
|
||||
# Temperature CPU
|
||||
/usr/bin/rrdtool graph $WEB_PATH/img/tempC.png -t "Temperature CPU 24H - `/bin/date`" \
|
||||
--rigid --alt-y-grid --alt-autoscale --units-exponent 0 \
|
||||
|
|
Loading…
Reference in New Issue