--------------------------------------------------------------------------------
XSPD Installation Description and History of Changes
--------------------------------------------------------------------------------
Table of Content
================
- Tested System Environment
- History of Versions, Bug fixes and Changes of main Interest
- Licence and Copyrights
- Installation Hints
- Installation Hints for Java Support
- Hints for Makefile Modifikations, Start Script and Config File Adaption
- Hints for Version Updates from a Minor Release
- System Requirements of Shared Memories and Semaphores
- System Requirements for maximum Number of Files
- Programmer Documentation
- Installation of XSPD start/stop script
- Installation for a dedicated Environment (Example)
Tested System Environment
=========================
Raspberry Pi 3 B 4.1.19-v7+ armv7l raspbian
Beaglebone Black Rev C 3.8.13 armv7l debian
Fedora FC20 (3.11.10-301.fc20.x86_64, 64 Bit)
Fedora FC12
Fedora FC9
Fedora FC6 (Linux 2.6.18-1.2798, 64 Bit)
Fedora FC6 (Linux 2.6.18-1.2798, 32 Bit)
Fedora FC3 (Linux 2.6.9-1.667)
Red Hat 8.0 (Linux 2.4.18-14)
Reliant Unix 5.45
SunOS 5.9 (SUN/Solaris Version 9, 64 bit)
SunOS 5.9 (SUN/Solaris Version 9, 32 bit)
NetBSD 2.1 (under development)
AIX 5.3
Kenneth Freidank does the modifications for NetBSD (thanks to Kenneth).
History of Versions, Bug fixes and Changes of main Interest
===========================================================
Version 6.5.7.0
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.5.7.0
xspapp V3.6.7.0
xspjsys V2.3.7.0
xspjava V2.1.7.0
(2) Raspberry Pi 3 B Raspbian
(3) set/getUploadFileAccessMode() at C/Java/Script, see ctest04.xsp, Jtest04.xsp, awktest04.shawk.
Fix problem at Raspberry Pi with file access mode bits and/or file upload using multipart/data.
Fix problem at Raspberry Pi with large size data using local stack variables.
Version 6.5.6.0
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.5.6.0
xspapp V3.6.6.0
xspjsys V2.3.5.0
xspjava V2.1.5.0
(2) HeaderSet keyword at xspd.conf and httpserv.conf to send HTTP header information like
"X-Frame-Options: DENY" to be interpreted by new browser versions.
Any new HTTP header information can be set and will be sent by
- built-in HTTP server (httpserv), see config file "httpserv.conf"
- XSP application specific, set by config file "xspd.conf" within <XSP> .. </XSP> section
- global for all XSP application, set by config file "xspd.conf" inherited by <XSPD> .. </XSPD> section
For security reasons the HeaderSet option cannot be manipulated by application and/or javascript,
it is a XSPD server setting.
(3) Option -cc at shell based commands like xspGetVar to convert HTML hex represented characters like %20
to their 8-bit binary value.
Version 6.5.5.2
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.5.5.2
xspapp V3.6.5.0
xspjsys V2.3.4.0
xspjava V2.1.4.0
(2) changes at xspappscript allow binary data output/input for usage by shell scripts
usage with xspGetVar, xspAssignVar (recommended with new options "-if <infile>" resp. "-of <outfile>")
NOTE: binary data output must not use the options "+vt" and/or "+vn" for display type and/or name
(3) change awktestpic01.shxsp, fc20-gawk does not support binary 8-bit data output via printf("%c.."),
new gawk does output UTF-8 instead, must use a built-in C-program for hex to 8-bit data conversion
Version 6.5.5.1
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.5.5.1
xspapp V3.6.5.0
xspjsys V2.3.4.0
xspjava V2.1.4.0
(2) changes for arm processors, e.g. beaglebone black Rev C 3.8.13 armv7l debian and Java 8
fix bug at debian nawk (work-around at xhtmlpp, xcdoc)
Version 6.5.4.1
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.5.4.1
xspapp V3.6.4.0
xspjsys V2.3.3.0
xspjava V2.1.3.0
(2) bug fix at writeCommBufDecode() at write blocking with EAGAIN
Version 6.5.4.0
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.5.4.0
xspapp V3.6.4.0
xspjsys V2.3.3.0
xspjava V2.1.3.0
(2) bug fix at GETvhashEntry() if reassigning variable with index #0
(3) force xspsysextern.h to be included at 64 bit versions
Version 6.5.3.0
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.5.3.0
xspapp V3.6.3.0
xspjsys V2.3.2.0
xspjava V2.1.2.0
(2) Changes for Fedora FC9 and FC12
(3) stuffEncode() at xspapp.sniff for direction socket->sniff->XSPD only.
(4) additional file types at xspapp.httpserv.c, e.g. mpg
Version 6.5.2.1
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.5.2.1
xspapp V3.6.1.1
xspjsys V2.3.1.0
xspjava V2.1.1.0
(2) New release management for timeout variables reduces system overhead.
Will be done at getVvarP() on the fly when searching for other variables.
So searching for variables will never get a timeout'd variable.
NEW: timeout variables will also work at session memory variables, e.g.
you can use assignVarValueTimeout() at any kind of variables.
See example variable "SessionVarTimeout" at ctest02, awktest02, Jtest02.
Do checking at admin pages display session variables. Timeout'd
variables will get a dagger sign following at the timestamp.
(3) Fix problem at admin pages at setting params of xspdAdmin.xsp.
(4) Fix undefined vvcp at vvarInitprocedure().
(5) Performance tuning at releaseAllVvar() and getVvarP().
(6) Fix max buffer size plausi at read/freadCommBuf().
(7) Tuning combuf handling at inputHttpMultipart().
(8) Fix problem sharing XSP_?MSIZE and XSP_?NVAR.
(9) Generation of minimum configuration file xspd.conf_min.
(10) Fix multiple <XSessId> substitution at end of send buffer.
Version 6.5.1.1
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.5.1.1
xspapp V3.6.1.1
xspjsys V2.3.1.0
xspjava V2.1.1.0
(2) Fix char escaping at xhtmlpp preprocessor for use at AIX.
(3) Cookie support and session-id by cookie.
(4) xspanalyze with cookie support also.
(5) Fix getMVarInScope() and other scope derivates.
(6) Test with SUN jdk1.6.0_01
(7) Fix wrong XSPMode condition at Java programs for calling
outputStartmsg() and outputEndmsg().
(8) Change the xhtmlpp preprocessor for awk/script output for implementing
several HTTP response header directives (needed for cookie support),
using the old preprocessor version at awk/script processing without
the optimizer option -O will also work.
(9) Fix problem using xspInitHttpVmem() together with modus PREFORK and/or
REUSE. The HTTP vars will not be released at end of request. Fixed with
change at macro releaseAllVvar().
(10) Show max used/requested HTTP content length at admin pages "Configuration"
for each XSP application program.
Version 6.5.0.3
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.5.0.3
xspapp V3.6.0.2
xspjsys V2.3.0.1
xspjava V2.1.0.1
(2) Change some escaping at xhtmlpp for use by AIX
Version 6.5.0.2
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.5.0.2
xspapp V3.6.0.2
xspjsys V2.3.0.1
xspjava V2.1.0.1
(2) Some changes for usage by AIX, gcc
(3) 8-bit transfers incl stuff/destuff for direct ports and sniffer.
Version 6.5.0.1
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.5.0.1
xspapp V3.6.0.1
xspjsys V2.3.0.0
xspjava V2.1.0.0
(2) Fix some problems with the new version of processHttpHdr().
Version 6.5.0.0
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.5.0.0
xspapp V3.6.0.0
xspjsys V2.3.0.0
xspjava V2.1.0.0
(2) Changes for Fedora FC6, 32/64 bit.
(3) Change function setSessEnvVarValue() to setSessEnvVar(), 2 params for each
string or int, new macro setSessEnvVarValue, all to avoid compiler warnings
(3) Bug fix at inputHttpMultipart.
(4) Add CFLAG -fPIC for the shared library used at xspjsys.
(5) Bug at gawk version 3.1.5, solved with work around to get the old working
of xhtmlpp.
(6) Process favicon.ico by XSPD, avoids overhead by dummy redirect calls if
HTTP server is not running or normal favicon.ico is not available.
(7) Firefox 1.5.0.7 does not accept HTTP error code 408 (HTTP-REQTIMEOUT),
retries request 20 times. Solved with returning 400 (HTTP-BADREQUEST).
(8) Introducing IP-portno at variable part of log/debugfile/favicon.
(9) Support scanning if HTTP request and matching of regular expressions.
Providing HTTP requests matching defined extensions to start XSP
applications programs. E.g. extension "*.jpg" , or "*.html" may start
application programs. With this feature the XSPD works like a standard
HTTP web server, and may start any XSP application program depending
on different HTTP requests. See example program "httpserv" using the
new option "XSPMatch" at the configuration file.
(10) Allow re-usage of processes if session mode is not active. Speeds up
no-session processes, needed by the new http server feature, see (9).
Version 6.4.1.2
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.4.1.2
xspapp V3.5.1.1
xspjsys V2.2.0.0
xspjava V2.0.2.1
(2) Changes at xspdctl for NetBSD, scan BSD version of the ps command.
(3) Some changes for incompatibility with C++ keywords.
(4) Some changes for AIX.
(5) Update this Readme documentation for the apache RedirectMatch directive
for redirect XSP requests to the XSPD daemon.
(6) New environment variables XSP_HOSTNAME, XSP_PORTNO for the sniffer program.
Version 6.4.1.1
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.4.1.1
xspapp V3.5.1.1
xspjsys V2.2.0.0
xspjava V2.0.2.1
(2) Fix calculation of p_sessCnt for internal use.
(3) Fix restoring of vm_status at outSwapShmVmemCtl() .. inSwapShmVmemCtl()
sequence. Occurs at very high use of shm and shm swapping only.
(4) Fix vv_varcnt reach limit vv_nvar at vvar.c.
(5) Fix calling vvarReset() at swapping shm by outSwapShmVmemCtl().
Version 6.4.1.0
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.4.1.0
xspapp V3.5.1.1
xspjsys V2.2.0.0
xspjava V2.0.2.1
(2) Multiple server option MaxServers, allow several XSPD servers working
as master/slave.
(3) Fix problem at multipart/form-data, seen sometimes at end of file uploads.
(4) New Java methods at interface to variable access to speed up performance.
(5) Some simple loop performance tuning at main functions gives 5-10% speed up.
Version 6.3.4.0
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.3.4.0
xspapp V3.5.1.1
xspjsys V2.1.5.0
xspjava V2.0.2.1
(2) Fix problems at broken pipe conditions, avoid access of parallel processes
to same session shm, seen at some conditions at Java interface only.
(3) Performance tuning.
Version 6.3.3.3
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.3.3.3
xspapp V3.5.1.1
xspjsys V2.1.4.1
xspjava V2.0.2.1
(2) Fix some problems at getFreeSession() and initNewSession(),
get some spare sessions for admin usage.
(3) New algorithm for swapping shared memories to malloc'd vmem buffer, and
a new garbage collector for malloc'd swapping vmem buffer.
Version 6.3.3.2
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.3.3.2
xspapp V3.5.1.1
xspjsys V2.1.4.1
xspjava V2.0.2.1
(2) Fix variable timeout invalidation at sec<0 at same variable and 2nd call.
New features at timeout invalidation sec=1, sec=-1. Increase timeout
invalidation for permanent/persistent variables to MAX_VARTIMEOUT instead
MAX_SESSTIMEOUT.
(3) Size of admin control permanent/persistent variable for default settings
changes size, set default values at size mismatch.
(4) No error/warning at admin login with empty user name.
(5) Disable admin login at continued login errors for a delay of max 15 sec,
to avoid admin login attacks.
(6) Fix problem at new error msg transfer via outcommbuf,
skip call of closeSessionChannel() at S_HTTPERR status.
(7) Some more plausi checks reading config file.
(8) xspchart with setname at c_nset==1
(9) Fix problem at assignShmVmemCtl() if reaching limit of configured shm's.
Change error condition to warning only. Run thru upper shm limit may occur
at heavy input load and is not really a problem.
(10) Fix problem at S_HTTPERR error output via commbuf if output gets EPIPE
because of broken pipe.
Version 6.3.3.1
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.3.3.1
xspapp V3.5.1.1
xspjsys V2.1.4.1
xspjava V2.0.2.1
(2) Fix output from c_outCommBuf with not complete data buffer output.
Version 6.3.3.0
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.3.3.0
xspapp V3.5.1.1
xspjsys V2.1.4.1
xspjava V2.0.2.1
(2) outputHttpErr() using internal commbuf, avoiding fdopen() problem at SUN.
Version 6.3.2.1
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.3.2.1
xspapp V3.5.1.1
xspjsys V2.1.4.1
xspjava V2.0.2.1
(2) Some differences calculating rowspan at xspchart/httpchart fixed.
(3) HTTP redirect counter and some more statistics.
Version 6.3.2.0
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.3.2.0
xspapp V3.5.1.0
xspjsys V2.1.4.0
xspjava V2.0.2.0
(2) Interface library version compatibility checking changed to most
significant three digits, mask with 0xFFF0, allows changing of least
significant digit.
(3) xspchart with limitation auto-refreshing by endtime t_endtime,
see example xspapp/cteststat.c.
(4) Option for collect simular warnings/errors of same filename and lineno.
Version 6.3.1.0
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.3.1.0
xspapp V3.5.0.1
xspjsys V2.1.3.0
xspjava V2.0.1.1
(2) Bug fix using multiple variables with access to first variable, problem
at admin pages only, when changing XSP constants. Not a problem at HTTP
request parameter variables. Interface to C, shell scripts, and Java
changed, but no changes at XSP application programs necessary.
(3) Increment of XSP process call at reuse mode together with prefork mode
fixed. The very first increment was fixed.
(4) getServerName(), getServerPort() changed.
(5) Bug fix using xcfp->c_sessId (C), resp. xcfp.sessId (Java) at REUSE mode.
(6) Fix URL at "menu" button of all XSP test application programs.
(7) Illegal reuse of xspvar struct in case of connection timeout, bug coming
with the delayed connection timeout of V6.3.0.0 fixed.
(8) Calculating delta time at channel close (c_waitCount decrementing) fixed,
resulting in a correct connection timeout.
Version 6.3.0.0
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.3.0.0
xspapp V3.5.0.0
xspjsys V2.1.2.2
xspjava V2.0.1.0
(2) Do XSP application program termination at connection timeout (via SIGTERM
and SIGKILL), with delayed SIGKILL (delay time > XSP specific session
timeout).
(3) Option M_KILLDELAY for delayed XSP application program killing by signal
SIGKILL, delay time is set to XSP specific session timeout. Signal
SIGTERM is sent previously and can be catched by the XSP application
program. The signal SIGKILL will be sent at a delayed session timeout
if the process will be still alive.
(4) Some more statistics: 1 hour time slot call and error statistics.
Version 6.2.0.4
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.2.0.4
xspapp V3.4.7.0
xspjsys V2.1.2.2
xspjava V2.0.1.0
(2) Bug fix at httperror(), file desc exhausting if fdopen() fails, detected
at SUN/Solaris only, occurs with undocumented error numbers at fdopen().
(3) Browser may send several HTTP requests, either with header only or
with part of data. Check socket connection at getpeername() resulting
in discard request, and compare received data length to CONTENT_LENGTH
resulting in disconnect request.
(4) Bug fix at shell script based application programs if XSP variables
will contain the special character '%'. Function xspGetMVarNameValue()
changed to fix problem at shell script routines "xspGetVar".
(5) Illegal termination of application programs, like a core dump of the
application program, will not release the HTTP request variables. Old HTTP
variables will remain at shm, and the variables will stored for several
times. Problem fixed with new vm_status VM_ERRDISCONN, and release the
variables by the application program of the next request. Changes at
C- and Java-Interface.
(6) Avoid "assignVar()" and "releaseVar()" of single variables of type V_HTTP
(security reasons only).
Version 6.2.0.3
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.2.0.3
xspapp V3.4.7.0
xspjsys V2.1.2.1
xspjava V2.0.1.0
(2) New statistics sub menu.
(3) O_NONBLOCK setting at admin/CTLPORT.
(4) Additional SUN/Solaris-specific rlimits admin sysctl page.
Version 6.1.7.1
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.1.7.1
xspapp V3.4.7.0
xspjsys V2.1.2.0
xspjava V2.0.1.0
(2) Index number processing at changeLogfiles() corrected.
Version 6.1.7.0
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.1.7.0
xspapp V3.4.7.0
xspjsys V2.1.2.0
xspjava V2.0.1.0
(2) checkProcess() of dead processes serves unused structures.
(3) Option restart at xspdctl.
(4) Bug fix at closeSessionChannel(), call releaseShmVmemCtl() at SESS_FREE
Bug fix at getFreeSession() if max limit of SHM reached
(5) Bug fix at xspEndprocedure(), using same dbgfile and logfile will cause
problem at fclose() at Fedora FC3, fix by implementing error secure close
file list.
(6) Bug fix at commCheck(), timeout checking was not skipped by changes at
31.10.04 (skip unused comm), and lock timeout does not work, fix this
problem by do not skipping at active closetime.
(7) Option S_AUTORESTART can be used to start a locked process, and the process
can do a controlled database rollback.
(8) Fedora Linux FC3 has problems with signal catching, because some system
functions, may be fprintf(), uses mutual exclusion access. Never seen
at other systems. New signal catching with increment signal counter only,
and separate signalActionHandler() not called via signal interrupt. Problem
had occured at debug mode with heavy load only, but sometimes the XSPD
was blocked within the mutual exclusion, and sometimes only a system reboot
solves the bug. Workaround with new signal handling fixes the FC3 problem,
and will work at other systems also.
(9) Error message statistics, collect double/multiple error messages.
Version 6.1.6.3
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.1.6.3
xspapp V3.4.4.2
xspjsys V2.1.1.1
xspjava V2.0.1.0
(2) Memory leak at xspapp.c fixed, must detach shm by shmdt() at end of
request to free internal structure used by system call shmat().
(3) Change error message EAGAIN to debug message at writeCommBufStuffDecode().
Version 6.1.6.2
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.1.6.2
xspapp V3.4.4.1
xspjsys V2.1.1.0
xspjava V2.0.1.0
(2) Problem at shutdown() if used at closed fd.
Version 6.1.6.1
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.1.6.1
xspapp V3.4.4.0
xspjsys V2.1.1.0
xspjava V2.0.1.0
(2) Bug fix at vvar.c, always initialize quick search index vv_fastix.
Version 6.1.6.0
~~~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.1.6.0
xspapp V3.4.4.0
xspjsys V2.1.1.0
xspjava V2.0.1.0
(2) Firefox problem using JavaScript "submit()" at admin pages
(3) VVAR_MAXLGTH configured via xspconfig.h
(4) xspgraph library (still under development, first tests)
(5) Bug fix no setChannelTimeout() at INTRPIPE and EOFCH condition
(6) Skip input channels at commCheck() with INTRPIPE condition
(7) Bug fix at xspSessionDisconnect() at no SESSION mode, C and Java
(8) Release of session shm at end of xspSessionDisconnect(), some more debug
messages with vm_pid at xspSessionConnect() and xspSessionDisconnect()
(9) Do not allow M_REUSE if M_SESSION is not set, reason: processes uses
session structure. M_PREFORK can be used without setting M_SESSION,
M_PREFORK uses a temporary session.
(10) 8-bit-support using character stuffing, new library function at
commbufstuff.c, to be used for binary data (e.g. image transfer).
(11) initprocedure() returns error msg in case of error, error msg will be
displayed at html error page.
(12) Bug fix at macro btol() when using ip-address parts >=128.
(13) 64-bit support.
(14) bug fix at EPIPE condition while httperr() message.
(15) fix problem with warning "transfer():max loop overflow" at stopped output
channel, set max value of outpsuspwait depending of INPWAIT
(16) Binary, unlimited and multipart/form-data HTTP input, e.g. for file upload.
Other (normal) HTTP input unlimited also, using limited memory allocation,
and repeated input calls. All for usage by C, scripts, and/or Java.
(17) Support multiple XSPD connection ports called "XSPD special connection
ports", use either the standard XSPD IP-port or several other IP-Ports.
(18) Direct Connection ports, using the XSPD as server only, e.g. sniffer
programs, MUST set the M_DIRCTCONN bit at XSPMode up from this version!!!
(19) Some throughput statistics visible via admin pages.
(20) Bug fix at Java interface XSPApp.getNextItem() using <= jdk1.3.1_03.
(21) Problem fix at xspfwd exit within header info reading, new INTRPIPE and
timeout setting (never seen at live running, but also fixed).
(22) Some bug fixes using reuse mode together with prefork mode.
(23) At Java programs reused session will be prefered instead of preforked.
This will speed up Java programs because the Java just-in-time compiler
at new process start will reduce the performance, while reused sessions
will have already precompiled Java code.
(24) Problem fix at uncondionally break down of XSP application, e.g. at core
dump conditions, will cause INTRPIPE and INPCLOSE, but must close channel.
Causes busy main routine if input at HTTP side until session timeout.
Problem fixed by closing channel.
(25) New start option "-warn" for exit at warning conditions during
startup initialization time.
(26) XSPD also acts like a simple WWW server for XSP application programs to
speed up performance. This option will avoid xspfwd program start overhead
but will increase the XSPD server work a little bit.
(27) comm->c_status adapted to 32 bit flags.
(28) Bug fix at openSession(), child section error exit.
(29) Optimize session and HTTP variable access by quick search index.
Version 6.1.5
~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.1.5
xspapp V3.4.3
xspjsys V2.0.5
xspjava V2.0.0
(2) Problems at SunOS shared libraries using variable name "debug". Sorry,
but all XSPD variable names "debug.." have to be changed to "dbgmode..".
(3) Bug fix using REUSE together with PREFORK.
(4) Bug fix using REUSE at Java interface.
(5) New statistics values prefork-cnt, reuse-cnt, swap-cnt, and also new
administration pages for those values.
Version 6.1.4
~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.1.4
xspapp V3.4.2
xspjsys V2.0.4
xspjava V2.0.0
(2) Using semaphore sets.
(3) Avoid shmid==0 and semid==0.
Version 6.1.3
~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.1.3
xspapp V3.4.2
xspjsys V2.0.3
xspjava V2.0.0
(2) Verify password by 2nd input.
(3) admsysctl with checkbox for changing admin password.
(4) Red color at warnings and errors of admin pages.
(5) getRequestURL() C/Java changed.
Version 6.1.2
~~~~~~~~~~~~~
(1) Release of shared memories will fix problems at first test using mode
M_REUSE. Changed at C and Java interfacing.
Version 6.1.1
~~~~~~~~~~~~~
(1) Time limitation for XSP child processes will avoid problems with system
resources like file descriptors. To be used at modes M_PREFORK and M_REUSE
if some processes keeps filedescriptors open, deleting this files by other
processes, e.g. command shell, will not release the allocated disk space,
even if the files are note visible by the command shell. The processes must
be terminated to decrement the use count of the filedescriptor and to
release the disk space. Theoretical problem, not only for file descriptors,
but occurs sometimes at real life.
Version 6.1.0
~~~~~~~~~~~~~
(1) Introducing mode M_REUSE speeds up performance and reduces system load.
Version 6.0.1
~~~~~~~~~~~~~
(1) Some adaption needed for Reliant Unix
Version 6.0.0
~~~~~~~~~~~~~
(1) New distribution version, covers:
xspsys V6.0.0
xspapp V3.4.0
xspjsys V2.0.0
xspjava V2.0.0
Version 5.8.2
~~~~~~~~~~~~~
(1) allow different sizes at session, XSP and global shm memory
Version 5.8.1
~~~~~~~~~~~~~
(1) performance tuning at xspfwd allow using init shm instead of config file
Version 5.8.0
~~~~~~~~~~~~~
(1) optimizing shm variable access via hashtable at server and application
(2) optimizing by using TXTLEN() instead strlen()
(3) bug at blocking output with large input data fixed
Version 5.7.0
~~~~~~~~~~~~~
(1) optimizing at env transfer XSP_xMSIZE, XSP_xNVAR
(2) new calling of exec..() allow additional args at JPGMSTART
Version 5.6.9
~~~~~~~~~~~~~
(1) sessinfo, xspdinfo binary structure for Java session and server info
Version 5.6.8
~~~~~~~~~~~~~
(1) first version with supporting Java application programs
(2) bug fix if changing from Admin to normal XSP
(3) sniffer utility, xspMode M_DIRCTCONNPORT
(4) admin utility protecting communication buffer display, xspMode M_NOCOMMDISPL
(5) getChldCtl() correction for siemens/wincor reliant unix
(6) closeSessionChannel() bug fix at swapping shm limit
Version 5.6.7
~~~~~~~~~~~~~
(1) bug fix when selecting details at admcommall.hxsp, new index selection
Version 5.6.6
~~~~~~~~~~~~~
(1) statistics at logfile
(2) bug fix at permanent binary variables when writing to varfile
(3) bug fix using HTML multiple select fields
(4) status info via getXspStat(), store status at log file and var file
Version 5.6.5
~~~~~~~~~~~~~
(1) column sort options at xspdAdmin pages
(2) optimizing of preforked processes
(3) childExit(), getChldCtl() changed
(4) bug fix bug getFreeSession(), get only old preforked
(5) bug fix at assignHttpVvar() multiple select
Version 5.6.2
~~~~~~~~~~~~~
(1) childExit(), getChldCtl() changed for better end of process control
(2) usage and statistic output at xspdAdmin system control page
Version 5.6.1
~~~~~~~~~~~~~
(1) optimizing requirements to system limits, free choice of number of sessions,
channels, shared memories etc, dynamic control of internal system resources
will offer independency to system limits like max count of file descriptors, max count of shared memories etc
Version 5.6.0
~~~~~~~~~~~~~
(1) system info at logfile every hour
(2) optimize prestartSession()
(3) limit log and debug files
(4) ignore SIGINT
(5) autostart at closed sessions via new xspMode flag M_IGNNOSESS
(6) tuning getSessionById()
(7) some bug fixes prestartSession(), reopenSession(), getFreeSession()
Version 5.5.7
~~~~~~~~~~~~~
(1) new option M_IGNBUSYSESS at XspMode will not error exit at several
concurrent requests with same session id, waiting for end of session will
be done for 2nd and following HTTP requests instead
Version 5.5.4
~~~~~~~~~~~~~
(1) new option M_IGNNOSESS at XspMode will do auto-restart with a new session
if old session has timeout'd
Version 5.5.3
~~~~~~~~~~~~~
(1) system info at logfile every hour
(2) ignore SIGINT
Version 5.5.2
~~~~~~~~~~~~~
(1) end of session via V_CONTROL variable xspLockTime==-1
V_CONTROL variable "c_errno" changed to "xspErrno"
V_CONTROL variable "LockTime" changed to "xspLockTime"
Version 5.5.1
~~~~~~~~~~~~~
(1) XSP and channel dependend connection timeouts.
Retrigger connection timeout at valid input.
structure comm changed.
Version 5.5.0
~~~~~~~~~~~~~
(1) Changes at xspappscript.c supporting global and XSP variables.
(2) New system call "xspSessionClose" (Makefile changes also).
Licence and Copyrights
======================
Usage of the package "eXtended Server Pages" (XSP/XSPD) is on your own risk.
The author is not responsible for any failure at the programs or the
documentation. This package is provided "as is" and without any express or
implied warrenties, including, without limitations, the implied warrenties of
merchantibility and fitness for a particular purpose.
The package "eXtended Server Pages" (XSP/XSPD) and the documentation is
protected by copyright. You can use the package "eXtended Server Pages"
(XSP/XSPD) under the terms of the OSI "Artistic Licence"
(see http://www.perl.com/language/misc/Artistic.html).
Programs or documentation of the package "eXtended Server Pages" (XSP/XSPD) may
be changed without any notice.
Installation Hints
==================
- Up from version 6.1.6.0 all the distribution files come together in a
single gzip'd tar file.
- NOTE: Some of the following preparations like uncompressing and extracting
of the tar archives may be omitted if using the installation script
"xspdinstall". The installation script is placed at the distributed source
file "xspsrc_YYMMDD_tar.tgz".
Put the source tarfile "xspsrc_YYMMDD_tar.tgz" from the internet to "/tmp".
Using another directory than "/tmp" will need a change of the "xspdinstall"
script or use the gzip'd tar file as additional parameter for the
"xspdinstall" script.
Create an empty installation directory or use your home directory.
Extract the installation script via:
gzip -d < /tmp/xspsrc_YYMMDD_tar.tgz | tar xfvm - xspdinstall
Extract first the installation script "xspdinstall" and put it to an
installation or home directory of your choice.
- Get the distributed sources
"xspsys_YYMMDD.tar" (XSP/XSPD system files)
"xspapp_YYMMDD.tar" (sample XSP application programs)
via the installation script or directly from the gzip'd tar file.
All of the files are source programs. Until now there is no need of any
binary program code.
If not using the installation script "xspdinstall":
Extract all files from the tar archives to the desired directories at
new directories at your home directory, e.g. "$HOME/xspsys" and
"$HOME/xspapp". There is no need of root rights for using the XSP/XSPD
programs. The XSP application programs are called by the web server like
"normal" cgi-scripts.
- The distributed Makefiles (..../xspsys/Makefile and ..../xspapp/Makefile)
must be adapted to your requirements (see section "Hints for Makefile
Modifikations").
Change the following Makefile constants:
- MODULE
- TARGETDIR (change to XSPD installation dir)
- PWD (change to XSPD installation dir)
- XSPAPPDIR resp. XSPSYSDIR
- XSPJAVASYSDIR, XSPJAVADIR (for Java support, otherwise disable)
- CONFIGFILE (with same path as INSTALLDIR)
- INSTALLDIR (installation dir for executables)
- UTILDIR
- XSPDIR (to installion cgi path dir)
- APPUTILDIR
- CFLAGSX (system specific compile flags)
- CLDFLAGS (system specific C-link flags)
- CC (system specific C-compiler)
- AR (system specific archiver)
- SEMUN (set to 1 if semctl() needs union)
- UNAME (set to result of command "uname")
All other internal dependencies are relative to the home directory of the
Makefiles. Some definitions at the Makefiles seems to be a little stupid
but the Makefiles are used on different UNIX systems and must be therefore
compatible to several environments. If you do not need the Java support
set a comment sign at front of the definitions of XSPJAVASYSDIR and
XSPJAVADIR or assign an empty string. Some Makefile labels are for internal
usage at delivery or backup purposes only.
The constant SEMUN have to set to 0 for linux systems. At some systems the
4th parameter of the system call "semctl()" needs an union. Take a look
at the parameter specification with "man semctl". A union will be used if
the constant SEMUN is set to 1. An incorrect setting will cause a memory
access error, e.g. SunOS/Solaris (SUN/Solaris) needs an union.
The constant UNAME may have to be set to get the correct signal handling.
Execute the shell command "uname" and set the constant to the result,
example: UNAME=SunOS
Do not try to insert the shell command at the Makefile, like UNAME=`uname`,
because this will not work.
The constant UNAME is used for signal handling only. On some systems, e.g.
RedHat Linux, you do not have to init the constant UNAME, because the
internal Makefile constant OSTYPE will be used instead.
The choice of the signal handling seems to be a little difficulty, but
don't worry, the signal catching is only be used to shutdown the XSPD or
to disable some signals. Therefore the "old" Unix signal catching is
used. There is no timer signal handling at the XSPD, timeout conditions
are provided by the "select" system call, and the XSPD's child processes
termination via SIGCHLD will also be controlled by the "waitpid()" call.
Of course, you should have a little experience of changing makefile's.
- Some system dependent maximimum limits may be set in the global
configuration file "..../xspsys/include/xspconfig.h" (e.g. max number of
shared memories, max no of communication channels, max number of sessions
etc). At the first step these file should be not changed.
- Now it is time to do the compilation and linking, but:
At the first step it is recommended to disable the Java support
by just make a comment sign '#' at the first position of the lines
containing the keywords "XSPJAVASYSDIR" and "XSPJAVADIR" at the
"..../xspsys/Makefile", like
...
#XSPJAVASYSDIR=../xspjsys
...
#XSPJAVADIR=../xspjava
...
Start the Makefile by:
cd ..../xspsys; make install
The system Makefile will call the distributed application Makefile.
- At the first time the distributed configuration file
"..../xspsys/etc/xspd.conf" will be copied to your runtime path $(XSPDIR)
defined at the Makefile. There will be also a configuration file
"xspd.conf_min" at the path $(XSPDIR) for a minimum configuration.
It is recommended to use this minimum configuration file at the very first
step to check if the XSPD will start up.
The minimum configuration file will only enable a simple C application
program, a Java application program, a shell script application program,
the web server interface, and the admin interface. The number of parallel
sessions of each program type is limited to a very low boundary.
Copy the minimum configuration file "xspd.conf_min" to "xspd.conf" at your
runtime path. Of course, a copy of the origin "xspd.conf" should by done.
- The configuration file "xspd.conf" resp. replaced by the minimum
configuration file "xspd.conf_min" has to be adapted. It must include the
definitions of your application programs. Change all the pathnames and/or
filenames to your requirements, e.g. "LogFile", "DebugFile", "VarFile",
"ConfigFile". The pathnames of these files must have access rights
(read, write) of the user who starts the XSPD daemon.
At the first step you can use the distributed (simple) example and test
programs. Use the path names of logfiles etc at "/tmp" for the first tests.
Otherwise the path for the logfiles and debugfiles may have not the
appropriated access rights. Avoid this "normal" UNIX installation problem
at the first step and change the path names later.
Choose two free and unused IP ports of your system and set it to
"PortBase" of the daemon section "<XSPD>" and the admin section
"<XSPDAdmin>" (set at the distributed config file to 4100 resp. 4101).
Check free IP ports via definements at "/etc/services" and call of
"netstat -a". Do not change the IP ports if your system does not use the
defined ports 4100 and 4101.
Note: Changing any content within the configuration file "xspd.conf"
not a new compilation and linking. All values of the configuration file
will be read at XSPD start time.
- Configure the HTTP alias at the config file of your web server.
For example apache needs new entries at "/etc/httpd/conf/httpd.conf" like:
#
# XSPD alias
#
ScriptAlias /xspd-bin/ "/usr2/js/html/test/"
<Directory "/usr2/js/html/test">
AllowOverride None
Options +ExecCGI
Order allow,deny
Allow from all
</Directory>
Alias /xspd/ "/usr2/js/html/test/"
<Directory "/usr2/js/html/test">
AllowOverride None
Options FollowSymLinks
Order allow,deny
Allow from all
</Directory>
#
# optional redirects to XSPD
#
#RedirectMatch permanent xspdAdmin\.xsp http://localhost:4101/xspdAdmin.xsp
#RedirectMatch permanent (.*)\.xsp http://localhost:4100/$1.xsp
#Redirect permanent /xspd http://localhost:4100
(Remarks: Redirect options are explained at the following section)
Note: "/usr2/js/html/test/" must be same directory as the cgi installion
dir "XSPDIR" from the Makefile. Change it to your environment.
- Starting the daemon is done via simple call, of course after changing
to your installation dir "XSPDIR":
xspd & (starting as background process)
or use the modified xspdctl start/stop script, as described below.
Be sure that the user starting the XSPD daemon will have the correct access
rights for reading and writing the logging files, debug files and variable
files.
Of course, you can build your own start and stop script for including
at "/etc/rc2.d" or "/etc/rc.d/init.d" for automatic start and stopping.
Use the prepared script "..../xspsys/etc/xspdctl", change the config
parameter at the section "specific variable setting" at the beginning
of the script. You may also link it to S99xspd or K99xspd for automatic
start and stopping at system init time. Or use the start/stop script after
the modifications for user controlled start, stop, and restarts
.../xspdctl start
NOTE: The XSPD daemon will be started only once (with the defined IP port
addresses at the config file "xspd.conf". A second start will force an
error message. After stopping the daemon an immediate start may produce an
error message too because there may be some open ports with status
"TIME_WAIT" (check with "netstat -a").
Remarks: You can also use a second XSPD, e.g. one for test and one for
development, if you are using a second set of IP ports. The number of
simultaneous running XSPD is not limited (of course, there will be a limit
by some system resources).
- Stopping the daemon can be done by sending either the signal SIGQUIT
(signal 2) or SIGINT (signal 3). The signals can be sent by
"kill -2 <xspd-process-id>".
Immediate stopping can be done via SIGTERM (signal 15).
The recommended way for stopping the XSPD daemon is by using the admin page
"control" and the checkbox "Stop XSPD (Controlled Exit)". Stopping can also
be done via the start/stop script
.../xspdctl stop
- Calling application programs may be done via your HTTP web server
"http://localhost/xspd-bin/xspdAdmin.xsp" for the admin pages
or
"http://localhost/xspd-bin/ctest01.xsp" for the sample program "ctest01"
The relative HTTP pathnames must be set according to the definitions at the
web server configuration file.
You may also use the HTTP server interface of the XSPD, because reducing
the overhead and increasing the system performance. Start it with
"http://localhost:4101/xspd-bin/xspdAdmin.xsp" for the admin pages
or
"http://localhost:4100/xspd-bin/ctest01.xsp" for the sample program "ctest01"
assuming 4101 as local port of the XSPD admin and 4100 as local port of the
normal XSP application programs. Using the HTTP server interface ignores
the pathnames preceeding the XSP application program name and needs only
the basename, like "ctest01.xsp".
If you access the XSPD from another client you must replace "localhost" by
the symbolic name or the IP-address of the server running the XSPD, and you
must change the value of "HTTPRedirectURL" at the configuration file
"xspd.conf" to the web servers address.
Note: The admin will not started as an own process and you will not see it
at the processlist via "ps -aef". The admin is a part of the daemon process.
- You can also configure the apache to redirect the XSP pages to the XSPD
HTTP server interface. Put some entries to the apache config file
"httpd.conf" like:
RedirectMatch permanent xspdAdmin\.xsp http://localhost:4101/xspdAdmin.xsp
RedirectMatch permanent (.*)\.xsp http://localhost:4100/$1.xsp
This will do a redirect of the admin pages to the XSPD port 4101 resp all
other XSP application programs to the XSPD port 4100. The redirect
definitions will work in the order defined at "httpd.conf". You may also
define a path alias for redirection at "httpd.conf" like:
Redirect permanent /xspd http://localhost:4100
This will redirect all URL calls like
"http://localhost/xspd/ctest01.xsp" to "http://localhost:4100/ctest01.xsp"
- The newer versions of the XSPD will use a shared memory for a faster
communication between the XSPD and the forwarder programs instead of the
previously used configuration file. The XSPD and its forwarders needs a
unique shared memory id together with a version date timestamp of the
compiling. The Makefile will normally supports the unique timestamp. You
must use XSPD and forwarder programs compiled and linked at the same day.
Otherwise the forwarder programs will use the old method with the
configuration file, and every time a forwarder will display a message like
"using config file, mismatch verification at init shm" at the start line
in the logfile. Using the shared memory will produce the message "using
init shm", this is the faster way. But don't worry, both methods will
work.
Using the HTTP server interface of the XSPD will neither need the forwarder
programs, nor a HTTP Web server, and is much faster than using your HTTP
web server together with the forwarder programs.
The new XSPD version contains a built-in HTTP web server (may be used instead
of the apache web server). It's an simple application C program, see
.../xspapp/src/httpserv.c
The built-in HTTP web server is used to display the XSPD docu pages via the
menue button "Docu" at the XSPD/XSP Admin pages. Be sure to get the correct
port id for the httpserv program (default 4100). Set the hostname
at the /etc/hosts file ("HostName" at your "xspd.conf" must be resolved by
your system file "/etc/hosts").
- Good luck
Installation Hints for Java Support
===================================
- The XSPD/XSP Java support may be installed at a separate step.
- Get the distributed sources for Java support
"xspjsys_YYMMDD.tar" (XSP Java support core classes and JNI)
"xspjava_YYMMDD.tar" (sample XSP Java application programs)
All of the files are source programs. Until now there is no need of any
binary program code.
If you have used the installation script "xspdinstall" these files are
already extracted, otherwise:
Extract all files from the tar archives to the desired directories at
new directories at your home directory, e.g. "$HOME/xspjsys" and
"$HOME/xspjava".
- First be sure to have set the Java CLASSPATH at your environment.
Set the following variables at your "$HOME/.profile":
Example for Reliant Unix 5.45:
CLASSPATH=$CLASSPATH:/opt/java/jdk13/jre/lib/rt.jar
CLASSPATH=$CLASSPATH:/opt/java/jdk13/lib/tools.jar
CLASSPATH=$CLASSPATH:/opt/java/jdk13/lib/dt.jar
CLASSPATH=$CLASSPATH:/opt/java/jdk13/jre/lib/i18n.jar
CLASSPATH=$CLASSPATH:.
export CLASSPATH
Example for SunOS/Solaris 5.9:
CLASSPATH=$CLASSPATH:/usr/j2se/jre/lib/rt.jar
CLASSPATH=$CLASSPATH:/usr/j2se/jre/lib/tools.jar
CLASSPATH=$CLASSPATH:/usr/j2se/jre/lib/dt.jar
CLASSPATH=$CLASSPATH:/usr/j2se/jre/lib/i18n.jar
CLASSPATH=$CLASSPATH:.
export CLASSPATH
At Red Hat linux 8.0 there is no need to adapt the Java CLASSPATH.
At other systems search for all the above jar-files via
find / -name "rt.jar" -follow -print 2>/dev/null | more
Search also for the other jar-files, and adapt the CLASSPATH variable.
- The distributed Makefiles (..../xspjsys/Makefile and ..../xspjava/Makefile)
must be adapted to your requirements (see section "Hints for Makefile
Modifikations").
Change the following Makefile constants at both Makefiles:
- MODULE
- TARGETDIR (change to XSPD installation dir)
- PWD (change to XSPD installation dir)
- XSPSYSDIR
- JDKDIR (for the actual used JDK)
- CONFIGFILE (with same path as INSTALLDIR)
- INSTALLDIR (installation dir for executables)
- UTILDIR
- XSPDIR (to installion cgi path dir)
- APPUTILDIR
- CFLAGSX (system specific compile flags)
- JDKINCLFLAGS (system specific include compile flags)
- LDFLAGS (system specific linker flags)
- CC (system specific C-compiler)
All other internal dependencies are relative to the home directory of the
makefiles. If you have enabled the Java support at the XSP system core
makefile (e.g. at ..../xspsys) both the Java makefiles will be called
automatically if you build a new XSP system kernel.
- System dependent maximimum limits at the global configuration file
"..../xspsys/include/xspconfig.h" should be normally not adapted.
- Now it is time to do the compilation and linking.
Delete the comment sign '#' at the first position of the lines
containing the keywords "XSPJAVASYSDIR" and "XSPJAVADIR" at the
"..../xspsys/Makefile" of the XSPD system directory to allow automatic
calls of the both Java Makefiles, and adapt the Java definements
"XSPJAVASYSDIR" and "XSPJAVADIR" to the correct directories.
(These directories must also be set at the configuration file "xspd.conf"
for the program root of the Java application programs, explained below.)
Start the Makefile at the XSP system core:
cd ..../xspsys; make install
The system Makefile will call all dependent Makefiles.
- While executing the Makefile newer Java compiler versions will result in
warning messages like:
javac /usr2/js/xspjsys/src/de/jsc/xsp/XSPConfig.java
Note: /usr2/js/xspjsys/src/de/jsc/xsp/XSPConfig.java uses
unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Ignore the above warnings.
- If any problem occurs while linking the shared library "libxsp.so" the
linker flags "LDFLAGS" may need an adaption to your system environment.
After linking there is a security checking for undefined symbols. See
the linking "libxsp.so" section with scanning "errno, atoi, ...". The
unresolved symbols are displayed. Check the displayed symbols. If any
symbol is displayed which belongs to system modules (e.g. "strcpy") add
it to the list. The undefined symbol checking is for security only to
avoid unresolved linking errors at runtime of the Java application
programs.
- Check the configuration file "xspd.conf" for the keyword "PgmRoot" at all
the Java application programs (e.g. at the example program "Jtest01").
The "PgmRoot" variable must contain the value of the classes path of the
Java application programs, it will be at the example configuration path
"..../xspjava/classes". If this will not met, change to your environment
according to the setting of the variable "XSPJAVADIR" at the system
Makefile "..../xspsys/Makefile".
- Sometimes an error will occur when calling the Java application programs
if the linked library "libxsp.so" is not built as "shared" library because
missing the system dependent linking option. Check the Java application
program as standalone program like:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:..../xspjsys/lib
CLASSPATH=$CLASSPATH:..../xspjsys/jardir/xsp.jar
CLASSPATH=$CLASSPATH:..../xspjava/jardir/app.jar
export LD_LIBRARY_PATH CLASSPATH
java YourJavaProgram
Start your Java program, enter a "return" and take a look to the error
messages. NOTE: Do not start the forwarder (e.g. "YourJavaProgram.xsp")
because the forwarder is a pure C program.
Remarks: If you have already a adapted "xspdctl" start/stop script, you may
also call this to start a Java program like:
xspdctl -xj Jtest01 # e.g. "Jtest01" is "YourJavaProgram"
with an additional input of "<XSP></XSP>" followed by a return at the
next line.
This will call your Java program "Jtest01" with the same environment as
defined at the XSPD start script "xspdctl".
- If you get any unresolved symbol, for example "YourUndefSymbolName",
you may search for the undefined symbols like:
for FIL in /usr/lib/lib*.so # or any other file list
do
if (nm $FIL | grep "YourUndefSymbolName" | egrep -v "( U |UNDEF)")
then
echo "--> $FIL"
fi
done
Scan the result list for the estimated module to be needed. Some linker
needs them at the linking list, add the module to the linker option
"LDFLAGS" in the manner "-lmodule" or "libpath/module.so".
Don't worry, the problems described above are the "normal" problems when
migrate an application to another system environment. I hope the hints
explained above is a little help to you.
- Later on, but not at the first compiling and linking, you may wonder
yourself about a expensive duration when making a new version of your
Java application programs. This may occur when building the jar files
from the class files. Take a look at "xspjava/classes". Any existing file
from a previous core dump of a Java application program will put to this
directory and the jar will include it. If there is a core dump you
will also see the according Java log file for some more details of crashing.
For a correct building of the jar file, delete the core dumps and the
log files. Additional the Makefiles contains a checking script for illegal
files.
- The configuration file "xspd.conf" has to be adapted. It must include the
definitions of your Java application programs. Change all the pathnames
and/or filenames to your requirements, e.g. "LogFile", "DebugFile",
"VarFile", "ConfigFile". The pathnames of the files must have access rights
(read, write) of the user who starts the XSPD daemon.
The XSPD configuration parameter "JPgmPath" must be set to the Java runtime
processor like
JPgmPath "/usr/java/j2sdk1.5.0_beta2/bin/java -server -Xms4m"
and will be used for starting the Java application programs.
Of course, the Java application programs must be have a special bit setting
at the "XSPMode" configuration parameter. Set the bit "M_JPGMSTART" (0x0800)
at the desired Java application programs. The bit "M_JPGMSTART" must not set
at the configuration part of the XSPD or at other not-Java programs.
At the first step you can use the distributed (simple) example and test
programs. Use the pathnames of logfiles etc at "/tmp" for the first tests.
Later on, if the Java examples works well and you have built your own Java
application programs, it is recommended to use the prefork mode and/or the
reuse mode to speed up the Java program starting.
Note: Changing any content within the configuration file "xspd.conf" needs
not a new compilation and linking. All values of the configuration file
will be read at XSPD start time.
- If you use the makefiles and the installation in the same manner as the
distributed makefiles you do not have to adapt the web server configuration.
- If the XSPD daemon is running you must first stop the daemon by a shutdown
script, the admin control pages or by "kill -15 <process-id>".
- If you start the XSPD daemon you must include the Java specific environment
to your shell or start the XSPD by the following commands:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr2/js/xspjsys/lib
export LD_LIBRARY_PATH
CLASSPATH=$CLASSPATH:/usr2/js/xspjsys/jardir/xsp.jar
CLASSPATH=$CLASSPATH:/usr2/js/xspjava/jardir/app.jar
export CLASSPATH
xspd&
Note: the previous path "/usr2/js/xspjsys/" is an example and must replace
by your specific directory. If you are using the delivered start/stop script
"xspdctl" you have to adapt this environment variables at the script.
In this case, you will start and stop the XSPD via:
xspdctl start
or
xspdctl stop
The delivered start/stop script "xspdctl" is also configured to be used
as start/stop script at "/etc/rc.d", and also supports a stop-stop option:
xspdctl restart
Of course, you may set the LD_LIBRARY_PATH and the CLASSPATH at the
XSPD configuration file also, but for the first step setting at your
shell environment is easier for testing.
Be sure that the user starting the XSPD daemon will have the correct access
rights for reading and writing the logging files, debug files and variable
files.
- Calling application programs will be done via
"http://localhost/xspd-bin/xspdAdmin.xsp" for the admin pages
or
"http://localhost/xspd-bin/Jtest01.xsp" for the sample program "Jtest01"
The relative HTTP pathnames must be set according to the definitions at the
web server configuration file.
You may also use the HTTP server interface of the XSPD, because reducing
the overhead and increasing the system performance. Start ist with
"http://localhost:4101/xspd-bin/xspdAdmin.xsp" for the admin pages
or
"http://localhost:4100/xspd-bin/Jtest01.xsp" for the sample program "Jtest01"
assuming 4101 as local port of the XSPD admin and 4100 as local port of the
normal XSP application programs. Using the HTTP server interface ignores
the pathnames preceeding the XSP application program name.
- Good luck for the additional Java support
Hints for Makefile Modifikations, Start Script and Config File Adaption
=======================================================================
Note: get the current settings by: "cd ../xspsys; make environment"
#-------------------------------------------------------------------------------
SunOS 5.10 Generic_150400-24 sun4v sparc sun4v
gcc (GCC) 4.9.0
64 Bit
Makefile:
CC=/opt/csw/bin/gcc
AR=/usr/ccs/bin/ar
AWK=/opt/csw/bin/gawk
UNAME=SunOS
SEMUN=1
BITMODE=64
SCCSID=0
RCSID=1
IDENT=0
CFLAGSX=-mcpu=v9 -m64 -g -fPIC
CLDFLAGS=-lcrypt -lxnet -mcpu=v9 -m64
LD=ld
CFLAGSX=-mcpu=v9 -m64 -g -DFD_SETSIZE=65536
CLDFLAGS=-lxnet -mcpu=v9 -m64
LD=/opt/csw/bin/gld (xspjsys/java)
CFLAGSX=-mcpu=v9 -m64 -g -O -DFD_SETSIZE=65536 (xspjsys/java)
LDFLAGS=-lc -lxnet -G -melf64_sparc (xspjsys/java)
JDKDIR=/usr/jdk/instances/jdk1.8.0 (xspjsys/java)
Java Versions:
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
Config File "xspd.conf":
JPgmPath "/usr/jdk/instances/jdk1.8.0/bin/java -server -Xms16m -d64"
#-------------------------------------------------------------------------------
SunOS 5.10 Generic_142900-15 sun4u sparc SUNW,Sun-Fire-880
gcc (GCC) 4.4.5
64 Bit
Makefile:
CC=/usr/local/gcc4/bin/gcc
AR=/usr/ccs/bin/ar
AWK=/usr/local/bin/gawk
UNAME=SunOS
SEMUN=1
BITMODE=64
SCCSID=0
RCSID=1
IDENT=0
CFLAGSX=-mcpu=v9 -m64 -g -fPIC
CLDFLAGS=-lcrypt -lxnet -mcpu=v9 -m64
LD=ld
CFLAGSX=-mcpu=v9 -m64 -g -DFD_SETSIZE=65536
CLDFLAGS=-lxnet -mcpu=v9 -m64
LD=/usr/sfw/bin/gld (xspjsys/java)
CFLAGSX=-mcpu=v9 -m64 -g -O -DFD_SETSIZE=65536 (xspjsys/java)
LDFLAGS=-lc -lxnet -G -melf64_sparc (xspjsys/java)
JDKDIR=/usr/jdk/instances/jdk1.5.0 (xspjsys/java)
Java Versions:
java version "1.5.0_20"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_20-b02)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_20-b02, mixed mode)
Config File "xspd.conf":
JPgmPath "/usr/jdk/instances/jdk1.6.0/bin/java -server -Xms16m -d64"
#-------------------------------------------------------------------------------
Beaglebone Black Rev C 3.8.13 armv7l debian
Linux beaglebone 3.8.13-bone47 #1 SMP Fri Apr 11 01:36:09 UTC 2014 armv7l GNU/Linux
gcc (Debian 4.6.3-14) 4.6.3
32 Bit
Makefile:
CC=/usr/bin/gcc
AR=/usr/bin/ar
AWK=/usr/bin/nawk
SEMUN=0
BITMODE=32
SCCSID=0
RCSID=1
IDENT=0
CFLAGSX=-g -O -fPIC -I/usr/include
CLDFLAGS=-lcrypt -lpthread -m32
LDFLAGS=-lc -G
JDKDIR=/usr/java/jdk1.8.0_06
Java Versions:
java version "1.8.0_06"
Java(TM) SE Runtime Environment (build 1.8.0_06-b23)
Java HotSpot(TM) Client VM (build 25.6-b23, mixed mode)
Config File "xspd.conf":
JPgmPath "/usr/java/jdk1.8.0_06/bin/java -server -Xms4m"
#-------------------------------------------------------------------------------
Raspberry Pi 3 B 4.1.19-v7+ armv7l raspbian
xspsys: 6.5.7.0 [32 bit]
xspapp: 3.6.7.0 [32 bit]
xspjsys: 2.3.7.0 [32 bit]
xspjava: 2.1.7.0 [64 bit]
Linux raspberrypi 4.1.19-v7+ #858 SMP Tue Mar 15 15:56:00 GMT 2016 armv7l GNU/Linux
gcc (Raspbian 4.9.2-10) 4.9.2
32 Bit
Makefile:
CC=/usr/bin/gcc
AR=/usr/bin/ar
AWK=/usr/bin/nawk
SEMUN=0
BITMODE=32
SCCSID=0
RCSID=1
IDENT=0
CFLAGSX=-g -O -pie -I/usr/include
CLDFLAGS=-lcrypt -lpthread
LDFLAGS=-lc -G -shared
JDKDIR=/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt
BITMODE=64
Java Versions:
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) Client VM (build 25.65-b01, mixed mode)
Error: This Java instance does not support a 64-bit JVM.
Please install the desired version.
Config File "xspd.conf":
JPgmPath "/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/bin/java -server -Xms4m -d32"
#-------------------------------------------------------------------------------
Fedora Core 20, linux 3.11.10-301.fc20.x86_64
xspsys: 6.5.7.0 [64 bit]
xspapp: 3.6.7.0 [64 bit]
xspjsys: 2.3.7.0 [64 bit]
xspjava: 2.1.7.0 [64 bit]
Linux localhost.localdomain 3.11.10-301.fc20.x86_64 #1 SMP Thu Dec 5 14:01:17 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
gcc (GCC) 4.8.2 20131017 (Red Hat 4.8.2-1)
64 Bit
Makefile:
CC=/usr/lib64/ccache/gcc
AR=/usr/bin/ar
AWK=/usr/bin/gawk
SEMUN=0
BITMODE=64
SCCSID=0
RCSID=1
IDENT=0
CFLAGSX=-g -m64 -fPIC -I/usr/include
CLDFLAGS=-lcrypt -lpthread -m64
CFLAGSX=-g -O2 -m64 -fPIC -I/usr/include
CFLAGSX=-g -O2 -m64 -fPIC
LDFLAGS=-shared -melf_x86_64
JDKDIR=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.3.0.fc20.x86_64
Java Versions:
java version "1.7.0_45"
OpenJDK Runtime Environment (fedora-2.4.3.0.fc20-x86_64 u45-b15)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)
Config File "xspd.conf":
JPgmPath "/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.3.0.fc20.x86_64/bin/java -server -Xms4m -d64"
#-------------------------------------------------------------------------------
Fedora Core 6, linux 2.6.18-1.2798,
gcc (GCC) 4.1.1 20061011 (Red Hat 4.1.1-30)
64 Bit
Makefile:
CC=/usr/bin/gcc
AR=/usr/bin/ar
AWK=/usr/bin/gawk
SEMUN=0
BITMODE=64
SCCSID=0
RCSID=1
IDENT=0
CFLAGSX=-g -O2 -m64 -fPIC
CLDFLAGS=-lcrypt -lpthread -m64
LDFLAGS=-shared -melf_i386
JDKDIR=/usr/java/jdk1.6.0_01
Java Versions:
java version "1.6.0_01"
Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_01-b06, mixed mode)
Start Script "xspdctl":
- no system dependent changes -
Config File "xspd.conf":
JPgmPath "/usr/java/jdk1.6.0_01/bin/java -server -Xms4m -d64" for JDK 1.6.0
#-------------------------------------------------------------------------------
Fedora Core 6, linux 2.6.18-1.2798,
gcc (GCC) 4.1.1 20061011 (Red Hat 4.1.1-30)
32 Bit
Makefile:
CC=/usr/bin/gcc
AR=/usr/bin/ar
AWK=/usr/bin/gawk
SEMUN=0
BITMODE=32
SCCSID=0
RCSID=1
IDENT=0
CFLAGSX=-g -O2 -m32 -fPIC
CLDFLAGS=-lcrypt -lpthread -m32
LDFLAGS=-shared -melf_i386
JDKDIR=/usr/java/jdk1.5.0_06
Java Versions:
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
Start Script "xspdctl":
- no system dependent changes -
Config File "xspd.conf":
JPgmPath "/usr/java/jdk1.5.0_06/bin/java -server -Xms4m" for JDK 1.5.0
#-------------------------------------------------------------------------------
Fedora Core 3, linux 2.6.9-1.667,
gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)
Makefile:
CC=/usr/bin/gcc
AR=/usr/bin/ar
AWK=/bin/gawk
UNAME=Linux
SEMUN=0
BITMODE=32
SCCSID=0
RCSID=1
IDENT=0
CFLAGSX=-g -O
CLDFLAGS=-lcrypt
LDFLAGS=-shared
JDKDIR=/usr/java/j2sdk1.5.0_beta2
Java Versions:
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Server VM (build 1.5.0-b64, mixed mode)
Start Script "xspdctl":
- no system dependent changes -
Config File "xspd.conf":
JPgmPath "/usr/java/j2sdk1.5.0_beta2/bin/java -server -Xms4m" for JDK 1.5.0
#-------------------------------------------------------------------------------
Red Hat Linux 8.0 3.2-7, linux 2.4.18-14, gcc 3.2:
Makefile:
CC=gcc
AR=/usr/ccs/bin/ar
AWK=gawk
UNAME=Linux
SEMUN=0
BITMODE=32
SCCSID=0
RCSID=1
IDENT=0
CFLAGSX=-g -O
CLDFLAGS=-lcrypt
LDFLAGS=-shared
JDKDIR=/usr/java/j2sdk1.4.2_03
Java Versions:
java version "1.4.2_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02)
Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode)
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)
Start Script "xspdctl":
- no system dependent changes -
Config File "xspd.conf":
JPgmPath "/usr/java/j2sdk1.4.2_03/bin/java -server -Xms4m" for JDK 1.4.2
JPgmPath "/usr/java/j2sdk1.5.0_beta2/bin/java -server -Xms4m" for JDK 1.5.0
#-------------------------------------------------------------------------------
Reliant Unix 5.45 RM600 4/1024 R4000:
CC=cc
AR=ar
AWK=awk
UNAME=ReliantUNIX-Y
SEMUN=0
BITMODE=32
SCCSID=1
RCSID=0
IDENT=0
CFLAGSX=-R suppress,CFE1111,CFE1177,CFE1186,CFE1995,CFE1178,CFE1180,CFE1550,CFE1676 -g -O (either -g for debug, or -O for optimize)
CLDFLAGS=-lcrypt -lxnet
LDFLAGS=-G -lc -lxnet
Java Version:
java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_000)
Classic VM (build JENV 1.3.1_000:08/31/01-19:32, dce threads, jit)
Start Script "xspdctl":
- no system dependent changes -
Config File "xspd.conf":
JPgmPath "/home2/java/jdk13/bin/java"
#-------------------------------------------------------------------------------
SunOS 5.9 (Solaris), 32 bit version, gcc 3.3.2,
SunOS 5.9 Generic_117171-12 sun4u sparc SUNW, Sun-Fire-V440 or Sun-Fire-V880:
NOTE: 32 bit version with gcc is recommended for SUN,
32 bit version is faster than 64 bit version.
CC=gcc
AR=/usr/ccs/bin/ar
AWK=gawk
UNAME=SunOS
SEMUN=1
BITMODE=32
SCCSID=0
RCSID=1
IDENT=0
CFLAGSX=-mcpu=v9 -m$(BITMODE) -g -O
CLDFLAGS=-lcrypt -lxnet -mcpu=v9 -m$(BITMODE)
LDFLAGS=-lc -lxnet -G
JDKDIR=/usr/j2se
Java Version:
java version "1.4.2_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04)
Java HotSpot(TM) Client VM (build 1.4.2_05-b04, mixed mode)
Start Script "xspdctl":
- no system dependent changes -
Config File "xspd.conf":
JPgmPath "/usr/j2se/bin/java -server -Xms4m -d32"
#-------------------------------------------------------------------------------
SunOS 5.9 (Solaris), 64 bit version, gcc 3.3.2,
SunOS 5.9 Generic_117171-12 sun4u sparc SUNW,Sun-Fire-V440:
CC=gcc
AR=/usr/ccs/bin/ar
AWK=gawk
UNAME=SunOS
SEMUN=1
BITMODE=64
SCCSID=0
RCSID=1
IDENT=0
CFLAGSX=-mcpu=v9 -m$(BITMODE) -g -O
CLDFLAGS=-lcrypt -lxnet -mcpu=v9 -m$(BITMODE)
LDFLAGS=-lc -lxnet -G
JDKDIR=/usr/j2se
Java Version:
java version "1.4.2_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04)
Java HotSpot(TM) Client VM (build 1.4.2_05-b04, mixed mode)
Start Script "xspdctl":
- no system dependent changes -
Config File "xspd.conf":
JPgmPath "/usr/j2se/bin/java -server -Xms4m -d64"
#-------------------------------------------------------------------------------
SunOS 5.9 (Solaris), 32 bit version, SUN C-compiler
CC=cc
AR=ar
AWK=nawk
UNAME=SunOS
SEMUN=1
BITMODE=32
SCCSID=0
RCSID=1
IDENT=0
CFLAGSX=-xtarget=ultra3 -Xt -erroff=E_NO_IMPLICIT_DECL_ALLOWED -xnativeconnect=interfaces -g -O
CLDFLAGS=-lcrypt -lxnet -xtarget=ultra3
LDFLAGS=-lc -lxnet -G
JDKDIR=/usr/j2se
Start Script "xspdctl":
- no system dependent changes -
Config File "xspd.conf":
JPgmPath "/usr/j2se/bin/java -server -Xms4m -d32"
#-------------------------------------------------------------------------------
NetBSD 2.1
Makefile:
CC=gcc
AR=ar
AWK=gawk # need pkgsrc/lang/gawk installed
UNAME=Linux
SEMUN=1
BITMODE=32
SCCSID=0
RCSID=1
IDENT=0
CFLAGSX=-g -O -DFD_SETSIZE=1024
CLDFLAGS=-lcrypt
LDFLAGS=-shared
Java Versions:
- under development -
Start Script "xspdctl":
- no system dependent changes -
Config File "xspd.conf":
- no system dependent changes -
Hints for Version Updates from a Minor Release
==============================================
For minor release updates you can do a first step to keep your system
dependend environment settings:
- make a backup of your XSPD system by: "cd .../xspsys; make tarbackup"
- make a copy of your system dependend environment settings by
- make a copy of your xspsys/Makefile
- make a copy of your xspapp/Makefile
- make a copy of your xspjsys/Makefile
- make a copy of your xspjava/Makefile
- make a copy of your xspsys/etc/xspdctl
- make a copy of your xspd.conf
- get the sources from the new XSPD release into your directories
xspsys, xspapp, xspjsys, and xspjava
- restore the copies from the above step 2, of course, you should
should compare your copy with the version of the new release.
System Requirements of Shared Memories and Semaphores
=====================================================
Number of shared memories and semaphores needed by the XSPD is defined at
- xspsys/include/xspconfig.h: NSHM (maximum limit for core generation) and
- xspd.conf: MaxShm (maximum runtime value at configuration file)
Each shared memory needs a semaphore. Semaphore variables collected within a
semaphore set are not yet implemented (coming soon), so each shared memory needs
a semaphore set.
The size of a shared memory is limited by
- xspsys/include/xspconfig.h: MAXMEMSIZE (maximum limit for core generation) and
- xspd.conf: MemSize (maximum runtime value at configuration file for XSP and
global)
SessMemSize (maximum runtime value at configuration file for
session shared memory)
You can check the following configuration values by the command
"ipcs -l" (Linux)
or
"/usr/sbin/sysdef" resp. "/etc/system" (SUN/Solaris)
At a normal installation the default values are sufficient (e.g. Linux
Red Hat 8.0, Reliant Unix), some systems with very low limit system resource
definitions needs an adaption. SUN/Solaris needs some modifications, e.g. the
number of shared memories is too less.
NOTE: The number of shared memories can be limited by "MaxShm", additional
needed memory for sessions will be dynamically allocated, and shared memory will
be swapped out into this dynamically allocated memory. But this behaviour will
descrease the performance and limit the number of active sessions. Active
sessions are sessions just processing a HTTP request, preforked sessions and
locked sessions.
The system requirements for additional shared memories needed by the XSPD are:
SHMALL System wide max number of shared memories, needed by XSPD:
SHMALL >= MaxShm, recommended 250-500
SHMMAX Maximum size in bytes for a shared memory segment, needed by XSPD:
SHMMAX >= MAX(MemSize,SessMemSize), recommended: 1-4 MByte
SHMMIN Minimum size in bytes for a shared memory segment, depends on
implementation (normally 1 byte), no requirements by XSPD
SHMMNI System wide maximum number of shared memory segments, needed by XSPD:
SHMMNI >= MaxShm, recommended 250-500
SHMSEG Per process maximum number of shared memory segments, needed by XSPD:
SHMSEG >= MaxShm, recommended 250-500 (Red Hat 8.0 Linux implementation
do not have specific limits for this value, ignore it)
The system requirements for additional semaphores needed by the XSPD are:
SEMMNI System wide maximum number of semaphore sets/arrays,
recommended 100-500
SEMMSL Maximum number of semaphores per semaphore set/array and semaphore id,
the current implementation needs up to 100 semaphores of each set,
recommended 100-250.
SEMMNS System wide maximum number of semaphores, needed by the XSPD:
SEMMNS >= (SEMMNI * SEMMSL) >= MaxShm, recommended 250-500
SEMOPM Maximum number of operations allowed for one semop call. No requirements
by the XSPD, because the XSPD uses only one operation at semop().
SEMVMX Maximum allowable value for semaphore value. No special requirements by
the XSPD, because there is only an increment and a decrement, normally
a maximum of two processes will attach the semaphore, and the maximum
theoretical number of parallel processes are the maximum number of
active HTTP requests with the additional access of the XSPD daemon, but
all of the will block the semaphore for a very short time.
Example Modifications for NetBSD
--------------------------------
* NetBSD 2.1 Kernal modification to the GENERIC kernel
*
# System V-like semaphores options, must uncomment option SYSVSEM
SEMMNI=128 # semaphore identifiers, default=10
SEMMNS=32000 # semaphores in system, default=60
SEMMAP=250 # semaphore entries per map, assuming 1 map per identifier
SEMVMX=32767 # maximum value of a semaphore
# System V-like memory sharing options, must uncomment option SYSVSHM
SHMMAXPGS=32000 # max number of pages, default=2048
SHMMAX=8192 # max segment size
SHMMNI=4096 # max number of identifiers
SHMSEG=4096 # max number of segments per process
Changing of the NetBSD default system parameters are needed (a KERNAL
recompiling is necessary, but easy).
System Requirements for maximum Number of Files
===============================================
Another system limit is the number of opened files of the XSPD kernel parent
process.
Yo can determine it by the following short C-program (or select "Control" of
the XSPD admin page menu, if you have a running XSPD):
#include <sys/time.h>
#include <sys/resource.h>
#include <unistd.h>
main()
{
struct rlimit rlimit;
int retval;
retval = getrlimit(RLIMIT_NOFILE,&rlimit); /* at BSD: use RLIMIT_OFILE */
printf("retval=%d, rlimit.rlim_cur=%d, rlimit.rlim_max=%d\n",
retval,rlimit.rlim_cur,rlimit.rlim_max);
}
The value "rlimit.rlim_cur" shows the soft limit for each process, it can
be adapted per process up to "rlimit.rlim_max" using the "setrlimit()" call.
You may also get the value of RLIMIT_NOFILE, if you are have a running XSPD.
Select "Control" of the XSPD admin page menu and search for the variable
RLIMIT_NOFILE (BSD: RLIMIT_OFILE) at the last section of the page.
A Red Hat 8.x linux system will have a default value of 1024. This value is
should be adapted for a production environment. For adaption see end of section.
The needed file decriptors may be calculated by:
| | | configured maximum | upper limit |
| Id | value | at xspd.conf | at xspconfig.h|
|------------------------------------------------------------------------------|
| Po | XSPD connection ports | (different values | NXSP |
| | | of PortBase) + 1 | |
|------------------------------------------------------------------------------|
| Ad | maximum XSPD admin requests | - | NCTLPORT |
|------------------------------------------------------------------------------|
| Ch | maximum communication channels | MaxChannels | NCOMMCHN |
|------------------------------------------------------------------------------|
| Se | maximum sessions (without admin) | MaxSessions | NSESSION |
|------------------------------------------------------------------------------|
| Pf | maximum preforked processes per XSP| MinStartXSP | NXSPPROC |
|------------------------------------------------------------------------------|
| Re | maximum reused processes per XSP | MaxStartXSP | NXSPPROC |
|------------------------------------------------------------------------------|
| Xd | XSPD internal used, e.g. logfile | | <= 10 |
|------------------------------------------------------------------------------|
(Po) The XSPD uses normally one connection port for all the XSP application
programs, and an additional port for the XSPD admin. But the XSPD can also be
defined to use a different port for each XSP.
Each connection port needs 1 file descriptor at the XSPD kernel.
(Ad) The XSPD offers separate HTTP request channels for the admin interface.
Each admin request needs 1 file descriptor at the XSPD kernel.
(Ch) The maximum value of communication channels is the best way to decrease
the number of opened files, but a lower value will also limit the number of
parallel requests.
Each communication channel needs 1 file descriptor at the XSPD kernel.
(Se) Each active session serving an active HTTP request will use file
descriptors. After the completion of the HTTP request, the file descriptors
will be released.
Each active session needs 2 additional file descriptors at the XSPD kernel for
input/output to the application program and blocks one communication channel.
(Pf) Each preforked process is a waiting session with all needed file
descriptors. A preforked session will not use use additional files at the
system kernel, but must be seen as an "active" session.
(Re) Each reused process will have input/output connections to the application
programs, but do not block a communication channel.
(Xd) The xspd kernel uses some files like logfile, debugfile, config file
and some additional temporary files for HTTP error messages.
Calculation for the maximum number of required file descriptors:
(Xd) + (Po) + (Ad) (without work load)
+ 3 * MIN((Se),(Ch)) (all channels/sessions busy)
where SumXSP(Pf), resp. SumXSP(Re), is the sum of all preforked resp. reused
processes at all XSP definitions.
Without load, but with preforked or reused processes, you will get the minimum
number of needed file descriptors by:
(Xd) + (Po) + (Ad) (without work load)
+ 3 * SumXSP(Pf) (preforked process)
+ 3 * ( SumXSP(Re) - SumXSP(Pf) ) (reused process)
Without preforked and reused processes (recommended for the first step):
(Xd) + (Po) + (Ad) (without work load)
+ 3 * MIN((Se),(Ch)) (all channels/sessions busy)
Assuming you have 10 XSP application programs with maximum values
of 200 sessions and 50 connection channels at the first step and you do not
use the prefork or reuse option, you will need:
(Xd=10) + (Po=2) + (Ad=10) + 3 * (Ch=50) => 172 files
You may also get the maximum value of needed file descriptors, if you are have
already a running XSPD. The XSPD will do the above calculation for you:
Select "Control" of the XSPD admin page menu and search for "Used Files".
You will see the number of current used files and the range of minimum and
maximum needed file descriptors for the XSPD kernel parent process.
NOTE: The number of sessions will not have influence of the number of
open files, if the maximum number of sessions is greater or equal than the
number of communication channels.
NOTE: Each HTTP request will lock the file descriptor of the used socket
connection, until the TIME_WAIT tcp timeout is finished. This behaviou is not
unique to the XSPD, but may be a problem to any application server or
web server at a heavy load. The default TIME_WAIT is set to 60 seconds by system
settings and should be reduced to 10 seconds depending on the system load.
Adaption for increase number of open files:
- under construction -
Programmer Documentation
========================
- Both the XSP C and Java interfacing comes with a javadoc or a javadoc-like
HTML documentation. Get and extract the files into a directory of your
choice:
"xspsysdoc_YYMMDD.tar" (for the C documentation)
"xspjsysdoc_YYMMDD.tar" (for the javadoc)
Note: use different directories for both documentation parts because the
generated files has same file names, like "index.html".
Recommended use of the C documentation is a sub directory path of
"..../xspsys/doc"
and for the javadoc
".../xspjsys/doc"
so you will get correct references from one documentation part to the other.
Example:
mkdir -p <yourdir>/xspsys/doc
chdir <yourdir>/xspsys/doc
tar xfv <yourdownloaddir>/xspsysdoc_YYMMDD.tar
mkdir -p <yourdir>/xspjsys/doc
chdir <yourdir>/xspjsys/doc
tar xfv <yourdownloaddir>/xspjsysdoc_YYMMDD.tar
If you have used the installation script "xspdinstall", this script will
have done already all the work.
NOTE: For valid access to the interface documentation you should use the
http web server interface "httpserv.xsp" coming with the XSPD distribution.
The "httpserv.xsp" has its own configuration file "httpserv.conf", see the
keyword "ConfigFile" at the XSPD configuration file "xspd.conf"
(example: "/usr2/js/html/test/httpserv.conf"). So you can use the interface
documentation via the XSPD admin pages by the menu button "Docu",
Lines of interest at "httpserv.conf" are:
- Alias /xspdoc/ "/usr2/js/xspsys/doc/"
- Alias /xspsys/doc/ "/usr2/js/xspsys/doc/"
- Alias /xspjsys/doc/ "/usr2/js/xspjsys/doc/"
Of course, at first step you can place the interface documentation HTML
pages at any other place, and just start the "index.html" file.
Installation of XSPD start/stop script
======================================
- There is a supported start/stop script for the XSPD server daemon,
see the script at the system directory "xspsys/etc/xspdctl".
- Change the environment dependent configuration variables to your
requirements:
- LOGFILE (path of start/stop logfile)
- XSPD (path of the server daemon executable)
- XSPBIN (directory of XSP/XSPD exutables)
- CONFIGFILE (path of the XSPD config file)
- TIMEOUT (max wait timeout at busy sockets)
- LD_LIBRARY_PATH (extent library path, see examples)
- CLASSPATH (extent Java class path, see examples)
Example for Reliant Unix 5.45 or SunOS/Solaris 5.9:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr2/js/xspjsys/lib
CLASSPATH=$CLASSPATH:/usr2/js/xspjsys/jardir/xsp.jar
CLASSPATH=$CLASSPATH:/usr2/js/xspjava/jardir/app.jar
export LD_LIBRARY_PATH CLASSPATH
NOTE: The base directory must be adapted to your working directory.
NOTE: You must also set the standard CLASSPATH, e.g. at "$HOME/.profile",
see Section "Installation Hints for Java Support" at this file.
On some systems the Java CLASSPATH have to be expanded by "rt.jar",
"tools.jar", "dt.jar", and "i18n.jar".
- The XSPD start/stop script may be used as stand alone utility like
"xspdctl start" resp. "xspdctl stop"
or can be used as rc-script integrated at any of the rc directories as
"S##xspd" (start) resp. "K##xspd" (kill) with ## as number of your
choice from 00..99.
- The XSPD will control itself to never start twice at the same connection
ports, so the XSPD start/stop script will do the same.
- Stopping the XSPD will possible remain some used ports to a LISTEN or
TIME-WAIT mode. If a stopping will be followed by a fast restart the
start/stop script will check the status until the configured TIMEOUT
value.
- The "xspdctl" start/stop script may also be used to start a Java program:
xspdctl -xj Jtest01 # e.g. "Jtest01" is "YourJavaProgram"
This will call your Java program "Jtest01" with the same environment as
defined at the XSPD start/stop script.
Installation for a dedicated Environment (Example)
==================================================
(I) Install system kernel programs
----------------------------------
(1) Login as user ONBAuser and change to xspsys directory:
cd /home/ONBAent/xsp/sys
(2) Make a local tar copy of all your files:
make tarbackup
(3) Make a copy of own "Makefile" to "Makefile.haxxx":
cp Makefile Makefile.haxxx
(4) Make a copy of own "xspconfig.h" to "xspconfig.h_haxxx":
cp include/xspconfig.h include/xspconfig.h_haxxx
(5) Make a copy of own start/stop script "xspdctl" to "xspdctl_haxxx":
cp etc/xspdctl etc/xspdctl_haxxx
(6) Get files from distributed tar file via:
gzip -d xspsys_YYMMDD.tar.gz (gzip -d only needed at old distributions)
tar xfv xspsys_YYMMDD.tar (with YYMMDD like distributed tar file)
(7) Save distributed system configuration and restore the the own system
configuration:
cp include/xspconfig.h include/xspconfig.h_distr
cp include/xspconfig.h_haxxx include/xspconfig.h
NOTE: Make a diff between own system configuration and distributed system
configuration and insert new lines or adapt values:
diff include/xspconfig.h include/xspconfig.h_distr
(8) Save distributed Makefile and restore the the own system dependent Makefile:
cp Makefile Makefile.distr
cp Makefile.haxxx Makefile
NOTE: Make a diff between own Makefile and the distributed one and adapt
the Makefile:
diff Makefile Makefile.distr
(9) Change the version no within the own Makefile to the new version of the
distributed Makefile, see the constants "VERSION" and "ADMVERSION"
at "Makefile.distr" and set the constant at "Makefile"
(10) Verify the sccs id tag settings. At first time you must copy the following
lines from "Makefile.distr" into your "Makefile" (see also remarks above)
### SCCS/RCS/CVS setting ###
SCCSID=0
RCSID=0
IDENT=1
Remarks: set "RCSID" to "0" and "IDENT" to "1" for supporting the sccs
id setting via "#ident" preprocessor tag
Remarks: At first time you must also add the string
-DSCCSID='$(SCCSID)' -DRCSID='$(RCSID)' -DIDENT='$(IDENT)'
to the constant "CFLAGS" at the Makefile, otherwise the sccs id tags will
not be set!
(11) Save distributed start/stop script and save the own one:
cp etc/xspdctl etc/xspdctl_distr
cp etc/xspdctl_haxxx etc/xspdctl
NOTE: Make a diff between own start/stop script and the distributed one
and insert new lines or adapt values:
diff etc/xspdctl etc/xspdctl_distr
(12) Compare your runtime configuration file "xspd.conf" to the distributed
configuration file (the distributed configuration file will be placed as
copy "xspsys/etc/xspd.conf"). Sometimes a new XSPD version will support
new configuration parameters:
diff ..../xspd.conf etc/xspd.conf
(II) Install application programs
---------------------------------
(13) To provide application programs like "alivecheck"
change to apptest directory:
cd /home/ONBAent/xsp/apptest
(14) Make a local tar copy of all your files
(possible already done via "make tarbackup" at xspsys):
make tarbackup
(15) Make a copy of "Makefile" to "Makefile.haxxx":
cp Makefile Makefile.haxxx
(16) Get files from distributed tar file via:
gzip -d xspapp_YYMMDD.tar.gz (gzip -d only needed at old distributions)
tar xfv xspapp_YYMMDD.tar (with YYMMDD like distributed tar file)
(17) Save distributed Makefile and restore the the own system dependent
Makefile:
cp Makefile Makefile.distr
cp Makefile.haxxx Makefile
NOTE: Make a diff between own Makefile and the distributed one and adapt
the Makefile:
diff Makefile Makefile.distr
(18) Change the version no within the own Makefile to the new version of the
distributed Makefile, see the constants "VERSION"
at "Makefile.distr" and set the constant at your own "Makefile"
(19) Verify the sccs id tag settings. At first time you must copy the following
lines from "Makefile.distr" into your "Makefile" (see also remarks above)
### SCCS/RCS/CVS setting ###
SCCSID=0
RCSID=0
IDENT=1
Remarks: set "RCSID" to "0" and "IDENT" to "1" for supporting the sccs
id setting via "#ident" preprocessor tag
Remarks: At first time you must also add the string
-DSCCSID='$(SCCSID)' -DRCSID='$(RCSID)' -DIDENT='$(IDENT)'
to the constant "CFLAGS" at the Makefile, otherwise the sccs id tags will
not be set!
(III) Build system and application programs
-------------------------------------------
(20) change to xspsys directory again:
cd /home/ONBAent/xsp/sys
(21) Do a new compile and link of all files via:
Make
Remarks: possible there may be some compiler warnings, ignore them,
the compiled and linked version will work well
Remarks: "Make" at the application directory "../apptest" should also
be called
(22) All new files are places at the destination directory
"/home/ONBAent/xsp/bin"
(23) Copy the new executables like:
cp -p ../bin/xspd /home/ONBA/bin/xspd
cp -p ../bin/xspfwd /home/ONBA/html/xspd/xspfwd
cp -p ../bin/alivecheck /home/ONBA/bin/alivecheck
Remarks: do the same like "alivecheck" with all your application programs
and link all XSP's (if link does not already exists):
ln /home/ONBA/html/xspd/xspfwd /home/ONBA/html/xspd/xspdAdmin.xsp
ln /home/ONBA/html/xspd/xspfwd /home/ONBA/html/xspd/alivecheck.xsp
Remarks: do the same like "alivecheck.xsp" with all your application XSP's
(24) and if you want to support shell scripting:
cp -p ../bin/xspappscript /home/ONBA/html/xspd/xspappscript
and link to shell commands (if not already exists):
ln /home/ONBAent/exe/xspappscript /home/ONBA/html/xspd/xspSessionConnect
ln /home/ONBAent/exe/xspappscript /home/ONBA/html/xspd/xspSessionDisconnect
ln /home/ONBAent/exe/xspappscript /home/ONBA/html/xspd/xspSessionClose
ln /home/ONBAent/exe/xspappscript /home/ONBA/html/xspd/xspPrVar
ln /home/ONBAent/exe/xspappscript /home/ONBA/html/xspd/xspAssignVar
ln /home/ONBAent/exe/xspappscript /home/ONBA/html/xspd/xspGetVar
ln /home/ONBAent/exe/xspappscript /home/ONBA/html/xspd/xspReleaseVar
ln /home/ONBAent/exe/xspappscript /home/ONBA/html/xspd/xspGetVarSize
ln /home/ONBAent/exe/xspappscript /home/ONBA/html/xspd/xspGetVarCnt
ln /home/ONBAent/exe/xspappscript /home/ONBA/html/xspd/xspInputHttpGet
ln /home/ONBAent/exe/xspappscript /home/ONBA/html/xspd/xspInputHttpPost
ln /home/ONBAent/exe/xspappscript /home/ONBA/html/xspd/xspInputHttp
ln /home/ONBAent/exe/xspappscript /home/ONBA/html/xspd/xspGetSessionId
ln /home/ONBAent/exe/xspappscript /home/ONBA/html/xspd/xspGetSessionCalls
ln /home/ONBAent/exe/xspappscript /home/ONBA/html/xspd/xspSessionIsNew
ln /home/ONBAent/exe/xspappscript /home/ONBA/html/xspd/xspGetSessionTimeout
ln /home/ONBAent/exe/xspappscript /home/ONBA/html/xspd/xspGetLockTimeout
ln /home/ONBAent/exe/xspappscript /home/ONBA/html/xspd/xspGetErrno
ln /home/ONBAent/exe/xspappscript /home/ONBA/html/xspd/xspStuffEncode