These are chat archives for nightscout/intend-to-bolus

12th
Oct 2018
GMG
@ggirling
Oct 12 2018 05:40
Anyone?
Michael Spradling
@M1Sports20
Oct 12 2018 14:05
Hello all,
I am looking at the new pi zero setup and noticed my load is alway pretty high. > than 4. I tried slightly overclocking it by 100Mhz, but that didn't seem to make a difference. When doing some high level profiling(htop) I noticed that node and json processes were always using the system) I diecided to see what the json script was and noticed that even running json --version took a long time. Does this all seem normal with the current state of the pi zero hat setup?
pi@panky% time json --version                                                                                                                                                
json 9.0.6
written by Trent Mick
https://github.com/trentm/json
json --version  8.57s user 0.15s system 30% cpu 28.971 total
Zach Gohr
@zgohr
Oct 12 2018 14:07
out of curiosity, i did the same thing:
json 9.0.6
written by Trent Mick
https://github.com/trentm/json

real    0m1.869s
user    0m1.766s
sys    0m0.083s
and that’s under clocked to 600mhz
Michael Spradling
@M1Sports20
Oct 12 2018 14:07
wow, ok something is wrong with mine
@zgohr thanks
Zach Gohr
@zgohr
Oct 12 2018 14:07
1.8s is super slow as well, but something is really wrong with yours
no prob
Michael Spradling
@M1Sports20
Oct 12 2018 14:17
@zgohr Yep just did an strace on cacheflush and it looks like my json program is flushing caches. do you mind running "strace json --version"
do you see a lot of cacheflush calls?
pi@panky% strace json --verson 2>&1| grep -i "cacheflush"  | wc -l                                                                                                                  
2020
Zach Gohr
@zgohr
Oct 12 2018 14:35
1126
Michael Spradling
@M1Sports20
Oct 12 2018 14:36
thanks, i will debug now
Michael Spradling
@M1Sports20
Oct 12 2018 15:01
I am posting this here for others in case they run into the same problem. I did a quick sysbench test of cpu and everything was good. However, the sysbench of random reads does not match online scores I am seeing for pi zero w. I believe my sdcard is at fault here and causing the system load and loop time to take long. My score was 65/ req per second which is an order of magnitude off from online scores of 672.
sysbench --test=fileio --file-test-mode=rndrd --validate run
By the way, I did this test with openaps not looping. Turned off cron and killed all oref0 processes and waiting until load was near 0
Michael Spradling
@M1Sports20
Oct 12 2018 15:09
Ha, I pulled the sdcard out and I found it was a class 1 :( whoops
Eric
@ecc1
Oct 12 2018 15:40
I've had consistently good results with Samsung EVO Plus, 16 and 32GB cards mainly
Abigail Cember
@acember
Oct 12 2018 20:53
I've not yet been able to successfully loop (after days, not just minutes, of trying). 99, I get "pumphistory too old". The closest I get to success seems to be when all the variables (IOB, etc., etc.) are spit out onto the screen, but then I get the error "No deliverAt found", with the reason that the BG data is too old, and then "Couldn't smb_verify_suggested". But my CGM is plugged in to rig! So why did it only bother to read my bloodsugar, say, 12.7 minutes ago instead of right now? Is it possible that there's a clock synchronization problem between by CGM receiver and the rig, and that's why it's refusing to read the BG data? Any other ideas? My raspberry pi also doesn't seem to able to keep the time correctly (I'm at work, and forced to operate offline), but I can't detect that that's causing any independent problems.
*sorry, I meant to type there "99% of the time"
Scott Leibrand
@scottleibrand
Oct 12 2018 21:02
can you tether the Pi to your phone to get it online?
if your CGM is plugged into the Pi, you should have a cgm-loop.log that shows what's up with pulling CGM data.
Abigail Cember
@acember
Oct 12 2018 21:04
As to the phone, I'm not sure -- I don't have cell phone service where I work (in a basement), and the phone also had to be specially configured with some other app in order to log on to the university wifi.
Can I look at that log while oref0 is still running?
Most of the time it doesn't even get to that "BG" part though -- only when I'm lucky. Usually it stops at "pumphistory too old".
Raymond Richmond
@PedanticAvenger
Oct 12 2018 21:38
@acember Let me know about your university wifi, I've just spent a bunch of time getting my rig working for me at work, suspect similar requirements.
Abigail Cember
@acember
Oct 12 2018 22:07
@PedanticAvenger Yeah, I haven't looked into it too much yet -- I'm going to try to get my loop working in general first, and then mess around with our lovely University of Pennsylvania wifi. We have to have an app on our phone called "Secure W2" in order to log on, and I don't know how to replicate something like that on my Pi's SD card (having the username and password is not good enough).
@acember I suspect this is Enterprise WPA2, possibly with EAP-TLS so requiring certificates. Maybe those search terms will get you somewhere
Scott Leibrand
@scottleibrand
Oct 12 2018 22:17
@acember the cgm-loop is running in parallel to the pump-loop, so you should be able to tail the cgm-loop.log at any time regardless of what the pump-loop.log is showing
multitail is a very nice tool to look at multiple logs at once
Jon Cluck
@cluckj
Oct 12 2018 22:24
A Philly looper! Hello!