CSLUG - Central South LabVIEW User Group (UK)

cancel
Showing results for 
Search instead for 
Did you mean: 

Network Availability Check

Hi all,

My test software uses an internal web service to obtain product information for testing purposes. If this web service fails to respond I want to check if the network is available. At the moment several of our test systems don't have access to the CLI for security purposes so I can`t use the PING command and `System Exec.vi`. My next idea is to use the .NET Ping function which seems to work (although it seems to have a few pitfalls)

Can I have your thoughts on how to check the network status? Do you have a simple preferred method ?

Thanks in advance,

Nick


0 Kudos
Message 1 of 22
(9,274 Views)

Hi Nick

Can you not access the database that is driving the webservice (thinking outside the box here)?

I've always used the System Exec command method.

Steve


Opportunity to learn from experienced developers / entrepeneurs (Fab,Joerg and Brian amongst them):
DSH Pragmatic Software Development Workshop


Random Ramblings Index
My Profile

0 Kudos
Message 2 of 22
(7,477 Views)

Hi Steve,

Unfortunately I`ve not been given permission by IT, partly because its an old system which they are in the process of upgrading,

hence the webservice.

I guess I could keep running the `Open Web Service` vi and wait for that to repond( as a network check), I just feel more comfortable with a Ping command.

0 Kudos
Message 3 of 22
(7,477 Views)

Yep I've used ping for the same thing pretty much and it just feels as if you're doing things properly.

In truth banging the Open Web Service.vi is probably just as effective!

Steve


Opportunity to learn from experienced developers / entrepeneurs (Fab,Joerg and Brian amongst them):
DSH Pragmatic Software Development Workshop


Random Ramblings Index
My Profile

Message 4 of 22
(7,477 Views)

Hmm, I`ll give it a go, thanks Steve !

0 Kudos
Message 5 of 22
(7,477 Views)

Is there a simple web page on that server that you can check for? Then you can see if the network is there, or manually do a Ping, but with a twist. Try sending a request to port 13 as this is the Simple Network Time Protocol port and should respond with the date/time.  Mike

Message 6 of 22
(7,477 Views)

Thanks Mike, I`ll have a look into that. I`m sure IT will have a page somewhere, could be a useful option.

0 Kudos
Message 7 of 22
(7,477 Views)

Not sure if this helps in your case but to monitor networks adapters on a windows system I have used a modified version of  Get Network Card Information https://decibel.ni.com/content/docs/DOC-1267 which uses win 32 kernel32 and IP Helper API Iphlpapi.dll.

Cheers

Stephen

Message 8 of 22
(7,477 Views)

Bit of a hacky way if you wanted something quick. Is this an internet connection as well?

If so put www.google.co.uk or similar into the string to IP function. Technically this checks whether there is DNS (rather than just network) but if it returns a number everythings looking good.

James Mc
========
CLA and cRIO Fanatic
My writings on LabVIEW Development are at devs.wiresmithtech.com
Message 9 of 22
(7,477 Views)

Thank you for all the great ideas, i`ll go and have a tinker and see what happens!

0 Kudos
Message 10 of 22
(7,477 Views)