PreviousNextUpFAQ Table of Contents

Sun Solaris 2.6

We run our VolanoChat demonstration server on a 200 MHz Intel Pentium Pro with 320 MB of memory running Solaris 2.6 Intel Platform Edition. Described below are the configuration files, scripts and aliases we use on our Solaris system. This information is presented only to show you how we run our VolanoChat server under Solaris with the hope that you will find it useful. If you have suggestions for better methods, please let us know!

You should first make sure you're running the Java Development Kit (JDK) Version 1.1.6 for Solaris available from:

This version is roughly 10 times faster than Sun's JDK Reference Implementation for Solaris since it has both a just-in-time (JIT) compiler and native thread support. We ran our VolanoChat demonstration server for over 79 days non-stop on this Java virtual machine before restarting it in order to upgrade to a new build. For a description of the differences between the reference implementation and production release, see Sun's overview.

Configuration

You should make sure your file descriptor limits are set above their default values of 64 per process so that the VolanoChat server can handle as many concurrent connections as you require. You need one file descriptor for each simultaneous connection to the VolanoChat server. You can increase the hard and soft file descriptor limits by adding the following two definitions to your /etc/system file:

* set hard limit on file descriptors
set rlim_fd_max = 4096
* set soft limit on file descriptors
set rlim_fd_cur = 1024

To have our VolanoChat server start automatically when our system is rebooted, I created a file called S99chat, with the contents shown below, and added it to the directory /etc/rc3.d.

#!/bin/sh
echo "Starting VolanoChat server ..."
su - john -c "/home/john/bin/startchat"

To make sure the chat server gets priority over other processes in the system, I changed to the root user id and entered the following command:

priocntl -s -c TS -m 20 -p 20 -i pid pid

where pid is the process id of the VolanoChat server. You can start the VolanoChat server and set its priority all at once by executing the following command as root:

priocntl -e -c TS -m 20 -p 20 java COM.volano.Main

To get statistical reports every morning about the previous day's Web server and VolanoChat server activity, I set up the following two cron jobs:

web:/export/home/john> crontab -l
59 23 * * * nice /home/john/bin/chatlogs
 0  3 * * * nice /home/john/bin/weblogs

where chatlogs is:

#!/bin/csh -f
# Should be run at 11:59 PM every day.
set SEARCH = `date +%d/%b/%Y`
set DATE   = `date +%y%m%d`
grep -h $SEARCH $home/vcserver/access.log > $home/logs/volano.net/ch$DATE.log
cd $home/logs/volano.net
/usr/local/bin/analog +gvolanochat.cfg ch$DATE.log | mail john@volano.com

and weblogs is:

#!/bin/csh -f
# Should be run after midnight every day.
set DATE = `date +%y%m%d`
cd $home/logs/volano.net
/usr/local/bin/analog +gvolano.cfg ac$DATE.log | mail john@volano.com

The Analog configuration file for the VolanoChat server, volanochat.cfg, contains:

HOSTNAME        "chat.volano.net"
HOSTURL         http://chat.volano.net/
BASEURL         http://chat.volano.net/
UNCOMPRESS      *.zip "/usr/local/bin/unzip -p"
UNCOMPRESS      *.gz  "/usr/local/bin/gunzip -c"
OUTPUT          ASCII
WARNINGS        OFF
ALL             ON
DOMAIN          ON
NUMLOOKUP       ON
DNSFILE         /export/home/john/logs/volano.net/chatdns.txt

DOMSORTBY       requests
HOSTSORTBY      requests
DIRSORTBY       requests
TYPESORTBY      requests
REQSORTBY       requests
REFSORTBY       requests
BROWSORTBY      requests
FULLBROWSORTBY  requests

DOMCOLS         RrBb
HOSTCOLS        RrBb
DIRCOLS         RrBb
TYPECOLS        RrBb
REQCOLS         RrBb
REFCOLS         RrBb
BROWCOLS        RrBb
FULLBROWCOLS    RrBb

DOMMINREQS      1
DIRMINREQS      1
TYPEMINREQS     1
REQMINREQS      1
REFMINREQS      1
BROWMINREQS     1
FULLBROWMINREQS 1

REFEXCLUDE      http://chat.volano.net/*

The Analog configuration file for our Web server, volano.cfg, contains:

HOSTNAME       "www.volano.net"
HOSTURL        http://www.volano.net/
BASEURL        http://www.volano.net/
UNCOMPRESS     *.zip "/usr/local/bin/unzip -p"
UNCOMPRESS     *.gz  "/usr/local/bin/gunzip -c"
OUTPUT         ASCII
WARNINGS       OFF
ALL            ON
DOMAIN         ON
NUMLOOKUP      ON
DNSFILE        /export/home/john/logs/volano.net/webdns.txt
ISPAGE         *.cab,*.jar,*.zip

