News items for tag statistics - Koos van den Hout

2019-04-01 Plotting the number of radio contacts after varying months 2 weeks ago
QSO count plot up to March 2019 After a month with a holiday and a month with one contest I redid the QSO count plot to see the development.

before, before, before, before, before

Tags: , ,
2019-04-01 Wat volts extra 2 weeks ago
UPS invoer voltage laatste jaar Het viel me op in de grafieken van het invoer voltage volgens de UPS dat het voltage vanaf het stroomnet is gestegen tot 238 volt aan het eind van september 2018. Ik vraag me af wat de oorzaak is van deze wijziging. Het kan niet zijn door de toename van zonnepanelen in de omgeving, het gestegen voltage is zowel overdag als 's nachts.

Tags: , ,
2019-02-27 Rare verandering in VDSL upstream snelheid 1 month ago
VDSL upstream snelheid week Ineens is de haalbare VDSL upstream snelheid (engels 'attainable') gezakt naar wat daarvoor ongeveer de huidige VDSL upstream snelheid (engels 'current') was. Een opvallende hik in de grafieken. Ik heb geen idee wat de aanleiding is en of dit weer kan veranderen.

Dit is alleen te zien in het modem, de hele PPP sessie is gewoon in stand gebleven.

Tags: , ,
2019-02-01 Plotting the number of amateur radio contacts after a contesting month 2 months ago
QSO count plot up to January 2019 After a month with three digimode radio contests I plotted the number of amateur radio contacts again. The number of contacts is clearly higher each January as a contest month, with this January a new peak.

The contests were the ARRL RTTY Roundup on 6 and 7 January, the UBA PSK63 prefix contest on 12 and 13 January and the BARTG RTTY Sprint Contest on 26 and 27 January.

Nicer looking font due to the upgrade of "radio workstation" thompson. I guess even gnuplot is coming along with the modern times.

before, before, before, before

Tags: , , ,
2019-01-01 Switching to 1-wire over USB and forwarding a USB device to a guest VM 3 months ago
The new hardware for the homeserver has no external serial ports, so I could not use the old serial / 1-wire interface that has been doing the home monitoring for years. But I had a spare USB DS2490 interface. So I plugged this into the server and wanted to forward the USB device to the guest VM that runs all the monitoring.

First I had to blacklist all the loaded drivers to have the device available to kvm as-is. In /etc/modprobe.d/local-config.conf:
blacklist w1_smem
blacklist ds2490
blacklist wire
Next step was to attach the device to the right vm. I followed the hints at How to auto-hotplug usb devices to libvirt VMs (Update 1) and edited the definition for the vm to get the host device like:
    <hostdev mode='subsystem' type='usb' managed='no'>
        <vendor id='0x04fa'/>
        <product id='0x2490'/>
But that did not get the usb device attached to the running VM and I did not feel like rebooting it. So I created an extra file with the above and did a
root@conway:~# virsh attach-device --live gosper /tmp/onewire.xml 
Device attached successfully
And then I had to do the same blacklisting as above in the virtual machine. After doing that I detached and attached it from the VM without touching it with simply:
root@conway:~# virsh detach-device --live gosper /tmp/onewire.xml 
Device detached successfully

root@conway:~# virsh attach-device --live gosper /tmp/onewire.xml 
Device attached successfully
After that I had to set up rules for the telemetry user to have enough access to the USB device:
SUBSYSTEMS=="usb", GOTO="usb_w1_start"
ATTRS{idVendor}=="04fa", ATTRS{idProduct}=="2490", GROUP="telemetry", MODE="0666"
And now it all works:
telemetry@gosper:~$ digitemp_DS2490 -a
DigiTemp v3.7.1 Copyright 1996-2015 by Brian C. Lane
GNU General Public License v2.0 -
Found DS2490 device #1 at 002/003
Jan 01 21:53:11 Sensor 10A8B16B0108005D C: 9.500000
Jan 01 21:53:12 Sensor 28627F560200002F C: 17.062500
Jan 01 21:53:14 Sensor 10BC428A010800F4 C: 19.562500
Jan 01 21:53:15 Sensor 1011756B010800F1 C: 11.937500
Jan 01 21:53:16 Sensor 10B59F6B01080016 C: 16.312500
Jan 01 21:53:17 Sensor 1073B06B010800AC C: 18.687500
Jan 01 21:53:18 Sensor 102B2E8A010800F0 C: 29.250000
Jan 01 21:53:20 Sensor 28EF71560200002D C: 16.687500
Working house temperatures again!

