Notices


Reply
Thread Tools
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#1
Customize Queen BeeCon Widget (>=v1.2) to display:
GPRS Traffic Grapher
WARNING!!! Package gnuplot required; please refer to gnuplot documentation for further details
The Beecon will display a graph with the progressive consumption of Total, Received and Sent GPRS data spent over time. It will also display green, yellow, red color/icons according to % consumption of a maximum specified threshold




  1. Install gnuplot package
    Code:
    sudo gainroot
    apt-get install gnuplot
  2. Import Beecon
    Code:
    [queen-beecon-header]
    version=1,000000
    checksum=8785092
    [queen-beecon-exported-instance]
    widgetType=0
    widgetVisible=1
    operationalStatus=0
    hideCanvas=false
    hideClickCanvas=true
    snippetBgRGB=0
    snippetExtBgRGB=#33333333ffff
    beecon_lt0_ImgZoom=0
    beecon_lt0_BgRGB=2
    beecon_lt0_ExtBgRGB=#808080808080
    beecon_lt0_ImgFilename=queen-beecon-syserr.png
    beecon_eq0_ImgZoom=13
    beecon_eq0_BgRGB=3
    beecon_eq0_ExtBgRGB=#0000ffff0000
    beecon_eq0_ImgFilename=queen-beecon-appok.png
    beecon_eq1_ImgZoom=13
    beecon_eq1_BgRGB=4
    beecon_eq1_ExtBgRGB=#ffffffff0000
    beecon_eq1_ImgFilename=queen-beecon-appwrn.png
    beecon_ge2_ImgZoom=13
    beecon_ge2_BgRGB=5
    beecon_ge2_ExtBgRGB=#ffff00000000
    beecon_ge2_ImgFilename=queen-beecon-apperr.png
    beecon_idxge2_ImgZoom=0
    beecon_idxge2_BgRGB=11
    beecon_idxge2_ExtBgRGB=#0000ffffffff
    beecon_idxge2_ImgFilename=queen-beecon-index.png
    widWidth=410
    widHeight=210
    instanceTitle=QBW GPRS Tfx Grapher 
    instanceCmd=MAX=600;FROM=20100814;TO=20101013;YEL=90;RED=95;rx=$(gconftool-2 -g /system/osso/connectivity/network_type/GPRS/gprs_home_rx_bytes);tx=$(gconftool-2 -g /system/osso/connectivity/network_type/GPRS/gprs_home_tx_bytes); echo "`date '+%Y%m%d%H%M'` $tx $rx" >> /home/user/.queen_beecon_dir/qbw_gprs_grapher.dat ; echo -e "reset\\n#set style line 1 lt 1 lw 3\\nset lmargin 6\\nset bmargin 1.5\\nset rmargin 1\\nset tmargin 1.5\\nset terminal png size 400,200\\nset xdata time\\nset timefmt \\"%Y%m%d%H%M\\"\\nset output \\"/home/user/.queen_beecon_dir/qbw_gprs_grapher.png\\"\\n# time range must be in same format as data file\\nset xrange [\\"${FROM}0000\\":\\"${TO}2400\\"]\\nset yrange [0:$MAX]\\nset grid\\n#set xlabel \\"Date/Time\\"\\n#set ylabel \\"Load\\"\\n#set title \\"GPRS Grapher\\"\\nset key horiz left top outside\\nplot \\"/home/user/.queen_beecon_dir/qbw_gprs_grapher.dat\\" index 0 using 1:((\\$2+\\$3)/1048576) title \\"Tot\\" with lines lw 3, \\"/home/user/.queen_beecon_dir/qbw_gprs_grapher.dat\\" index 0 using 1:(\\$3/1048576) title \\"Rx\\" with lines lw 3, \\"/home/user/.queen_beecon_dir/qbw_gprs_grapher.dat\\" index 0 using 1:(\\$2/1048576) title \\"Tx\\" with lines lw 3" > /home/user/.queen_beecon_dir/qbw_gprs_grapher.plt; gnuplot /home/user/.queen_beecon_dir/qbw_gprs_grapher.plt;echo " `date '+%H:%M'`";pct="`expr \\( $tx + $rx \\) \\/ 1048576 \\* 100 \\/ $MAX`"; x=0; if [ $pct -gt $YEL ];then x=1;fi; if [ $pct -gt $RED ];then x=2; fi; exit $x;
    rememberMe=
    cmdImgFilename=qbw_gprs_grapher.png
    cmdImgAngle=0
    cmdImgZoom=0
    cmdFgRGB=1
    cmdExtFgRGB=#444444444444
    cmdTextAngle=0
    cmdVisibilityPosition=3
    cmdImgVisibilityPosition=5
    cmdJustify=0
    cmdExtFont=Tahoma 10
    cmdFontName=3
    cmdFontSize=12
    resImgFilename=
    resImgAngle=0
    resImgZoom=0
    resFgRGB=1
    resExtFgRGB=#00007777ffff
    resTextAngle=0
    resVisibilityPosition=1
    resImgVisibilityPosition=7
    resJustify=0
    resExtFont=Nokia Sans bold 11
    resFontName=2
    resFontSize=12
    progressAnimationFrames=4
    progressAnimationTimer=4
    progressAnimationPos=4
    progressAnimationAtClickXY=false
    progressAnimationBasename=queen-beecon-progress
    updOnStartup=false
    updOnClick=true
    updOnDesktop=true
    updOnSight=false
    delayIndex=4
    customIntervalSecs=0
    updNeworkPolicy=0
    updOnDBUS=0
    updOnDBUSBus=0
    updOnDBUSMatchRule=
  3. Edit command and customize:
    Code:
    MAX=600;FROM=20100814;TO=20101013;YEL=90;RED=95;...
    MAX = Threshold for Data Consumption (in MB)
    FROM = Display period FROM date (YYYYMMDD format)
    TO = Display period FROM date (YYYYMMDD format)
    YEL = Yellow alert % Threshold
    RED = Red alert % Threshold

  4. Beecon updates: @Interval:30min, @Click, @Desktop

  5. Beecon collects data, creates plt script for gnuplot and drops png in /home/user/.queen_beecon_dir directory

  6. Enjoy the new GNUPLOT world ...