DOMSORTBY      requests
HOSTSORTBY     requests
DIRSORTBY      requests
TYPESORTBY     requests
REQSORTBY      requests
REFSORTBY      requests
BROWSORTBY     requests
FULLBROWSORTBY requests

DOMCOLS        RrBb
HOSTCOLS       RrBb
DIRCOLS        RrBb
TYPECOLS       RrBb
REQCOLS        RrBb
REFCOLS        RrBb
BROWCOLS       RrBb
FULLBROWCOLS   RrBb

REFEXCLUDE     http://www.volano.net/*
REFMINREQS     2

Running and monitoring VolanoChat

Scripts

I installed our VolanoChat server under my user id of john into the directory:

/export/home/john/vcserver

I defined the following scripts to start the VolanoChat server and the VolanoChat status monitoring program.

startchat

This script starts the VolanoChat server under the KeepAlive program as two background processes, using an initial heap size of 8 MB, a maximum heap size of 64 MB, and redirecting all output to the file server.log. The programs are started from the directory /export/home/john/vcserver, and all memory and file descriptor limits are raised to their maximum values with the unlimit C shell command.

#!/bin/csh -f
cd $home/vcserver
unlimit
java COM.volano.KeepAlive java -ms8m -mx64m COM.volano.Main >>& server.log &

startstat

This script starts the VolanoChat status monitoring program as a background process and redirects its output to the file status.log.

#!/bin/csh -f
cd $home/vcserver
java COM.volano.Status >>& status.log &

Aliases

I defined the following aliases in my .cshrc C shell profile so that I could easily get information about the VolanoChat server process:

alias f  "ps -u john -o pid,ppid,pcpu,pmem,fname,time,etime,nice,vsz"
alias c  "netstat -na -f inet | grep "209\.24\.238\.1\.8000" | grep EST | wc -l"
alias o  "tail $home/vcserver/server.log"
alias s  "tail $home/vcserver/status.log"
alias t  "tail -f $home/vcserver/status.log"

These aliases give me the following one-character commands described below.

f alias

displays information about the running processes. For example, the VolanoChat server is process 9315 below, using 3.1% of the CPU and 15.6% of the memory. The KeepAlive program is VolanoChat's parent process with id 9309 below. The other java process is the VolanoChat status program with process id 9331. And tcsh is the UNIX shell I use for my login.

  PID  PPID %CPU %MEM COMMAND         TIME     ELAPSED NI  VSZ
21900 21888  0.2  1.1 tcsh            0:00       19:56 20 1676
 9309     1  0.0  2.5 java            0:03  3-03:59:26 14 7636
 9331     1  0.0  5.1 java            0:02  3-03:59:22 20 7868
 9315  9309  3.1 15.6 java        01:35:55  3-03:59:25 14 21188

c alias

gives a quick count of how many connections the Solaris TCP/IP network stack thinks are connected to the VolanoChat server.

     190

o alias

shows any output commands from the KeepAlive or VolanoChat programs by typing the end of the server.log file.

[Sun May 31 11:03:28 PDT 1998] Starting server ...
VolanoChat(TM) Server Version 2.0.0 Build 148
Copyright (C) 1996-1998 Volano LLC.  All rights reserved.
web.volano.net (209.24.233.11) VolanoChatPro - unlimited connections

s alias

shows the last 10 minutes of status monitoring output by typing the end of the status.log file created by the startstat script.

[03/Jun/1998:14:54:19 PDT] 3909KB 8272KB 47% 367 179 12 0 83 6 37 43
[03/Jun/1998:14:55:19 PDT] 4268KB 8272KB 52% 373 182 12 0 89 7 31 38
[03/Jun/1998:14:56:19 PDT] 4606KB 8272KB 56% 373 182 12 0 100 6 41 47
[03/Jun/1998:14:57:19 PDT] 3790KB 8272KB 46% 375 183 12 0 114 7 44 51
[03/Jun/1998:14:58:19 PDT] 4090KB 8272KB 49% 377 184 12 0 115 6 45 51
[03/Jun/1998:14:59:19 PDT] 4439KB 8272KB 54% 379 185 12 0 120 6 36 42
[03/Jun/1998:15:00:19 PDT] 4815KB 8272KB 58% 383 187 12 0 128 7 36 43
[03/Jun/1998:15:01:19 PDT] 4033KB 8272KB 49% 379 185 12 0 130 8 31 39
[03/Jun/1998:15:02:19 PDT] 4414KB 8272KB 53% 383 187 12 0 134 8 41 49
[03/Jun/1998:15:03:19 PDT] 4758KB 8272KB 58% 389 190 12 0 142 6 38 44

t alias

does the same thing as the previous alias command, but continues to print the status lines as they are available in the status.log file.


PreviousNextUpFAQ Check HTML Table of Contents