Tags: , , , ,
2018-11-05 De gevolgen van DSL interleave 5 months ago
Ping stats Gisterenavond dus toegekomen aan het vervangen van het vdsl modem na de eerdere storing en ineens viel me wat op in de ping stats: tijdens het gebruik van de fritzbox was de round trip tijd lager en stabieler, de uitschieters naar boven komen dus puur van de vdsl laag. De fritzbox zet de interleave uit (fast/fast), de huidige modemdriver in de vigor op fast down en interleaved up.

Misschien toch eens een andere vdsl driver proberen op de vigor.
Read the rest of De gevolgen van DSL interleave

Tags: , ,
2018-10-12 Serious slowness with rrdgraph from rrdtool 6 months ago
One of the things still needing migrating is the NTP server stats which obviously uses rrdtool. Because I want to keep the history I migrated the datasets with:
/usr/local/rrdtool/bin/rrdtool dump \
| ssh newhost /usr/bin/rrdtool restore -f -
And then create a graph of the plloffset for example using:
/usr/bin/rrdtool graph /tmp/ \
--title " pll offset (last 24 hours)" --imginfo \
'<img src="tmpgraphs/%s" WIDTH="%lu" HEIGHT="%lu" alt="Graph">' \
--start -24hours --end now --vertical-label="Seconds" --color BACK#0000FF \
--color CANVAS#c0e5ff --color FONT#ffffff --color GRID#ffffff \
--color MGRID#ffffff --alt-autoscale --imgformat PNG --lazy \ \
CDEF:wipeout=offset,UN,INF,UNKN,IF CDEF:wipeoutn=wipeout,-1,* \
LINE1:offset#000000:"Offset\:" \
GPRINT:offset:LAST:"Current\:%.3lf%s" \
GPRINT:offset:MIN:"Min\:%.3lf%S" \
GPRINT:offset:MAX:"Max\:%.3lf%S" \
GPRINT:offset:AVERAGE:"Average\:%.3lf%S" \
AREA:wipeout#e0e0e0 AREA:wipeoutn#e0e0e0
But on the old server this takes 0.026 seconds, on the new server 3 minutes and 47.46 seconds. No idea what is happening, strace shows nothing strange and rrdtool uses 1 cpu at 100% all that time.
Read the rest of Serious slowness with rrdgraph from rrdtool

Tags: , , ,
2018-09-07 Plotting the number of amateur radio contacts 7 months ago
QSL count plot up to August 2018 After the SCC RTTY contest in August I decided to plot the number of amateur radio contacts again. Clearly visible are months with contests I participate in. And the influence of the summer holiday.

before, before, before

Tags: , ,
2018-09-06 Weird interface names in snmp due to virtio driver 7 months ago
I want to measure network traffic so I decided to copy most of my rrdtool setup from the old home server.

But with virtio network cards I have a confused snmpd:
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: Red Hat, Inc Device 0001
IF-MIB::ifDescr.3 = STRING: Red Hat, Inc Device 0001
IF-MIB::ifDescr.4 = STRING: Red Hat, Inc Device 0001
IF-MIB::ifDescr.5 = STRING: dummy0
IF-MIB::ifDescr.6 = STRING: dumhost
IF-MIB::ifDescr.7 = STRING: dumdh6
Fix: go for the IF-MIB::ifName snmp variables, found in oid
IF-MIB::ifName.1 = STRING: lo
IF-MIB::ifName.2 = STRING: eth0
IF-MIB::ifName.3 = STRING: eth1
IF-MIB::ifName.4 = STRING: eth2
IF-MIB::ifName.5 = STRING: dummy0
IF-MIB::ifName.6 = STRING: dumhost
IF-MIB::ifName.7 = STRING: dumdh6
Those are easier to discern, now my snmp scripts are gathering data again.

Tags: , , ,
2018-04-26 More radio maps and their limits 11 months ago
The PE4KH website has maps of the locations where I contacted radio amateurs all over the world. The maps with generated images are created by exporting my locators worked/confirmed from cqrlog and using gcmwin for linux with a whole set of different configurations to plot the results.

But now the 2 meter band has been added and on that band a 'record distance' is not as far as on HF. On HF my current distance record was a contact with Australia at 16581 kilometers. My current distance record on the 2 meter band is 363 kilometer in Germany. Quite a different scale!

