Page 1 of 1 1
Topic Options
#188171 - 2008-06-12 12:26 AM Check if a machine is on
bugmen Offline
Fresh Scripter

Registered: 2005-03-23
Posts: 12
How can I check to see if a specific computer (e.g. COMPUTER064) is on?
Top
#188172 - 2008-06-12 02:14 AM Re: Check if a machine is on [Re: bugmen]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
Use one of the available UDFs to query a common service, such as Spooler. The status is unimportant, the result of the query is.

Error 5 - Access Denied - the system is on and operational to the point it knows you shouldn't be poking your fingers in it!

Error 1722 - The system is unavailable, as in OFF or NON-EXISTANT. If you know the computer name is valid, the system is most likely off.

Error 0 - any status - the system is on and operational, and you have permission to query the system.

Using Ping to check system operational status is not generally enough, since the O/S can be non-functioning while the NIC returns the pings. I guess that means it's on (technically) but not of much use.

Glenn

PS - play with XNET LIST \\computername to get some ideas before writing any Kix code.
_________________________
Actually I am a Rocket Scientist! \:D

Top
#188201 - 2008-06-12 11:06 PM Re: Check if a machine is on [Re: Glenn Barnas]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: CA
Just to further what Glenn has already said. You may want to use some type of test geared towards what you're wanting to do to that system in order to ensure it will respond.

If you need a specific service to be running - check it. If you need a specific application to be running - check to see if it's running in memory, etc...

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 584 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.129 seconds in which 0.027 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org