Well, sometimes one wonders why people write tools that wheight a megabyte, when it’s easy to stick together one or two tools with a script and have the same thing.
Here’s a ruby script that generates a ping latency graph (target is google):
#!/usr/bin/ruby
#
# based on
# http://oss.oetiker.ch/rrdtool/prog/rrdruby.en.html example
# with help of the tutorial
# http://oss.oetiker.ch/rrdtool/tut/rrdtutorial.en.html
# and the docu
# http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html
#
# placed in the public domain by Tomáš Pospíšek
require "RRD"
$rrd = `mktemp /tmp/tmp.XXXXXXXX`.chomp
$grafik = `mktemp /tmp/tmp.XXXXXXXX`.chomp
$start = 0
def now()
Time.now.to_i
end
def create()
$start=now()
RRD.create(
$rrd,
"--start", "#{$start - 1}",
"--step", "#{1}", # every 1s
"DS:pinglatency:GAUGE:10:0:200", # 10s of missing data are OK, min=0, max=200 (ping time)
"RRA:AVERAGE:0.5:1:#{60*30}") # 60 seconds * 30 minutes
puts "RRD database created #{$rrd} at #{$start}"
puts "Your graph is at #{$grafik}"
end
def ping_latency
`ping -c 1 -n -w 1 google.com` =~ /.* time=(\d+)/
# 64 bytes from 74.125.43.147: icmp_seq=1 ttl=52 time=31.6 ms
return $1
end
def update()
puts "updating #{$rrd} with #{now()}:#{ping_latency()}"
RRD.update($rrd, "#{now()}:#{ping_latency()}")
end
def generate_gfx()
# puts "generating graph #{$grafik}"
RRD.graph(
"#{$grafik}",
"--title", " Ping latency to Google",
"--x-grid", "SECOND:10:MINUTE:1:MINUTE:2:0:%X",
"--start", $start.to_s,
# "--end", # -> now
"--interlace",
"--imgformat", "PNG",
"--width=450",
"DEF:pinglatency=#{$rrd}:pinglatency:AVERAGE",
"AREA:pinglatency#00b6e4:ms")
end
#main
create()
while(true)
update()
generate_gfx()
sleep 1
end
It generates a graph like this:

