Page 1 of 1 1
Topic Options
#19864 - 2002-04-12 03:34 PM Real Slow Script Execution on Win2k
acumen Offline
Lurker

Registered: 2002-04-12
Posts: 4
Hello!

I wrote a pretty simple script to just map drives based on NT group membership. The script does basically what it is supposed to, but it takes FOREVER to execute.

If I log into the machine for whom the shares are local, it processes immediately, but from any other machine, it's slow as all hell.

The only network protocols I have loaded are TCP/IP. (using the regular Client for Microsoft Networks connecting to a win2k server)

Any ideas?

Thanks!

Top
#19865 - 2002-04-12 03:38 PM Re: Real Slow Script Execution on Win2k
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
What do you have installed/prepared to do name resolution ?

J.
_________________________



Top
#19866 - 2002-04-12 03:40 PM Re: Real Slow Script Execution on Win2k
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
You really haven't supplied sufficient information for anyone to understand the environment. for example, what do you mean by "If I log into the machine for whom the shares are local"? I would suggest that you add error checking and some logging into the script so that you have a documented timeline for each mapping etc. and have error data (@error, @Serror) to see if something has gone wrong.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#19867 - 2002-04-12 04:23 PM Re: Real Slow Script Execution on Win2k
acumen Offline
Lurker

Registered: 2002-04-12
Posts: 4
Name resolution is being handled by Microsoft DNS in an active directory environment.

In response to the other response, I just mean that when I log into the local console of the server itself (the server on which the shares reside), it is nice and fast.

Both the clients and the server share the same DNS.

Top
#19868 - 2002-04-12 04:30 PM Re: Real Slow Script Execution on Win2k
Stephen Wintle Offline
Seasoned Scripter

Registered: 2001-04-10
Posts: 444
Loc: England
Im probably asking the obvious question but you have got kix installed on your wstations?
_________________________
Dont worry because a rival imitates you. As long as they follow in your tracks they cant pass you!

Top
#19869 - 2002-04-12 04:30 PM Re: Real Slow Script Execution on Win2k
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
aha ... so if you are working on those W2K Workstations and have those drives mapped : how long does it take between the moment you doubleclick My Computer and the reception of any view ??? (Please try after the computer was idle some time )

J
_________________________



Top
#19870 - 2002-04-12 04:35 PM Re: Real Slow Script Execution on Win2k
acumen Offline
Lurker

Registered: 2002-04-12
Posts: 4
Once the drives are mapped, they are very responsive.

That is, they don't show the delay the script does.

Top
#19871 - 2002-04-12 04:36 PM Re: Real Slow Script Execution on Win2k
cellnet Offline
Starting to like KiXtart

Registered: 2002-02-26
Posts: 115
Loc: Sweden
Try replacing computername with IP

Use x: "\\IP.ad.re.ss\packages\"

\erik

Top
#19872 - 2002-04-12 04:41 PM Re: Real Slow Script Execution on Win2k
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
... should speed it up tremendously !

Presupposed your Servers use static Ip's ...

Anyway : the cause is obviously a veryslow name resolution and you might want to track this down too#

J.
_________________________



Top
#19873 - 2002-04-12 05:16 PM Re: Real Slow Script Execution on Win2k
Anonymous
Unregistered


Yeah, you can solve most any Win2000 problem by fixing DNS [Smile]
Top
#19874 - 2002-04-12 09:24 PM Re: Real Slow Script Execution on Win2k
acumen Offline
Lurker

Registered: 2002-04-12
Posts: 4
DNS is nearly instantaneous for resolution for everything else.. Why would the script be different?

thanks

(I appreciate all the helpful responses)

Top
#19875 - 2002-04-12 10:31 PM Re: Real Slow Script Execution on Win2k
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
I re-iterate: Nothing helps solve a problem better than having all the details of what the syptoms are. Develop your tests and log so that there is something of substance to actually contemplate and/or fix.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#19876 - 2002-04-14 06:30 AM Re: Real Slow Script Execution on Win2k
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

QUESTIONs:
- is it possible to see what is happening during a logging on session.
- is it possible to see how long our script runs.

Advice: please run your script after adding our debugging code to it.
How:
- add debugging code?
- is debugging possible without user intervention? YES
- can is be usefull by logon or script problems? YES

A way of checking your script is by using our tool kixstrip on our site
http://home.wanadoo.nl/scripting
With the option /debug we add additional kixtart code, which shows
  • which line was executed.
  • what was the time of execution.
  • what was the error status of previous executed line.
So it is possible to catch the error status of kixtart statements during
a logon session.
and
it will show the last executed before script is crashing.

An example.

For changing your script with debugging code use
f.e. kixstrip input.kix output.kix /debug
Change line.4 of this new script
code:
   IF RedirectOutput("")
ENDIF

to f.e.
code:
   IF RedirectOutput("c:\kixdebug.log")
ENDIF

and commented all lines with a RedirectOutput statement.
During the execution the information will be append to previous information.
So it is possible to check the differences.

A kixstrip output example of our script os.kix (reduced version) is:
code:
                                            CLS
COLOR C+/N
AT (1,1) " "
IF RedirectOutput("")
ENDIF
? "-"+LCASE(@day)+" "+@date+" "+@time+"- kixtart "+@kix+"/3.04e script starting."
? "-"
? "-curdir: "+LCASE(@curdir)
? "-scriptdir: "+LCASE(@scriptdir)
IF (instr("-4.1x-","-"+substr(@kix,1,3)+"x-") <> 0)
? "-scriptname: "+LCASE(@scriptname)
ENDIF
? "-startdir: "+LCASE(@startdir)
? "-"
? "-userid: "+LCASE(@userid)+"/"+LCASE(@wuserid)
? "-user priv: "+LCASE(@priv)
IF (instr("-4.xx-","-"+substr(@kix,1,2)+"xx-") <> 0)
? "-version: inwin="+@inwin+"/dos="+@dos"/productsuite="+@productsuite+"/producttype="+@producttype"/csd="+LTRIM(RTRIM(@csd))
ELSE
? "-version: inwin="+@inwin+"/dos="+@dos
ENDIF
? "-"
?"- start-"+@time+"- @error @serror "?

?"- 1-"+@time+"- @error @serror "? $os=""
?"- 2-"+@time+"- @error @serror "? SELECT
?"- 3-"+@time+"- @error @serror "? CASE
(@inwin = 1) AND (@dos = "5.1") ; - Windows XP -
?"- 4-"+@time+"- @error @serror "? $os="XP"
?"- 5-"+@time+"- @error @serror "? CASE
(@inwin = 1) AND (@dos = "5.0") ; - Windows 2000 -
?"- 6-"+@time+"- @error @serror "? $os="W2K"
?"- 7-"+@time+"- @error @serror "? CASE
(@inwin = 1) ; - Windows NT -
?"- 8-"+@time+"- @error @serror "? $os="NT4"
?"- 9-"+@time+"- @error @serror "? CASE
(@inwin <> 1) AND (@dos = "4.90") ; - Windows ME -
?"- 10-"+@time+"- @error @serror "? $os="ME"
?"- 11-"+@time+"- @error @serror "? CASE
(@inwin <> 1) AND (@dos = "4.10") ; - Windows 98 -
?"- 12-"+@time+"- @error @serror "? $os="W98"
?"- 13-"+@time+"- @error @serror "? CASE
(@inwin <> 1) AND (@dos = "4.0") ; - Windows 95 -
?"- 14-"+@time+"- @error @serror "? $os="W95"
?"- 15-"+@time+"- @error @serror "? CASE
1
?"- 16-"+@time+"- @error @serror "? $os="???" ; - undetermined -
?"- 17-"+@time+"- @error @serror "? ENDSELECT
?"- 18-"+@time+"- @error @serror "? ? "$$os "+$os

?"- end-"+@time+"- @error @serror "?
? "-"
? "-"+LCASE(@day)+" "+@date+" "+@time+"- kixtart "+@kix+"/3.04e script ending."
? "-"
IF (instr("-4.1x-","-"+substr(@kix,1,3)+"x-") <> 0)
? "-"+@cpu+" ("+@mhz+" Mhz, memory "+MemorySize()+" MB)"
ENDIF
? "-"
;($begin)
;
; sun 14-apr-2002 05:32:19 (kix 4.10 vs 3.04e)
;
;Informative KIXSTRIP: no errors found (input=18 output=18 skip=0).
;
;Summary KIXSTRIP: block structures
; - do:until [0:0]
; - for|each:in|to:step|next [0|0:0|0:0|0]
; - function:endfunction [0:0]
; - if:else:endif [0:0:0]
; - select:case:endselect [1:7:1]
; - while:loop [0:0]
;Informative KIXSTRIP: 1 block_structure found.
;Informative KIXSTRIP: no UDF's found.
;Informative KIXSTRIP: no labels found.
;Summary KIXSTRIP: BREAK CALL DEBUG DISPLAY ENDFUNCTION EXECUTE EXIT FUNCTION GET GETS GOSUB GOTO OLExxx PLAY QUIT RETURN RUN SHELL SLEEP THEN USE
;
;($end)

An output example of kix32 run:
code:
-sunday 2002/04/14 05:32:38- kixtart 4.02/3.04e script starting.
-
-curdir: d:\
-scriptdir:
-startdir: c:\windows
-
-userid: MCA/MCA
-user priv: guest
-version: inwin=2/dos=4.0/productsuite=/producttype=Windows 95/csd=B
-
- start-05:32:39- 0 The operation completed successfully.

- 1-05:32:39- 0 The operation completed successfully.

- 2-05:32:39- 0 The operation completed successfully.

- 14-05:32:39- 0 The operation completed successfully.

- 15-05:32:39- 0 The operation completed successfully.

- 18-05:32:39- 0 The operation completed successfully.

$os W95
- end-05:32:39- 0 The operation completed successfully.

-
-sunday 2002/04/14 05:32:39- kixtart 4.02/3.04e script ending.
-
-

When you still have problems please:
  • put some code on the board.
  • put your logon batch file on the board.
  • put the output of a debugging run on the board.
  • put a DIR list of your NETLOGON directory on the board.
  • put a DIR list of your clients on the board with contains information
    about: KIX32.EXE and KX*.DLL
Greetings.
btw: it is only some additional information about how you can debug your script.

btw: with kixstrip ? you get a summary of possible options.
The result will be something like this:
code:
 Kixstrip 4.10 (vs 3.04e)     (c) MCA - scripting@wanadoo.nl - 2000, 2001, 2002
------------------------------------------------------------------------------
kixstrip [input] [output]
/Block_Check or /BC /Combine /Debug
/Headers /License /License=[var]
/Performance /Print /Progress
/Show_Errors or /SE /Show_Structure or /SS /Translate
/TAB=[num] (def: 6)
default: /Combine /Headers /License (other options are negative)
other: - options with prefix "/No" will be ignored. f.e. /NoDebug /NoTab
- /Block_Check /Tab=2 (auto set: /NoCombine /NoLicense /Print )
/Debug (auto set: /NoLicense /Print /Show_Errors )
- /Block_Check (reformat kixtart code inc. block structure )
/Combine (combine lines to one line )
/Debug (insert "line numbers" for each printed line )
/Headers (insert summary report as footer )
/Performance (insert "indicator" for each executed line)
/Print (do not remove print statements )
/Progress (insert "indicator" for each printed line )
/Show_Errors (insert error messages in output file )
/Show_Structure (insert block structures in output file )
/Translate (convert keywords to upper/lower-case )
examples - kixstrip test.kix test.out /Block_Check /Debug
- kixstrip test.kix test.out /Performance /Show_Structure

btw: Symbol on our homepage has been linked to related http://kixtart.org topic.

[ 14 April 2002, 21:06: Message edited by: MCA ]
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

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

Generated in 0.062 seconds in which 0.025 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