473,386 Members | 1,835 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Ping Problems

30
Hi Guys,

I am developing a small app just to check our servers are still online, at the moment i have got the my.computer.network.ping pinging 12 of our servers and changing a label to say either server online or server offline, i am trying to get this to happen every 15 seconds, i have tried loops etc but it freezes the app, i came across application.doevents which enabled the form to load without freezing. I was wondering if someone knows of a better way of doing this without the app freezing.

Cheers!

Jay!
Apr 24 '08 #1
4 1345
Plater
7,872 Expert 4TB
Use the System.Threading.Timer object.
Apr 25 '08 #2
pootle
68
Hi Guys,

I am developing a small app just to check our servers are still online, at the moment i have got the my.computer.network.ping pinging 12 of our servers and changing a label to say either server online or server offline, i am trying to get this to happen every 15 seconds, i have tried loops etc but it freezes the app, i came across application.doevents which enabled the form to load without freezing. I was wondering if someone knows of a better way of doing this without the app freezing.

Cheers!

Jay!
Hi Jay,

It probably "freezes" the app because you are doing everything from the main thread - the one that also manages the GUI. Have you tried making the pings in seperate threads?

Regards.
Apr 25 '08 #3
Asprisa
30
Hi Guys!

I have tried playing with the Use the System.Threading.Timer object and it seemed unsuccessful. I have moved the ping code into a sperate function and am calling the function from the form load, the first ping works fine, the app takes a little time to load but when i loop the code after a timer etc.. the app freezes until the loop has continued, this is not an issue if all i was going to do was loop the code but i wish to do more with the app and i cannot allow it to freeze, any suggestions guys! and thanks for your input so far, very useful learning for me!

Regards

Jay!
Apr 28 '08 #4
Plater
7,872 Expert 4TB
Well the System.Threading.Timer is different then the other timer object, this one actually creates/runs in its own thread. If you tried that Timer (not the timer you drag/drop on the GUI designer) and it didn't work, you might have to go with full on threads.
Apr 28 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Jason Rodman | last post by:
I have downloaded every example on how to create a ping utility in .Net in both VB and C#, but have been disappointed with the results. I have YET to find an example that returns consistent results...
0
by: Ed | last post by:
I've attached some VB.NET code I've hacked together (some taken from MS examples & newsgroup postings) that will perform a ping or IcmpSendEcho using the icmp.dll (see this for more info:...
0
by: scotty | last post by:
I need to do a ping scan of a subnet. I can Enum through the IPs and do this, but it takes over 5 minutes as I can only create 1 process at a time. Does anyone know how I can create multiple Ping...
21
by: Neel | last post by:
I am trying to "ping" a remote host in my C++/Redhat Linux code to check whether that host is connected or not. if (0 == system("ping -w 2 192.168.0.2)) But, in both cases...
7
by: luvwknd | last post by:
Hi all, I am attempting to utilize MS's article I.D. #828993 found at: http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B828993 In an effort to create a GUI Ping utility that...
5
by: Deepak | last post by:
I am programing a ping application which pings various centers . I used timer loop and it pings one by one. Now when i finish pinging one center it should wait for the ping_completed function to...
1
by: Krish | last post by:
All, I have an offline application that works online for some data syncronization. For data syncronization I access a webservice. I want to show whether my application is online or not by checking...
3
by: amaccormack | last post by:
I wrote a quick script to check the "up-ness" of a list of machines, and timeout after 1 second. However, with a lot of timeouts, the script takes a logn time, so I thought to parallelise it....
2
by: adnanahmed714 | last post by:
hi 1) i am using a home network consisting of two computer.on One pc i have Marvell Lan card(built-in on the board) and on the second pc i have BayLan network adapter. What i know if two pc's...
6
by: Dave Marden | last post by:
I currently use this routine in vbscript to ping computers and get the status of ping to determine whether to try to backup a machine, I am trying to change it to work with vb2003.net I am...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.