So the maps part has been enhanced with a 2 meter contacts map, but gcmwin can't use 6-position maidenhead locators so the map is quite coarse compared to what I want. I don't know the solution at the moment to improve this. The recent qso map PE4KH does show the more precise gridsquares when available in the log, so maybe that page needs distances added.
Read the rest of More radio maps and their limits

Tags: , ,
2018-03-01 An interesting bug in age-old Perl Net::SNMP code 1 year ago
I recently noticed the network traffic statistics weren't updated correctly for the LAN interface of my Draytek Vigor 130 modem. These statistics were extracted using code that I originally started using at the computer science systems group somewhere in the previous decade. It's all Perl Net::SNMP and not very efficient. I don't know if I wrote it myself or copied from somewhere else, I do know a new bug was introduced.

To understand the code it is important to realize that interface index numbers in SNMP are dynamic. Across a reboot a certain number can change. Interface names are static, but those are never used directly in SNMP.

So to get from a static interface name to a dynamic interface index the interfaces.2.1.2 subtree (ifDescr) has to be fetched from the device and checked for the right names. To get the interface index from an snmp object identifier I used to use this bit of code:
# find the current interface indices for the wanted ^ interfaces
foreach my $oid (oid_lex_sort(keys(%table))) {
    if (oid_base_match($ifTable_ifDesc,$oid)){
#        printf("%s => %s\n", $oid, $table{$oid});
        if (defined $wantstuff{$table{$oid}}){
            # I am lazy. I fill a hash with the interface indices so I can
            # use it for lookups
        #    printf "Found ifindex %d for %s\n",$wantstuff{$table{$oid}}{ifindex},$table{$oid};
But note how the current ifDesc subtree is from the modem:
IF-MIB::ifDescr.1 = STRING: LAN
IF-MIB::ifDescr.4 = STRING: VDSL
IF-MIB::ifDescr.5 = STRING: Resrved
IF-MIB::ifDescr.6 = STRING: 
IF-MIB::ifDescr.7 = STRING: 
IF-MIB::ifDescr.8 = STRING: 
IF-MIB::ifDescr.20.101.1 = STRING: WAN1
IF-MIB::ifDescr.21.101.1 = STRING: WAN2
IF-MIB::ifDescr.22.101.1 = STRING: LAN_PORT1
Using that rindex function there are 4 instances of index 1. Which caused the very similar code looking for the ifInOctets, ifOutOctets and other counters to overwrite the result for index 1 with those from WAN1, WAN2 and LAN_PORT1.

So that code is now improved, no more rindex but a well-defined use of length:
# find the current interface indices for the wanted ^ interfaces
foreach my $oid (oid_lex_sort(keys(%table))) {
    if (oid_base_match($ifTable_ifDesc,$oid)){
        #printf("%s => %s\n", $oid, $table{$oid});
        if (defined $wantstuff{$table{$oid}}){
                        my $intindex=substr($oid,length($ifTable_ifDesc)+1);
                        #printf "Submatch found ifindex %d for %s\n",$intindex,$table{$oid};
            # I am lazy. I fill a hash with the interface indices so I can
            # use it for lookups
            #printf "Found ifindex %d for %s\n",$wantstuff{$table{$oid}}{ifindex},$table{$oid};

Tags: , ,
2018-02-11 Plotting the number of amateur radio contacts 1 year ago
After the end of January I decided to plot the number of contacts again. QSO count plot up to January 2018 January is a busy month with two contests for me but I did not make a lot of contacts outside of those contests this year. I added contacts from holidays and the PE4KH/P activities to the total count.

Some more work on the plot script, I think bars look better than a line graph. But you could spend hours in gnuplot making the plot just right...

The new script:
set output "qslcount.png"
set terminal png size 640,300 fontscale 0.7
set timefmt "%Y-%m"
set xlabel "Month"
set ylabel "Number of contacts"
set xdata time
set style fill solid
set xtics format "%b %Y"
set xtics rotate
set grid
set boxwidth 0.75 relative
set autoscale xfixmin
set autoscale xfixmax
plot "dataset-qsocount" using 1:2 title "Contacts/Month" with boxes
Update: And indeed the change in x autoscale was one bit more 'just right'. The first graph was in February 2017: Rising number of amateur radio contacts.

Tags: , , ,
2017-10-10 Plotting the number of contacts (again) 1 year ago
After working through the results of my participation in the Russian worldwide digimode contest 2017 I decided to run a graph again of contacts per month as I did in Februari 2017. And remember how I made those graphs this time and save it in a plot script. qsl count plot

And the plotscript:
set output "qslcount.png"
set terminal png size 440,300 fontscale 0.7
set timefmt "%Y-%m"
set xlabel "Month"
set ylabel "Number of contacts"
set xdata time
set style data lines
set xtics format "%b %Y" 
set xtics rotate
plot "dataset-qsocount" using 1:2 title "Contacts/Month"
The interesting peak in January 2017 is still visible, it was caused by two contests I participated in: the ARRL RTTY roundup 2017 and the UBA PSK63 prefix contest 2017.

Tags: , ,
2017-09-08 VDSL tijdelijk met ADSL2 snelheid 1 year ago
Ik had een hik vandaag met de DSL verbinding en toen was ineens de snelheid 15 mbit downstream en 1.2 mbit upstream in plaats van 103 mbit downstream en 27 mbit upstream wat ik meestal gewend ben. Het leken wel ADSL2 snelheden. Ook met maar 512 carriers van de 4096 in gebruik. Toch was het DSL profiel nog wel 17a, wat een VDSL profiel is.

Na een tweede hik was de snelheid weer gewoon wat ik gewend was met vectored VDSL.

Update 2017-09-11: De snelheid blijft toch inzakken. De verbinding is nog stabiel maar ik verwacht eigenlijk problemen in de komende tijd. Het regent veel de laatste dagen dus het kan zijn dat er ergens water in de telefoonkabels terecht komt.

Update 2017-09-12: VDSL downstream week 20170912 En na een nieuwe hik is de snelheid weer terug. Het blijft magie, maar omdat het radiofrequenties zijn verwacht ik dit soort magie.

Tags: , ,
2017-07-24 Getting a lot more entropy from the Raspberry Pi 1 year ago
Entropy graph of a Raspberry Pi On doing some research on randomness in Linux I found out about the rng-tools package which includes rngd which can get randomness from hardware random generators to linux /dev/random.

On the main homeserver greenblatt there was no hardware randomness source available, I already use randomsound to generate randomness from audio noise. I found out the Raspberry Pi has a hardware randomness source so I installed rng-tools and rngd was able to use it. The impact on the measured available entropy is quite visible.

Tags: , ,
2017-03-27 Meten en grafieken maken van Powerline Ethernet doorvoer 2 years ago
Uit de archieven omdat ik de server waar dit ooit op draaide wil herinstalleren voor andere projecten.

Bij de HCC PCgg netwerkgroep hadden we ooit een netwerk gebaseerd op PLC (powerline communicatie) waarbij ethernet over stroomdraden gaat. Daar heb ik ook scripts voor gebouwd om statistieken te verzamelen over de doorvoer. Op de locatie in Maarn was dat voor de verbinding naar buiten niet zo briljant, zie de rapporten in Bijeenkomst 20 maart 2010 - hcc!pc netwerkgroep.

Maar voordat ik de scripts weggooi die deze gegevens verzamelden en er grafiekjes van maakten nog even voor de eeuwigheid. Het testdlan script gaat uit van output van dlanlist als:
koos@metcalfe:~$ dlanlist eth0
Type    MAC address        Mbps TX/RX       Version/Product
local   00:0B:3B:5F:95:AB  ---.-- / ---.--  INT6000-MAC-3-3-3348-00-2764-20080808-FINAL-B devolo dLAN 200 AVplus [MT2165]
remote  00:0B:3B:6F:AE:90   73.50 / 112.88  INT6000-MAC-3-3-3348-00-2764-20080808-FINAL-B

  • testdlan vraag dlanlist van devolo voor de huidige snelheid van devolo interfaces op netwerkkaart(en)
  • graphdlan maak grafieken per dag
De opzet van de scripts was om altijd te draaien als de machine actief was en achteraf overzichten te hebben per dag activiteit (meestal zaterdagen van 10:00 tot 17:00).

Tags: , , ,
2017-02-12 Rising number of amateur radio contacts 2 years ago
I noticed recently the number of radio contacts made by my new callsign PE4KH which I started using in March 2016 was getting close to the number of radio contacts made by my previous callsign PD4KH between March 2013 and March 2016. A typical rise in contacts, mostly due to my skills improving and participating in contests. So I wanted to view the rise per month and did some searching how to ask the cqrlog databases and plot the results.

Oh, and now PE4KH has more contacts after a few new contacts logged in PSK31 mode on the 20 meter band today.
Read the rest of Rising number of amateur radio contacts

Tags: , , ,
2016-11-03 De gasmeter van de slimme meter ging over op wintertijd 2 years ago
Ik ontdekte dat de gasmeter niet meer uitgelezen werd in de scripts die de slimme meter bulletins verwerken. Bij het napluizen van de Dutch smart meter standard v4.0 P1 protocol bleek dat het bericht met de gasmeterstand (0-1:24.2.1) bij de 'Capture Time' een timestamp heeft met S voor summertime en W voor wintertime.

Het script is nu aangepast om dit goed te verwerken en nu zie ik weer het gasgebruik.

Tags: , ,
2016-09-04 De slimme meter uitlezen 2 years ago
Slimme meter uitlezen De slimme meter die meer dan een maand geleden ons huis in kwam wordt nu constant uitgelezen en de resulterende gegevens worden opgeslagen in rrdtool databases van het electriciteits- en gas gebruik.

Uitlezen van een seriele poort vanuit Perl bleek niet makkelijk stabiel te krijgen te zijn. Uiteindelijk heb ik maar een oplossing gekozen/geleend van iemand anders: een stuk python wat cu aanroept: P1/ at master · sanderjo/P1. Dit script zou nog iets robuuster zijn als het de CRC controleert, maar dat is dan een wens voor een toekomstige versie.

Vervolgens sla ik de output van dit script op in /var/run/telemetry/smartmeteroutput. De keuze voor /var/run is omdat ik niet elke vijf minuten op de SD kaart van de raspberry wil schrijven. Ik heb dus ook /etc/rc.local aangepast om een /var/run/telemetry met als eigenaar user telemetry te maken, er worden daar meer meetgegevens neergezet voor verdere verwerking in statistieken. Het telemetry concept wat ik gebruik is het verzamelen in ASCII leesbare vorm van meetgegevens op systemen waarna deze opgehaald kunnen worden door een verzamelaar die ze gaat importeren in rrdtool databases (of andere verzamelingen). Omdat de verbinding tussen het te monitoren systeem en de verzamelaar als onbetrouwbaar gezien wordt (sommige systemen waarvan ik meetgegevens verzamel zitten achter een hikkende wifi verbinding) worden de meetgegevens lokaal opgeslagen met een tijdsaanduiding in de bestandsnaam en worden ze in rrdtool geimporteerd met deze tijdsaanduiding.

Het script wat de meetgegevens van de slimme meter verwerkt moet er tegen kunnen dat er soms velden ontbreken. Ik heb er voor gekozen uiteindelijk de dag- en nacht tellerstanden afgenomen en teruggeleverd (meetwaardes 1.8.1, 1.8.2, 2.8.1 en 2.8.2 in de Dutch smart meter standard) als 'verplicht' te tellen en de overige meetwaardes als 'optioneel'.

Uiteindelijk komen er dan mooie grafieken uit. De conclusie die ik eerder trok dat uit energie meetwaarden per kwartier prima af te leiden is wat bewoners doen is nog steeds valide. Uit grafieken over langere termijn is ook keurig af te zien wanneer we op vakantie waren.

Tags: , , , ,
2016-06-23 A serious thunderstorm somewhat counted 2 years ago
Lightning strikes 20160623 Last night a serious lightning storm passed and it got counted, but clearly with the same problems in counting as seen before in counting thunderstorms from the shed while radio activity causes a lot higher counts. Looking at the graphs for thunderstorms counted from the attic before I was active on HF radio there is quite a difference in numbers.

I think I want the lightning strikes counter back up in the attic but with a low-pass filter somehow to filter out false counts from amateur radio traffic.

Tags: , , ,
  Older news items for tag statistics ⇒
, reachable as PGP encrypted e-mail preferred.

PGP key 5BA9 368B E6F3 34E4 local copy PGP key 5BA9 368B E6F3 34E4 via keyservers pgp key statistics for 0x5BA9368BE6F334E4 Koos van den Hout
Other webprojects: Camp Wireless, wireless Internet access at campsites, The Virtual Bookcase, book reviews