#!/bin/bash name=mpstat timediff=$1 suffix=$2 popis=$3 width=$4 PATH=$PATH:/opt/rrdtool/bin datadir=/var/statistiky/system target_img_dir="/var/www/heaven/stat/img" cd $datadir xgridstr="" if [ $timediff -ge 604800 ] then xgridstr="--x-grid HOUR:12:DAY:1:DAY:1:86400:%d.%m." fi if [ $timediff -ge 2678400 ] then xgridstr="--x-grid DAY:1:DAY:7:DAY:2:86400:%d.%m." fi now=`date +%s` if [ $timediff -gt 7200 ] then for stat in user nice system iowait irq softirq idle intrs do rrdtool graph ${target_img_dir}/${name}_${stat}_${suffix}.png --imgformat PNG --start `expr $now - ${timediff}` --end $now \ DEF:avg_value=${name}.rrd:${stat}:AVERAGE \ DEF:min_value=${name}.rrd:${stat}:MIN \ DEF:max_value=${name}.rrd:${stat}:MAX \ CDEF:avg1=PREV\(avg_value\) \ CDEF:avg2=PREV\(avg1\) \ CDEF:min1=PREV\(min_value\) \ CDEF:max1=PREV\(max_value\) \ CDEF:prumer_avg=avg_value,avg1,avg2,+,+,3,/ \ CDEF:maxmin=max1,min1,- \ AREA:min1#FFFFFF \ STACK:maxmin#e0e0e0 \ LINE1:max1#FFa1a1:"max" \ LINE1:min1#a8a8FF:"min" \ LINE2:prumer_avg#202020:"avg" \ --vertical-label "CPU time [%]" \ --height 200 \ --width ${width} \ ${xgridstr} \ --title "${stat} ${name} ${popis}" done else for stat in user nice system iowait irq softirq idle intrs do rrdtool graph ${target_img_dir}/${name}_${stat}_${suffix}.png --imgformat PNG --start `expr $now - ${timediff}` --end $now \ DEF:value=${name}.rrd:${stat}:MAX \ LINE1:value#000000 \ --vertical-label "CPU time [%]" \ --height 200 \ --width ${width} \ ${xgridstr} \ --title "${stat} ${name} ${popis}" done fi
WebSVN - crusader - Blame - Rev 1 - /trunk/statistiky/opt/statistiky/makeobr_system_info.sh
Català-Valencià - Catalan
Česky - Cesky
Dansk - Dansk
Dutch - Dutch
English - English
Finnish - Finnish
Français - Francais
Deutsch - German
עברית - Hebrew
Magyar - Hungarian
Bahasa Indonesia - Indonesian
Italiano - Italian
日本語 - Japanese
한국어 - Korean
Norsk - Norwegian
Polski - Polish
Português - Portuguese
Português - Brazilian Portuguese
Русский - Russian
中文 - Simplified Chinese
Slovenčina - Slovak
Slovenčina - Slovenian
Español - Spanish
Svenska - Swedish
中文 - Traditional Chinese
Türkçe - Turkish
Oëzbekcha - Uzbek
crusader
Subversion Repositories:
banderdyn
centos.prosek.czf
crusader
czf4bfu
czf4bfu.prosek.czf
czfcentos
czfgmap
discover
fedora.prosek.czf
freenet-router
ftth
getonlineclouds
hotsanic
internet.prosek.czf
is
mapstats
meteolinger
netmap
qos
sedlo
sedlo.prosek.czf
switches
vbtobb
vlubnt
weathermap
weatherstats
websvn
wifidashboard
wifimon
www.prosek.czf
xenstats
[
/
] [
trunk/
] [
statistiky/
] [
opt/
] [
statistiky/
] [
makeobr_system_info.sh
] - Blame information for rev
1
Line No.
Rev
Author
Line
Powered by
WebSVN
2.2.1