__________________
Have a look at Queen BeeCon Widget (WIKI) Customizable and flexible widget-based multi-instance monitoring, alerting and interactive tool for the N900
Please provide comments and feedback for having QBW supported and enhanced further - (DONATE) - v1.3.3devel / v1.3.3testing / v1.3.3extras

Last edited by No!No!No!Yes!; 2010-09-28 at 19:31.
 

The Following 3 Users Say Thank You to No!No!No!Yes! For This Useful Post:
Posts: 50 | Thanked: 6 times | Joined on Nov 2010
#2
Bro,

iam getting Checksum error.
 
Posts: 50 | Thanked: 6 times | Joined on Nov 2010
#3
Its work fine now. Anyway how to change the MRTG white color to transparent
 
Posts: 50 | Thanked: 6 times | Joined on Nov 2010
#4
Bro,

Its work fine now. Anyway how to change the MRTG background white color to transparent
 
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#5
http://www.manpagez.com/info/gnuplot...nuplot_414.php
__________________
Have a look at Queen BeeCon Widget (WIKI) Customizable and flexible widget-based multi-instance monitoring, alerting and interactive tool for the N900
Please provide comments and feedback for having QBW supported and enhanced further - (DONATE) - v1.3.3devel / v1.3.3testing / v1.3.3extras
 
Posts: 50 | Thanked: 6 times | Joined on Nov 2010
#6
Bro,

Is there any way to plot the throughput like Qnetman.

http://www.my-maemo.com/software/app...to=2265&faq=37
 
Posts: 146 | Thanked: 76 times | Joined on Feb 2010 @ Poland
#7
Great Work! Simply amazing.

How would the script look like to plot the battery charge, volts and percentage?
__________________
Remember to click Thanks! if this post is of any help
 
Reply


 
Forum Jump


All times are GMT. The time now is 14:46.