Page 1 of 1 1
Topic Options
#32082 - 2002-11-08 09:15 PM Checking for a server
Rachel Offline
Fresh Scripter

Registered: 2002-01-11
Posts: 24
Loc: Michigan
[Moderator (Sealeopard): Moved thread form 'Scripts' to 'Starters' forum]

Hello -

Is there a way, with Kixtart, to check if a server exists? For instance, IF EXIST \\servername??
I want to check this in the login script so I can have the login script for a secondary server be used in the event the main one is unavailable. Any suggestions are welcome.

Thank you.

[ 08. November 2002, 21:44: Message edited by: sealeopard ]

Top
#32083 - 2002-11-08 09:27 PM Re: Checking for a server
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Rachel,

What about PING and looking for TTL?
quote:

Reply from 0.0.0.0: bytes=32 time<1ms TTL=128

HTH,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#32084 - 2002-11-08 09:30 PM Re: Checking for a server
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Why not just spark up notepad and write a quickie test script?

code:
Break on
If Exist("\\Server\Share")
"test positive" ?
else
"test negative" ?
endif
Get $_

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#32085 - 2002-11-08 09:40 PM Re: Checking for a server
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Why not just search the KiXtart BBS for the numerous UDFs and scripts that do this?

You might also make yourself familiar with the notion of multiple domain controllers, the NETLOGON share, and the replication service. The combination of these will actually achieve your "fail-over" automatically and is well documented. For example, start by reading the KiXtart Manual or the KiXtart Starter's Guide in the FAQ Forum.

