|
-
Mar 31st, 2005, 02:22 PM
#1
Thread Starter
Junior Member
Help with checking a server's status
My problem is I need to detect if a server is running, I tried using detect if file exists and it worked just fine on my Administrator box, but when I tried it on a computer with less access it isnt working, so Im thinking I have a permisions problem with this method, is there any other way to check if another computer is up and running without detecting a folder or file? Here is what I have.
VB Code:
Dim TheFile2 As String
Dim Results2 As String
TheFile2 = "\\mga-ts1\C$\Shell\testpacket.txt"
Results2 = Dir$(TheFile2)
'============================================
'Change icons to display connectivity =======
If Results2 = "" Then
picMGATS1.Image = picDisabled.Image
mgats1status = 0
Else
picMGATS1.Image = picEnabled.Image
mgats1status = 1
End If
End If
-
Mar 31st, 2005, 04:30 PM
#2
Addicted Member
Re: Help with checking a server's status
Hi,
I'm pretty new to the whole development thing, but I'm fairly knowledgeable as a Network Administrator.
This process is going to run in the security context of the user logged into the PC. Generally speaking, a standard user is NOT going to have permission to access files through an administrative share like "\\mga-ts1\C$". As a test, from that user's PC with them logged in, just try to map a drive to \\mga-ts1\C$. If you can't, then that's your problem. If so, just create another share with the test file in it and assign permissions to everyone, or to a group that the users who have access to this application would be in (ex. \\mga-ts1\Test\) put the file here and change your code to match. This will allow you to test, and have a more "production" friendly solution that doesn't give users more access to a server than needed.
Hope this helps,
Steve
-
Apr 1st, 2005, 05:52 AM
#3
Re: Help with checking a server's status
You can also ping your server.
Regards
Jorge
"The dark side clouds everything. Impossible to see the future is."
-
Apr 1st, 2005, 07:52 AM
#4
Addicted Member
Re: Help with checking a server's status
Asgorath,
I had considered responding as you did. What I've discovered, however, is that a ping test isn't always a valid test regarding a server. There are any number of reasons why a server might be able to respond to a ping but not other requests. The most common reason is that the server is in a dealock condition, or simply "too busy" to respond to any other kind of request in a timely fashion. Checking for a file will at least establish that the server is responding to common "User" requests. I'm not suggesting that your answer is wrong, just that there are different ways to skin that cat and that no one way is perfect for all situations. I went along with the original poster's method because I didn't know enough to suggest an alternate method.
Just my thoughts on why I approached it the way I did. My guess is, that if you ask this question of ten different people, who have different needs as it relates to a server, you'd get 10 different answers.
Cheers,
Steve
-
Apr 1st, 2005, 12:23 PM
#5
Thread Starter
Junior Member
Re: Help with checking a server's status
Thanks for the help Steve What I had to end up doing was map the network drive on the Data Collection Machine and it works great now.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|