mirror of
https://github.com/moexe/FFFGateway-Monitoring.git
synced 2024-11-23 22:23:41 +01:00
88a1f885c0
* Anzahl der Clients in has und has-sued als Gnuplot !!!! gnuplot installieren !!!! * Anzahl und Auflisten der fastd und l2tp Router
18 lines
595 B
Bash
Executable File
18 lines
595 B
Bash
Executable File
#!/bin/bash
|
|
|
|
#get the file from has2
|
|
wget -O /tmp/clients http://5.189.166.50/test.html
|
|
|
|
date=$(date +%Y:%m:%d:%H:%M:%S)
|
|
|
|
all=$(grep Clients /tmp/clients | cut -f 2 -d" " | cut -f1 -d"<")
|
|
has=$(grep Hassberge: /tmp/clients | cut -f 2 -d" " | cut -f1 -d"<")
|
|
sued=$(grep Sued /tmp/clients | cut -f 3 -d" " | cut -f1 -d"<")
|
|
|
|
echo "$date $all $has $sued" >> /var/www/html/has-mon/data/clients.dat
|
|
# dat länge begrenzen
|
|
tail -450 /var/www/html/has-mon/data/clients.dat > /tmp/clients.dat
|
|
grep -v ^$ /tmp/clients.dat > /var/www/html/has-mon/data/clients.dat
|
|
|
|
/var/www/html/has-mon/sensors/clients.pl
|