[ 08. November 2002, 21:43: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#32086 - 2002-11-08 09:53 PM Re: Checking for a server
Rachel Offline
Fresh Scripter

Registered: 2002-01-11
Posts: 24
Loc: Michigan
Based on the last post, am I correct in understanding that if I have a PDC and BDC running, Kixtart will allow this fail safe "operation"? I am runing Kixtart 2001 and do have the manual.
What I am trying to achieve as you probably guessed, is to allow the BDC to take over logins in the PDC fails ? Is this possible? Is this what you were referring to?

Top
#32087 - 2002-11-08 10:00 PM Re: Checking for a server
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
the concept of running a logon script from the netlogon share is a matter of replication and account configuration. this isn't a kixtart issue but one of understanding microsoft networking and the logon process.

if you have you script being called by %0\..\scriptname.kix then all users will run the script from whatever bdc validates the logon.
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#32088 - 2002-11-08 10:04 PM Re: Checking for a server
Waltz Offline
Seasoned Scripter

Registered: 2002-08-01
Posts: 485
Loc: Waterloo, Ontario, Canada
It's more than possible, and bordering on essential...
_________________________
We all live in a Yellow Subroutine...

Top
#32089 - 2002-11-08 10:37 PM Re: Checking for a server
Rachel Offline
Fresh Scripter

Registered: 2002-01-11
Posts: 24
Loc: Michigan
I do have replication set-up between the PDC & BDC. The login scripts are being replicated between servers. And I do have some logins being validated by the BDC. That is fine.

The other piece of this issue then is the drive mappings. Right now my login script has the drive mappings pointing to a specific server (see a piece of the login script below). If FCI1 (which is the PDC) is not there, the login script will not run and the PCs receive an error when trying to login. The piece below is my .kix file.

SET kxrpc=\\FCI1

USE F: "\\FCI1\@USERID$"
USE G: "\\FCI1\APPS1"
USE I: "\\FCI1\FCI_INFO"
USE J: "\\FCI1\MCAFEE$"

My .bat file contains this:

NET TIME \\FCI1 /SET /YES
%0\..\kix2001\kix32.exe kixlogon.kix

Suggestions? Thanks !

Top
#32090 - 2002-11-08 10:41 PM Re: Checking for a server
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
First of all, you should read KXRPC - Everything you wanted to know about KXRPC

Secondly, you shouldn't force the use of the PDC for the KiXtart RPC Service but just use the logon server. This will load-balance the logins.

Thirdly, the batch file will run from whichever DC will authenticate.

Fourthly, if the server FC11 is unavailable, then of course the drive mappings will fail. The server shouldn't be offlijne in the first place, especially if it's the PDC.

So, why are your servers offline all the time?

Setting the time will fail under Windows NT/2000/XP if the user doesn't have 'set system time' privilege. Better to install W32Time, the Windows Time Service.

[ 08. November 2002, 22:43: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#32091 - 2002-11-08 10:41 PM Re: Checking for a server
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I think most of us 'regulars' come from larger networks where we don't use the DCs as file repositories. I have to wonder though... if you lose the PDC, don't you also loose all the users' files? So what is the point of mapping to alternate shares?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#32092 - 2002-11-08 10:46 PM Re: Checking for a server
Waltz Offline
Seasoned Scripter

Registered: 2002-08-01
Posts: 485
Loc: Waterloo, Ontario, Canada
Tell the suits to buy a file server [Wink]
_________________________
We all live in a Yellow Subroutine...

Top
#32093 - 2002-11-08 11:00 PM Re: Checking for a server
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
well... a PDC/BDC really have low requirements.

some Joe PII with 128MB ram and a 3gb HD is sufficient... (more ram would be nice though)

The paranoid in me would REALLY prefer the PDC to have at least a SCSI card and 2 drives to set up a mirror.

BDCs are disposable... but the DHCP/WINS/DNS services that eventually wind up on them is of more importantance.
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#32094 - 2002-11-11 05:18 PM Re: Checking for a server
Rachel Offline
Fresh Scripter

Registered: 2002-01-11
Posts: 24
Loc: Michigan
This is a reply to the questions posted by sealeopard.

1st & 2nd - Thank you for the information regarding KXRPC. I will modify the login script so the statement: set kxrpc=\\fci1 is not there.

3rd - Yes, I understand that the batch file will run no matter which DC authenticates it. I have discovered this with several machines that were logging into the server but not running the login script. It was due to the fact that the machine was authenticating to the BDC however the scripts had not been replicated over there yet.

4th - My PDC is not offline - this is only a what if/hypothetical question? WHAT IF the PDC fails and the BDC needs to take over? I would like to have at least the user directory mapped so they can continue to get E-mail. I am replicating their outlook.pst file to the BDC from the PDC.

Also, the W32 application you mentioned...Is that installed on the server or each workstation? And where is that found?

Thanks !

Top
#32095 - 2002-11-11 06:21 PM Re: Checking for a server
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
The Windows Time Service is installed by default on all Windows 2000/XP computers and can be downloaded from Microsoft's website for windows NT computers. there's also a very good white paper explaining how to set up a local time service environment with primary and secondary time servers that are then accessed by time server clients.

If you need redundancy with regards to user directories, then the correct way to do this is to invest into a hardware RAID solution that is cluster-aware and set up a fileserver cluster that have access to the shared storage device. However, that'll set you back some money.
_________________________
There are two types of vessels, submarines and targets.

Top
#32096 - 2002-11-14 03:18 PM Re: Checking for a server
Anonymous
Unregistered


If you want to make so that you can login and get mappings from your bdc if the pdc fails you could eliminate all references to specific servernames. You said you are replicating right now to your DC's.

Change
USE F: "\\FCI1\@USERID$"

to

USE F: "%LOGONSERVER%\@USERID$"
etc.

Providing you are replicating your files and the shares exist on all DC's users will get their mappings so long as one DC is active.

*NOTE* I wouldn't do this but if it's what you're looking for go ahead [Razz] , I would rather put these in and REM them out in case of failure.

Top
#32097 - 2002-11-14 03:46 PM Re: Checking for a server
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Robbie:

This would require real-time replication of all shared folders since you cannot predict which DC a user will log into. Additionally, if you log into multiple computers at the same time, you might end up with shares to different folders, which then cannot be replicated.

The recommended solution for a fault-tolerant setup would be either a cluster-aware external RAID storage device with the RAID controller connected to two servers at the same time, or some kind of NAS/SAN setup.
_________________________
There are two types of vessels, submarines and targets.

Top
#32098 - 2002-11-15 04:44 PM Re: Checking for a server
Anonymous
Unregistered


Hence

quote:
*NOTE* I wouldn't do this but if it's what you're looking for go ahead , I would rather put these in and REM them out in case of failure.


Top
#32099 - 2002-11-15 04:57 PM Re: Checking for a server
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
However, you will still have to solve the replication issues.
_________________________
There are two types of vessels, submarines and targets.

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 989 anonymous users online.
Newest Members
StuTheCoder, M_Moore, BeeEm, min_seow, Audio
17884 Registered Users

Generated in 0.072 seconds in which 0.028 seconds were spent on a total of 12 queries. Zlib compression enabled.

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