Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: just learning  (Read 20079 times)

0 Members and 2 Guests are viewing this topic.

Helpmeh



    Guru

  • Roar.
  • Thanked: 123
    • Yes
    • Yes
  • Computer: Specs
  • Experience: Familiar
  • OS: Windows 8
Re: just learning
« Reply #30 on: April 08, 2009, 05:49:41 AM »
pinging for 15minutes seems like not a good idea, could have some side-effect which i am not sure of. besides ping delay is not really accurate. that's why in the first place i suggest using vbs sleep function instead of ping.
if you just need to delay for 4-5 seconds once in a while, i would have suggest you using ping instead of vbs sleep.

the code:
>$sleep.vbs echo wsh.sleep 900000
cscript//nologo $sleep.vbs


900000 is in miliseconds, or 900seconds=15minutes.

True, but if you are using it on computers which may not have sleep, ping is your best (only) choice. Although it seems fairly accurate...not to nano seconds, but I've made a stopwatch in batch...almost...
Where's MagicSpeed?
Quote from: 'matt'
He's playing a game called IRL. Great graphics, *censored* gameplay.

Dias de verano

  • Guest
Re: just learning
« Reply #31 on: April 08, 2009, 07:02:18 AM »
True, but if you are using it on computers which may not have sleep, ping is your best (only) choice. Although it seems fairly accurate...not to nano seconds, but I've made a stopwatch in batch...almost...

All Windows computers have VBScript, and can use sleep.vbs.


olo131

    Topic Starter


    Rookie

    Re: just learning
    « Reply #32 on: April 08, 2009, 05:02:41 PM »
    I did look for a virus and Norton said I'm Clean but that dosen't mean everything. I do like to download games and the cracks may have something looming around

    I use this command for work (I Work for a cable co) to check for network problems and Iperf is the program they offer but I got tired of typing it in to a command line so I started this file.

    I ran a test last night with the command and it worked perfectly until I needed to stop. I used CTL-C it asked if I wanted to terminate Y or N of course I said yes......and window gone. That was my only mistake next time I will say No then I can copy my results before closing the window.

    I will give this out to others in my company so I just want to get it right as I can.
     
    Quote
       >$sleep.vbs echo wsh.sleep 900000
        cscript//nologo $sleep.vbs

    This worked grate is there a way to tell it to stop after 24hrs but not close the window? Isn't there a timeout command I can try. In need to copy it into a text doc to be emailed.

    Again thank you
    James
    « Last Edit: April 08, 2009, 09:41:45 PM by olo131 »

    olo131

      Topic Starter


      Rookie

      Re: just learning
      « Reply #33 on: April 08, 2009, 09:18:29 PM »
      Hey Reno,

        The code you posted put the command to sleep just as you said but it never recovers. I  even shorten the time.

      When I tested it earlier I did not give it enough time to see if it would run the next test. It is just what I looking for.

      any ideas
      James

      Reno



        Hopeful
      • Thanked: 32
        Re: just learning
        « Reply #34 on: April 08, 2009, 11:21:01 PM »
        is there a way to tell it to stop after 24hrs but not close the window? Isn't there a timeout command I can try. In need to copy it into a text doc to be emailed.
        The code you posted put the command to sleep just as you said but it never recovers. I  even shorten the time.
        the code is only for sleep, so after sleep, you have to use some sort of restarting, eg. goto statement, call, restart the batch %0, etc

        24 hours stop:15minutes   =    4x / hour
        24hr x 4x = 96x
        not exactly 24 hours, roughly around 24hours + 96 * (time needed to run batch file)


        Code: [Select]
        @echo off
        echo.
        echo CREATED FOR KNOLOGY SPEED TEST        by: OLO 131

        >$sleep.vbs echo wsh.sleep 900000
        for /l %%a in (1 1 96) do (
        call:B
        cscript//nologo $sleep.vbs
        )
        echo 24hrs!! do copy here..
        goto:eof

        :B
        echo.
        echo Time and Date of Test
        echo.
        Date /t
        Time /t
        echo.
        echo Iperf Speed Test Server xx.x.xx.xxx
        iperf -c xx.x.xx.xxx -r -w 64k -t 20 -i 1
        echo.
        echo.
        echo.
        echo.
        echo Ping Iperf Server Test
        ping xx.x.xx.xxx -n 20 -l 64k
        echo.
        echo.
        echo Trace Route Iperf Server
        tracert xx.x.xx.xxx
        echo.
        echo.
        echo DONE!
        echo _______________________________________ __________________________________
        echo.

        olo131

          Topic Starter


          Rookie

          Re: just learning
          « Reply #35 on: April 10, 2009, 12:01:48 PM »
          Reno,

          You are the man I ran my test for 24hr worked perfectly now I will do  a search for a stop command.

          Thank you again, Reno and everyone who helped me
          James