ClassQue Server Configuration


Overview

This documents describes how to set up the ClassQue server.
You will need a copy of the classqueserver.jar file.

General Configuration Information
The configuration information can be supplied to the classqueserver program either as command-line parameters or as information in a configuration file. A command line option consists of a token possibly followed by a parameter. The configuration file contains one option per line, each with a token indicating the option and a possible parameter.
The following table lists the the available options. The table shows the File Token, the one used in a configuration file. Command-line tokens are the same, except that they are always preceeded by a hyphen. For example, the command line parameter to set the port number to 12345 would be -port 12345. Tokens on the command line not matching one of the tokens given are interpreted as names of configuration files. Command-line parameters that contain blanks must be surrounded by double quotes.
OptionFile TokenParameterParameter Description
Portportinteger An integer giving the port number that the student uses for communication with the ClassQue server. Teachers will use the next consecutive port number.
Durationdurationinteger If this option is present, the integer represents the number of minutes for the server to run. The server will shut down after this time period. Otherwise, the server will not terminate on ots own.
Configuration Log Prefixlognamestring A string which is the start the the names of the log files produced by the server. This will usually designate the name (and section number) of the course. The string should not contain any spaces or underbars.
Teacher Passwordpasswordstring The teacher password. It is not recommended that this password be given on the command line since it should be kept private.
Assistant Passwordassistantpassword string The assistant password. It is not recommended that this password be given on the command line since it should be kept private.
Server Namenamestring This is ignored by the server, but when used on the command line, allows the adeministrator to distinguish different copies of the running server. For example, on a Linux system, executing the command:
ps -ef | grep classqueserver
will show all copies of the server and allow for selective cancelation. Otherwise, it would be difficult to know which copy of the server corresponds to a given course.
Course Namecourse string The course name. This is used for the heading in the reports.
Course Start Timestart string The course start time in 24-hour format, e.g. 14:30 for 2:30 PM. This is used by the reports to determine whether students are late for class.
Report Configuration Filereportconfig string The name of the normal report configuration file. This only needs to be given if the teacher is to be able to change this file and the name is not the default name.
Next Report Configuration Filereportconfignext string The name of the report configuration file to be used once. This only needs to be given if the teacher is to be able to change this file and the name is not the default name.
If a given configuration option appears more than once, the last one processed is the one used. First, ClassQue will first look for configuration files named cqserverconfig.txt and cqserverconfig1.txt in this order in the directory in which the program was started, processing each one if it is found. Next, the command-line parameters from the above table are processed, in the order in which they appear on the command line. Finally, any other command-line parameters are interpreted as configuration files and these will be processed in the order given.

Starting the Server

The server is meant to run for the duration of a class and then terminate. The server is responsible for creating log files that are used for resuming a session or generating reports.

The usual way to set up the server is to designate a directory for each course using classque. The directory will contain two subdirectories, logs and run. The logs directory should have three subdirectories, output, processed, and students. The run directory should have an errors subdirectory and contain the files needed to run and configure the server and reports.

Below is a copy of the directory and file structure you need to create, starting with the base directory of a course, assumed to be /home/classque/cs3733
/home/classque/cs3733
   logs
      output
      processed
      students
   run
      errors

The run subdirectory

The examples below are for the course cs3733 and it is assumed that the classque information for this course is at /home/classque/cs3733. This should be replaced by the directory you will use for the actual course. This directory is used for running the server and the report creator for one course. Here is a possible runserver script for starting the server:
#!/bin/sh
cd /home/classque/cs3733/run
DATE=`/bin/date +"%Y_%m_%d_%H_%M_%S"`
FN=errors/mylog_$DATE
umask 077
java -jar classqueserver.jar -name cs3733 > $FN 2>&1 &
This script creates a log file in the errors directory. The log file name contains the date and time so it should be unique each time the server is run. The directory /home/classque/cs3733 is the parent of the run directory for this course. The cd command ensures that the rest of the script in run from the correct directory and allows the script to be called by cron. A cron entry for starting the server might look like this:
15 9 * * 2,4 /home/classque/cs3733/run/runserver
This starts the server every Tuesday and Thursday at 9:15 am, in prepartation for a 9:30 class. If the class is 75 minutes long, the server duration should be set to at least 100, since the server starts 15 minutes before class.

Below is a prototype cqserverconfig.txt file:
port 12790
duration 115
logname cs3733
password abcd1234
assistantpassword asst1234
name cs3733
course CS 3733 Operating Systems
start 9:30
The start time given here is the actual start time of the class and is used to determine when a student is late. If the server starts at 9:15 and the course runs from 9:30 until 10:45 (90 minutes), the duration of 115 allows the server to run until 10 minutes after the class ends.

Return to the ClassQue setup page