Jump to content

Ping with -t parameter


Recommended Posts

Hey, trying to ping a computer using this http://forums.ni.com/ni/board/message?boar...=235762#M235762 . Any ideas on how to make it ping continously? I tried "ping www.google.com -t" , problem is it gets stuck in sys exec, it won't pass the results further on (waiting for the final output). Any ideas?  Thanks.

Later Edit : I replaced -t with -n, now it's pinging the host for the number of times put in, but i really want to make it run continuously.

Link to comment

QUOTE (n00bzor @ Mar 4 2009, 12:44 PM)

Hey, trying to ping a computer using this http://forums.ni.com/ni/board/message?boar...=235762#M235762 . Any ideas on how to make it ping continously? I tried "ping www.google.com -t" , problem is it gets stuck in sys exec, it won't pass the results further on (waiting for the final output). Any ideas? Thanks.

Later Edit : I replaced -t with -n, now it's pinging the host for the number of times put in, but i really want to make it run continuously.

Hi,

What is this parameter : "-t" for the ping command ?

Is it not a mistake ? As you can see here, there is no "-t" for ping command.. maybe you need -f, no ?

Hope this helps

Link to comment

QUOTE (Antoine Châlons @ Mar 4 2009, 07:00 AM)

What is this parameter : "-t" for the ping command ?

I think -t is a windows specific parameter.

C:\Documents and Settings\Phil>ping -?Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]            [-r count] [-s count] [[-j host-list] | [-k host-list]]            [-w timeout] target_nameOptions:    -t             Ping the specified host until stopped.                   To see statistics and continue - type Control-Break;                   To stop - type Control-C.    -a             Resolve addresses to hostnames.    -n count       Number of echo requests to send.    -l size        Send buffer size.    -f             Set Don't Fragment flag in packet.    -i TTL         Time To Live.    -v TOS         Type Of Service.    -r count       Record route for count hops.    -s count       Timestamp for count hops.    -j host-list   Loose source route along host-list.    -k host-list   Strict source route along host-list.    -w timeout     Timeout in milliseconds to wait for each reply.

The reason it doesn't work from LabVIEW is that it the system exec.vi will wait until ping completes; it doesn't complete until you press a key to end the ping.

I think you will need to use the -n parameter in a loop or find a different implimentation of ping.

Link to comment

QUOTE (Phillip Brooks @ Mar 4 2009, 01:29 PM)

I think -t is a windows specific parameter.

C:\Documents and Settings\Phil>ping -?Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]            [-r count] [-s count] [[-j host-list] | [-k host-list]]            [-w timeout] target_nameOptions:    -t             Ping the specified host until stopped.                   To see statistics and continue - type Control-Break;                   To stop - type Control-C.    -a             Resolve addresses to hostnames.    -n count       Number of echo requests to send.    -l size        Send buffer size.    -f             Set Don't Fragment flag in packet.    -i TTL         Time To Live.    -v TOS         Type Of Service.    -r count       Record route for count hops.    -s count       Timestamp for count hops.    -j host-list   Loose source route along host-list.    -k host-list   Strict source route along host-list.    -w timeout     Timeout in milliseconds to wait for each reply.

Oh.. Indeed.. sorry I thought it was a typo, but no.QUOTE (Phillip Brooks @ Mar 4 2009, 01:29 PM)

The reason it doesn't work from LabVIEW is that it the system exec.vi will wait until ping completes; it doesn't complete until you press a key to end the ping.I think you will need to use the -n parameter in a loop or find a different implimentation of ping.

Well, the SystemExec.vi has a input parameter "wait until completion? (T)" just set it to False and that should be fine.

Link to comment

QUOTE (Phillip Brooks @ Mar 4 2009, 04:10 PM)

It has to do with calculating the delay between two computers, i'm trying to do it using the delay from ping. -t is indeed a windows specific command, it pings the host until stopped.Thanx guys, i'll try it and get back to you. I'm not tring to flood anyone :)  so relax.

QUOTE (Antoine Châlons @ Mar 4 2009, 02:37 PM)

Well, the SystemExec.vi has a input parameter "
wait until completion? (T)
" just set it to False and that should be fine.

Tried that, didn't seem to work, i guess i'll have to stick to using -n and a loop, although i get a lot of overhead because of this(this is part of a much larger program)

Link to comment

You can use this method. This is a direct call method using the winsock library. It works well and you can put it into a loop. However, BE CAREFUL if you do use this in a loop. If you don't introduce any delay you can easily flood the receiving device with ping requests. I do wish that NI would add a native ping to LabVIEW.

Link to comment

QUOTE (Mark Yedinak @ Mar 4 2009, 05:44 PM)

You can use this http://forums.ni.com/ni/board/message?board.id=170&message.id=70801' target="_blank">method. This is a direct call method using the winsock library. It works well and you can put it into a loop. However, BE CAREFUL if you do use this in a loop. If you don't introduce any delay you can easily flood the receiving device with ping requests. I do wish that NI would add a native ping to LabVIEW.

Ok, thanks a lot, i'll try that one too.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.