Page 1 of 1 1
Topic Options
#28915 - 2002-09-12 06:10 PM Determining closest server
Jtel Offline
Fresh Scripter

Registered: 2002-04-13
Posts: 41
I am trying to determine the "closest" server to any given user and then map a drive to that server. I was going to shell out the ping command to ping each server and then get the response time from each server and then connect to that server, but I'm not exactly sure what would be the most efficient way to accomplish this.
Top
#28916 - 2002-09-12 06:14 PM Re: Determining closest server
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
I think it depends on how you define 'closest'.

You could either use the server the user was authenticated against (@LSERVER) or use PING or TRACERT to see which server in a list of servers is closest based on hops and/or time and/or TTL number.

Or if you are using different subnets, you could define it based on the subnet mask. There are already UDFs posted in the UDF forum that evaluate subnet masks.

[ 12. September 2002, 18:15: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#28917 - 2002-09-12 06:53 PM Re: Determining closest server
Jtel Offline
Fresh Scripter

Registered: 2002-04-13
Posts: 41
Closest as in response time. This drive will never be mapped to server that is authenticating logons.
Top
#28918 - 2002-09-12 07:00 PM Re: Determining closest server
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Response time is such a transient thing and is not reliable.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#28919 - 2002-09-12 07:06 PM Re: Determining closest server
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
We defined the user's home share on the local F/P server. Each F/P server has idential common directories and shares. The logon script extracts the the server portion of the users home share property and maps all standard drives to that server.

[ 12. September 2002, 19:06: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#28920 - 2002-09-12 09:16 PM Re: Determining closest server
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
This may help -

Proximity Array With Client Checking.

HTH,

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

Top
#28921 - 2002-09-12 11:38 PM Re: Determining closest server
Jtel Offline
Fresh Scripter

Registered: 2002-04-13
Posts: 41
Ping may not be the most reliable in all cases, but in the case it should work fine. We're talking about 1000's of users accross the country connecting to only 1 out of 5 or 6 servers dedicated for this specific application. The differences in response time will be drastic depending on the user's location. I just need a way to efficiently gather the ping stats and map to the server with the fastest response time.
Top
#28922 - 2002-09-12 11:42 PM Re: Determining closest server
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
cool... a project.

Thank you thought about tracert hops??
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#28923 - 2002-09-12 11:44 PM Re: Determining closest server
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
I think I'd go for TRACERT hops too, as mentioned in my first post, unless the connections to the different servers are vastly different like T1 to SERVER1, DSL to SERVER2, Frame Relay to SERVER3.

However, all the tools necessary can already be found in the UDF forum, like PING UDFs, WSHPIPE, and so on.

[ 13. September 2002, 05:35: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#28924 - 2002-09-13 02:14 PM Re: Determining closest server
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
I just updated WSHPing() to return the average ping time to the target.

http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=12&t=000219#000000

$p=WSHPing("server3",5)
? $p[0]
? $p[1]
? $p[2]

so now you can WSHPing() your list of servers and find out ping time... run it through a sort, and you will have your victim.
_________________________
How to ask questions the smart way <-----------> Before you ask

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 1782 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.03 seconds in which 0.015 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