-
-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configuratyion for speedtest-cli #383
Comments
Hi Scoperius, I'm not sure if it has to be this way, but I had the best luck when I put just the command for the source, and then did the filtering using the regexp line, so for your config I would try something like dynamic.101.name=Ping Also there may be a better way to do this, but when I wanted to monitor my internet stats using speedtest-cli and rpimonitor, I built a wrapper for the speedtest command, because it takes so long to run. I think you can also use the interval and timeout values to do it, but I had other reasons why I wanted to use a wrapper. Basically what my wrapper does is checks the age (and existence) of the previous output file, and only runs the speedtest if the file is older than a certain age. Then rpimonitor is able to read that output file as often as it likes without having to worry about Like I said there may be better ways to do all of this, but that is what worked for me |
@dirdled Care to share your wrapper? |
Hi sgrayban, I can share, but I'm not sure my code is suitable for mass consumption. I tend to do Quick and dirty stuff, with the intention of going back and polishing it if I ever run out of projects and have spare time...So far that hasn't happened |
Well I was just wondering how you managed to remove the text out of the speedtest results. Currently I have a cron running every 10 minutes that saves the results to a file which is pulled by the software. cat /root/speedtest.txtPing: 29.792 ms Have you been able to clean that up to only get the numbers? |
The output that I save is just exactly like that, but when RPIMonitor reads the file it runs it though this line
cat $speedTestOut|sed -n "/$dataType/Is/.*: \(.*\) .*/\1/p"
Where $speedTestOut is the name of the output file (it looks like /root/speedtest.txt in your case) and $datatype is either ping, download, or upload |
@dirdled thanks !!! My script has this now....
Now to get that into the graph stats!! |
@sgrayban Nice... If I can figure out how to to a private message on here, I can share the whole script and also show you what I have for a configuration to use the script...But I'm not sure my fragile ego can handle having people who really know what they're doing critique my code (I guess I'm assuming that you're OK to show because you're asking me questions :) ) |
@dirdled no PM's here. Are you on Facebook? |
@dirdled and just to tease you more Got the icons working |
@sgrayban Yeah, I'm on facebook (same ID), I don't login often, but I have an account Here's what mine looks like Looks like they bumped my upload speed, so I should adjust my gauge settings |
No worries, poste your script, we are curious. |
Ok, Ok, Since it sounds like @sgrayban doesn't think the code is a dumpster fire I'll share... Here are 2 files one is the speedtest Wrapper (in bash), and the other is the config file for Rpi-Monitor. |
So this is pretty old but I'm trrying to get this up and running and i cannot. I have setup both files but does the speedchk need to run on a timer? |
Hi I tried to make a running configuration for speedtest-cli (https://github.com/sivel/speedtest-cli). But without any success. Can you please point me the right way? May proposed conf does not display anything:
dynamic.101.name=Ping
dynamic.101.source=/home/pi/speedtest-cli/speedtest.py --simple | grep "Ping: "
dynamic.101.regexp=(.*)
web.status.1.content.10.line.2="Internet Ping: " + data.Ping
although /home/pi/speedtest-cli/speedtest.py --simple | grep "Ping: " returns Ping value properly
Thanks for help,
Petr
The text was updated successfully, but these errors were encountered: