Help Needed (please) with a VERY simple script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tipster69
    Member
    • Dec 2008
    • 91

    #31
    Hi,

    Can anyone help with this problem PLEASE, the kids are driving me mad with it.

    It is such a simple problem, the modem goes into slow mode (blue light) and the picture jitters.

    If i log onto the server with my ipad or iphone and just browse the net this is enough to keep in in fast mode (green light) and the picture is perfect.

    I just need to keep the dongle busy enough (without having to use an ipad or iphone).

    If i go to addons via tspanel or basically anything that dowloads some information it goes fine for a short while, i just need to add something to the script that will continuously (or once a minute) download enough info to keep it in the fast mode.

    PLEASE HELP if you can.

    Cheers.

    Comment

    • davvo
      DK Veteran
      • Apr 2009
      • 666

      #32
      @tipster69
      has your DM got a hard drive

      iv made a script that downloads a movie from the net
      to the DM hard drive

      test this and see if it makes the picture stable

      put the script below into /usr/script
      give it 755
      start DCC click telnet
      and paste this line in
      /usr/script/ping.check.sh
      then press enter


      you can watch the file download in the telnet window
      tell me how long it takes to download
      and i will make a crontab to restart the download
      within that time

      Code:
        rm /media/hdd/cab7a26
      wget -P "/hdd" http://tinyurl.com/cab7a26
      then
       rm /media/hdd/cab7a26
      fi
      Attached Files
      Last edited by davvo; 11 April, 2012, 21:05.

      Comment

      • aj4u
        Junior Member
        • Aug 2008
        • 29

        #33
        good idea download file then remove

        but file needs to be smaller. He's paying for data, max uk plans have 3gb

        so downloading a 75 meg file every time = no no

        better start download

        sleep for 40 to 50 seconds

        then killl wget and rm file.

        Comment

        • davvo
          DK Veteran
          • Apr 2009
          • 666

          #34
          let him test 1st

          and see if it makes the picture stable

          then i can edit the script


          Last edited by davvo; 12 April, 2012, 01:30.

          Comment

          • alom5
            DK Veteran
            • Nov 2008
            • 1648

            #35
            just a thought.....instead of google....why not try a website with videos or jpegs on the page as this will take a few seconds to download the site and keep modem in hsdp mode and then reload it in 3 seconds(however long it takes to download the page) or so...

            Comment

            • davvo
              DK Veteran
              • Apr 2009
              • 666

              #36
              cuz he will be sitting there like a lemon refreshing the page

              that script above will do the trick
              once he has tested it and it keeps it in hsdp mode
              i will get a smaller file
              and add a crontab

              Comment

              • tipster69
                Member
                • Dec 2008
                • 91

                #37
                Hi,

                Apologies for the slow response time, our 1gb of data ran out so we couldn't get online

                I will try this script and get back to you.

                Just a small update for you though. Prior to the data running out, we found it was working very well with the -c option removed from your ping in the script (i.e ping bbc.co.uk). I believe this will cause the script to run an endless ping.

                Will post back with results when I have got some more data added.

                THANKS for the continued help on this. I would be lost without it.

                CHEERS

                Comment

                • IAmATeaf
                  DK Veteran
                  • Mar 2011
                  • 591

                  #38
                  Have you tried the -s option? By default ping will send 56 bytes of data but -s will allow you to specify larger i.e.

                  ping -s 256 BBC - Homepage

                  or even

                  ping -s 1024 BBC - Homepage

                  Comment

                  • tipster69
                    Member
                    • Dec 2008
                    • 91

                    #39
                    Hi,

                    Just a quick update as I really appreciate all the help and info and I don't want you thinking I'm not replying for any other reason.

                    I am not going to get a chance to test any of this now until I receive my new SIM card as I have ordered a SIM with more data rather than paying over the odds to update the existing SIM.

                    Will test your script asap Davvo, CHEERS.

                    Comment

                    • tipster69
                      Member
                      • Dec 2008
                      • 91

                      #40
                      Hi,

                      FAO Davvo.

                      I have been testing my setup for the past couple of days using the constant ping method and I am happy that it now appears to be working at a level I am happy with. It appears for 90% of the time to be keeping the modem in the fast mode.

                      So I think it best I don't mess about trying other scripts with it for now (unless of course it is only working temporarily).

                      Just need to say MANY THANKS for all your time, effort, help and info on this topic. It has been VERY MUCH APPRECIATED (as stated before) and I would have been lost without your posts.

                      CHEERS - I OWE YOU A DRINK.

                      Comment

                      • tipster69
                        Member
                        • Dec 2008
                        • 91

                        #41
                        Hi,

                        FAO DAVVO (Sorry to myther).

                        I have noticed something strange happening with my data usage.

                        Where I would expect very little data usage this isn't the case. I have checked and overnight it has used 652mb, so obviously I cannot go on like that.

                        I didn't expect the ping alone use that much data.

                        All I have in the ping script now is: ping bbc.co.uk, and this is still run via the root file in bhcron.

                        What I am wondering is this, now I don't know how often the root file in bhcron executes, but if I guess at once a minute. Do I infact have lots and lots of continuous pings running? and if so how do I stop this and just run the 1 ping continuously?

                        i.e do I now have 60 pings running after 1 hour, 240 pings after 4 hours, etc.

                        I presume the 1 in the root file means every 1 minute ? */1 * * * * /usr/script/ping.check.sh If I changed that to 120 would this mean it would only run it every 120 mins, and will it run first at boot, or at boot plus 120 mins?
                        Last edited by tipster69; 8 May, 2012, 17:05.

                        Comment

                        • davvo
                          DK Veteran
                          • Apr 2009
                          • 666

                          #42
                          */1 * * * * /usr/script/ping.check.sh
                          means that the crontab will run the ping.check.sh
                          script every 1 minute

                          what have you put in the script
                          the default ping was -c 5 which will ping 5 times
                          the ip you have in the script
                          which is 32 bytes x 5
                          160 bytes

                          the script will run at boot
                          if not it will deffo run after 1 minute



                          Last edited by davvo; 8 May, 2012, 19:38.

                          Comment

                          • tipster69
                            Member
                            • Dec 2008
                            • 91

                            #43
                            Hi Davvo,

                            The original script wasn't keeping the modem in High Speed Mode, but when I changed it to nothing more than a 1 line script "ping bbc.co.uk" it then started to keep the modem in high speed for "most" of the time, as this then starts pinging and keeps pinging one after the other continuously.

                            I am not sure that what I have typed in my previous post is what is happening (i.e lots and lots of continuous pings running), but it was the only explanation I can think of for the mega high data usage.

                            Is there anything that can be put into the root cron file that will only exectue the ping script once, as that is what I am trying to acheive.
                            Last edited by tipster69; 8 May, 2012, 20:12.

                            Comment

                            • davvo
                              DK Veteran
                              • Apr 2009
                              • 666

                              #44
                              you can try and run the script every 5 mins
                              i think you had it at -c 35 in the script
                              try that
                              it will ping the ip 35 times every 5 mins

                              */5 * * * * /

                              Comment

                              • tipster69
                                Member
                                • Dec 2008
                                • 91

                                #45
                                Hi,

                                Will I have to wait 5 mins for the script to kick in or does it run on bootup?

                                Comment

                                Working...