Posted on August 10th, 2010 by pka |
Kurz nach dem Release von QGIS 1.5, das mit vielen neuen Funktionen aufwartet, ist auch der QGIS Mapserver in der Version 1.0 verfügbar.
Der QGIS Mapserver ist ein WMS Server, der ursprünglich am Institut für Kartographie der ETH Zürich entwickelt wurde. In der Version 1.0 können neben der Symbolisierierung mit SLD auch QGIS-Projekte direkt als WMS publiziert werden. Dank der von Sourcepole entwickelten nativen Unterstützung von QGIS-Projekten, können mit QGIS erstellte Karten ohne Konvertierungverluste direkt als WMS-Dienst publiziert werden. Dabei werden alle Funktionen der QGIS-Symbolisierung, wie zum Beispiel der neue regelbasierte Symbolizer unterstützt.
Für Ubuntu Lucid ist ein Paket auf dem Ubuntugis-Repository verfügbar, der Quellcode kann von Github heruntergeladen werden.
Mehr Informationen gibt es an der FOSS4G in Barcelona, wo der QGIS Mapserver beim WMS Performance Shootout und auf der OSGeo Live DVD vertreten ist. An der GIScience 2010 in Zürich findet zudem ein Workshop statt.
Sourcepole bedankt sich bei der Stadt Uster für den Auftrag zur Weiterentwicklung des QGIS-Mapservers. Weitere Informationen und Dienstleistungen von Sourcepole im QGIS-Umfeld sind auf unserer QGIS-Seite zu finden.
Posted on July 17th, 2010 by tpo |
Occassionaly we’ve been seeing messages like:
spam acl condition: error reading from spamd socket: Connection reset by peer
in /var/log/exim4/paniclog
But lately the problem has become much more persistent. I found out, that there’s some arsehole spammer sending us 500K spams every ca. 70 minutes. From /var/log/mail.log:
Jul 17 08:52:32 mail spamd[477]: spamd: identified spam (7.9/5.0) for spamd:1004 in 288.5 seconds, 505669 bytes.
Now since spamassassin would take that long (nearly 5 minutes!!!) to find out whether that mail is a spam or not, exim would simply timeout it’s connection to spamassassin and the result was the message seen above.
What I did was to use sa-compile to compile the SA rules to “native code” and to enable “Rule2XSBody”, which on Debian lives in /etc/spamassassin/v320.pre.
This seems to make SA quite a lot faster and to use less CPU.
If this won’t help we could also restrict the maximum size of messages to scan.
Yours Tomáš Pospíšek
Posted on June 22nd, 2010 by pka
Die internationale Open Source GIS-Konferenez FOSS4G findet dieses Jahr vom 6.-9. September 2010 in Barcelona statt.
Sourcepole ist mit drei Vorträgen vertreten:
- Comparison of Open Source Virtual Globes
- Performance and statistical analysis of WMS servers
- SpatiaLite, the Shapefile of the future?
Zusätzlich unterstützen wir den QGIS-Workshop und nehmen mit dem QGIS-Mapserver an WMS Performance Shootout teil.
Posted on June 4th, 2010 by tpo
Since I found Michel de Boer’s explanation of many of the fundamental SIP concepts in his 2005 dutch presentation of the Twinkle SIP phone very short and easy to follow - contrary to a lot of other material about SIP out there - I’ve translated it to english.
Here it is: Twinkle - a SIP softphone for Linux
Posted on June 3rd, 2010 by tpo
Well, sometimes one wonders why people write tools that wheight a megabyte, when it’s easy to stick together one or two tools with a script and have the same thing.
Here’s a ruby script that generates a ping latency graph (target is google):
#!/usr/bin/ruby
#
# based on
# http://oss.oetiker.ch/rrdtool/prog/rrdruby.en.html example
# with help of the tutorial
# http://oss.oetiker.ch/rrdtool/tut/rrdtutorial.en.html
# and the docu
# http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html
#
# placed in the public domain by Tomáš Pospíšek
require "RRD"
$rrd = `mktemp /tmp/tmp.XXXXXXXX`.chomp
$grafik = `mktemp /tmp/tmp.XXXXXXXX`.chomp
$start = 0
def now()
Time.now.to_i
end
def create()
$start=now()
RRD.create(
$rrd,
"--start", "#{$start - 1}",
"--step", "#{1}", # every 1s
"DS:pinglatency:GAUGE:10:0:200", # 10s of missing data are OK, min=0, max=200 (ping time)
"RRA:AVERAGE:0.5:1:#{60*30}") # 60 seconds * 30 minutes
puts "RRD database created #{$rrd} at #{$start}"
puts "Your graph is at #{$grafik}"
end
def ping_latency
`ping -c 1 -n -w 1 google.com` =~ /.* time=(\d+)/
# 64 bytes from 74.125.43.147: icmp_seq=1 ttl=52 time=31.6 ms
return $1
end
def update()
puts "updating #{$rrd} with #{now()}:#{ping_latency()}"
RRD.update($rrd, "#{now()}:#{ping_latency()}")
end
def generate_gfx()
# puts "generating graph #{$grafik}"
RRD.graph(
"#{$grafik}",
"--title", " Ping latency to Google",
"--x-grid", "SECOND:10:MINUTE:1:MINUTE:2:0:%X",
"--start", $start.to_s,
# "--end", # -> now
"--interlace",
"--imgformat", "PNG",
"--width=450",
"DEF:pinglatency=#{$rrd}:pinglatency:AVERAGE",
"AREA:pinglatency#00b6e4:ms")
end
#main
create()
while(true)
update()
generate_gfx()
sleep 1
end
It generates a graph like this:
