Performance Problems with WindX ?
If your WindX to Unix connection is actually
executing a Unix 'login', read on. This document explains how you can improve
WindX performance by NOT using the standard Unix login mechanism.
When WindX is used through a telnet connection (which is the 'normal' way of
connecting a LAN client to Unix), both sides (WindX and PxPLUS on the host)
constantly need to translate all data. That's because certain characters from
the 256-byte ASCII table have a special meaning to telnet itself, and WindX must
avoid using these characters. This translation of data in both directions (host
to WindX and WindX to host) can cause a noticeable performance penalty.
There is another way of connecting a Windows WindX client to a Unix host. All
programs that are required to connect WindX to the Unix host without using a
Unix login (the PxPLUS *nthost and *ntslave programs) are already bundled with
PxPLUS and WindX.
Below you will find a description of how to set up this " *nthost/*ntslave "
connection between host and WindX. This type of connection doesn't use telnet
and should make quite a performance difference.
Please note that all IP addresses and paths are only examples and must be
replaced by values that reflect your installation.
Save the script below in /usr/local/bin/starthost on your Unix machine:
#!/bin/sh
PVXLIB=/pvx/lib
TERM=winterm
PVXSTART=*startup # or whatever your PVXSTART normally uses
export PVXLIB TERM PVXSTART
umask 0
cd /pvx
/pvx/pvx \*nthost -arg 20000 user 0 >/dev/null </dev/null 2>&1
Use 'chmod 777' to set 'rwx' permissions for all on the /usr/local/bin/starthost
script.
'20000' is the socketnumber of the host process that will be monitoring for
WindX programs to connect.
'user' is a login name from '/etc/passwd':
This user (or the one that you select) *MUST* be available in /etc/passwd.
Verify that you can login and start PxPLUS with this
user.
All WindX users will appear (in Unix) as THIS user (in other words: the PxPLUS
WHO function will return this name).
In /etc/inittab on your Unix machine, enter the following line:
pvx1:2345:respawn:/usr/local/bin/starthost </dev/null >/dev/null 2>&1
[ Note for SCO OpenServer 5 users: I usually include this line below the 'r3'
line in /etc/inittab ].
Please note that when the kernel environment is rebuild (after linking a new
kernel for example), SCO will remove this line from /etc/inittab.
Save /etc/inittab and enter 'telinit q'. You've now started a PxPLUS host
program on your Unix machine (using socket 20000) that will wait for
*NTSLAVE WindX connections.
Please note that on some Unix machines, you will
need to reboot in order to have Unix accept this additional inittab line.
If you are using a Linux OS, you will notice that the inittab file is not
in
use anymore.
In order to have the script autostart when the machine boots,
you can use one of the following:
1. There's a /etc/init.d/boot.local script.
Add the following line to that script:
sudo -uuser /usr/local/bin/starthost &
2. There's a /etc/rc.d/rc.local script.
Add the following line to that script:
su user -c /usr/local/bin/starthost &
When you want to start NTHOST under Windows 'as a service' , you can use this
example:
0010 BEGIN
0020 LET SRV_NAME$="PVX.nthost.Test"
0030 LET DSP_NAME$="PxPLUS NTHOST Server"
0040 LET START_TYPE=1 ! 1=auto, 2=manual, 3=disabled
0050 LET CMD_LINE$="*nthost -arg 20000 -K host"
0060 LET TMP$=ARG(0),P=POS("/\":TMP$,-1); IF P=0 THEN ESCAPE
0070 LET START_DIR$=TMP$(1,P) ! The starting directory
0080 LET DESCRIP$="PxPLUS Nthost server on socket 20000"
0090 ! Now install the service
0100 LET SERVICE=NEW("*obj/ntservice")
0110 PRINT "Now installing the service..."
0120 LET
RESULT=SERVICE'CREATEPROVIDEXSERVICE(SRV_NAME$,DSP_NAME$,DESCRIP$,CMD_LINE$,START_DIR$,START_TYPE,"","",0)
0130 DELETE OBJECT SERVICE
On your workstations (that are running WindX), create the following shortcut:
Target: C:\Pvx\Pvxwin32.exe *ntslave -ID=T99 -arg 192.2.9.10 "" 20000
Start in: C:\Pvx
Run: Minimized
192.2.9.10 is the IP address of your Unix machine.
20000 is the socket number of the host process, as defined in
/usr/local/bin/starthost.
-ID=T99 is the FID(0) value of PxPLUS on the Unix machine.
"" is the name of the program that should be started once a connection has
been made. When empty (""), PxPLUS will start in console mode.
If you want to start PxPLUS sub-processes from this kind of connection, you
should use CALL "*windx.utl;spawn" as the START verb will not work in this case.
|