Introduction to QM

USER or ADMIN.USER commands or the QMAdmin utility. These names are not necessarily the same as Windows user names. A further prompt will ask for a ...
221KB taille 65 téléchargements 296 vues
QM The Multi-Value Database for PC Based Applications

System Administration

System Administration

System Administration System Administration ........................................................................................................ 3 Installation ........................................................................................................................... 3 Configuration Parameters ................................................................................................... 8 Opening a QM Session ..................................................................................................... 14 QM Network Servers (Windows only) ............................................................................... 15 Terminal Definitions .......................................................................................................... 18 The QMSYS Directory....................................................................................................... 23 Printing .............................................................................................................................. 25 Account Management ....................................................................................................... 26 User Management and System Security........................................................................... 27 Monitoring the System ...................................................................................................... 32 Releasing Locks................................................................................................................ 32 Terminating QM Sessions................................................................................................. 32 Managing QM Processes from the Operating System Level............................................. 33 QMNet............................................................................................................................... 34 Error Logging .................................................................................................................... 36 The QMFix Utility............................................................................................................... 37 The QMAdmin Utility ......................................................................................................... 38 Backup and Restore.......................................................................................................... 44

2

System Administration

System Administration The System Administrator is usually responsible for initial setup and day to day maintenance tasks required to keep a database system running. QM requires very little maintenance and the administrator role does not require the in depth technical knowledge that is needed on some other systems. This manual describes the tasks that are usually the System Administrator's responsibility.

Installation When you purchase a QM licence you are free to download and install new versions as often as you wish during the free upgrade period (at least one year but this period can be extended). After this period expires, there will be a charge for upgrades. Because new versions are released very frequently in response to requests for new features, most users prefer to download the latest version of the QM self-extracting archive from the OpenQM website (www.openqm.com) rather than receive the software on CD which will almost certainly be out of date by the time it is delivered. You will probably not want to install every revision that is released. The web site includes a What's new in recent releases page that can be used to help decide when an upgrade is desirable. To download the software, follow the link to the download page and select the appropriate version for your platform. Right click on the Download link and select Save as to copy the install file to your system. If you need to move the file from the system on which it is downloaded to a different system for installation, be sure to use a binary mode copy tool.

The installation process is exactly the same for a new installation and for an upgrade. The following sections describe the process for each platform.

3

System Administration

Installation on Windows The downloaded self-extracting install file has a name of the form qm_2-1-12.exe, where the numeric components identify the release. Execute this file. The first screen confirms that you are about to install QM. Click on the Next button to continue. The install process now displays the software licence. Tick the box to say that you accept the terms of this licence and click on the Next button. QM can be installed in any convenient location. The default is C:\QMSYS but this can be changed. An upgrade installation will offer the directory used for the previous installation as the default. Having selected the installation directory, you will be asked to specify the program group folder name in the Start menu. This defaults to QM and is probably best left unchanged. The final step before installation commences is to select the components to be installed. The components offered are: QM Database

The QM database itself

QMTerm

A simple terminal emulator

QM Online Documentation

Adobe Acrobat style pdf documentation

QMAdmin

A Windows based system administration tool

QMClient

The Visual Basic API software for Windows developers

After the main installation has been performed, the install process displays a screen in which the licence data can be entered. This is discussed in more detail later. If this is an upgrade installation, you will be asked if the VOC file should be updated in all accounts. Although this is probably a good idea, users will be asked about upgrading when they enter QM if it is left until later. The installation process then runs the QM Configuration Editor to allow changes to be made to configuration parameters. These are described in a later section. Finally, the installer offers to show the readme file. The installation process does not add QM to the Windows PATH environment variable. Depending on how you plan to operate your system it may be worth adding the bin subdirectory of the QMSYS account to the PATH variable.

4

System Administration

Installation on Linux or FreeBSD The downloaded self-extracting install file has a name of the form qm_2-1-12 for Linux or qmf_2-1-12 for FreeBSD, where the numeric components identify the release. Execute this file. The installer confirms that you are about to install QM. Note that any existing installation of QM must have been shut down before installation of a new version. The compressed install file is unpacked and the software licence is displayed. You must confirm that you agree with this licence to continue. QM can be installed in any convenient location. The default is /usr/qmsys but this can be changed. An upgrade installation will offer the directory used for the previous installation as the default. After the main installation has been performed, the install process displays a screen in which the licence data can be entered. This is discussed in more detail later. If this is an upgrade installation, you will be asked if the VOC file should be updated in all accounts. Although this is probably a good idea, users will be asked about upgrading when they enter QM if it is left until later. Finally, you will be asked whether the operating system network service should be restarted. This is necessary after a new installation before QM can be accessed from network connections. It should not normally be needed after an upgrade installation. The installation process does not add QM to the operating system PATH environment variable. Depending on how you plan to operate your system it may be worth adding the bin subdirectory of the QMSYS account to the PATH variable.

5

System Administration

Licensing QM will request licence data entry as part of the installation process described above. A new licence can also be applied at any time by use of the UPDATE.LICENCE command in the QMSYS account or from the command prompt by executing QM with the -L option (case insensitive).

You need to enter the details in the boxes surrounded by square brackets as given on your licence paperwork. •

Licence number

The unique 10 digit number identifying this licence.



Max users

The maximum number of concurrent processes including Windows GUI processes such as QMAdmin and QMClient.



Expiry date

The last date on which this licence is valid.



Authorisation code

A case insensitive sequence required to validate your licence details.



Security number

A number required to further validate your licence details.



Site text

This must be entered exactly as on your licence form.

The system id is used to tie a licence to a specific machine. The normal licensing procedure starts with a short term licence that will install on any system. During the life of this licence, you should supply the system id to your dealer who will then send you the final permanent licence. If you move the QM software to a new system, you will need to arrange with your dealer to receive a new licence. When installing a new release of QM over an existing version, the previous licence details are displayed as the defaults. To preserve these either press the return key in each field in turn or use ctrl-X to exit from the screen. 6

System Administration

Startup and Shutdown of QM (Linux and FreeBSD only) QM maintains some persistent data in shared memory that is accessed by all QM users. On a Windows system, this shared memory is discarded when the last QM user logs out and will be reloaded automatically when the next user enters QM. On other platforms, the QM shared memory must be explicitly loaded or discarded. The installation process will add system startup and shutdown scripts to start QM when the system is booted and to take it down gracefully when the system is shutdown. QM may be started, stopped or restarted at any time by typing: /etc/rc.d/init.d/qm start

or

qm -start

/etc/rc.d/init.d/qm stop

or

qm -stop

/etc/rc.d/init.d/qm restart

or

qm -restart

On FreeBSD, use qm -start qm -stop qm -restart

Deinstallation Should it be necessary to uninstall the QM database, the following steps are required:

Windows Execute the QM Uninstaller from the QM program group.

Linux or FreeBSD 1. Login with superuser rights and type "qm -stop". 2. Run the uninstall program in the qmsys/bin directory.

7

System Administration

Configuration Parameters QM has a number of system wide configuration parameters that control its operation. On Linux systems, the parameters are in a file named qmconfig in the /etc directory and can be edited using any suitable text editor. On Windows, the parameters are in a file named qm.ini in the Windows directory and, although any suitable text editor can be used, they should be amended using the configuration editor which can be entered from the QM program group.

The left hand pane of this window displays the configuration sections available for amendment. The content will depend on which components of QM have been installed. Selecting a section by clicking on its name displays the available parameters in the right hand pane. To amend a parameter, click on its entry in the right hand pane. The current value is displayed in the Value field. For most parameters a text explanation is displayed above the value. Enter the new parameter value and click on the Set new value button. Many parameters include validation checks that the value entered is acceptable. As soon as a change has been entered, the Close button caption changes to Cancel. Once all changes have been made, click on the Save changes button to save the configuration data. To abort the update, click on the Close/Close button.

There are some optional parameters that may be added to the configuration file using the Add button or subsequently deleted using the Delete button. These should only be used as directed by Ladybridge Systems or as described in the user documentation or release notes. The Add button displays a box into which the new parameter name should be entered. The value should then be entered into the Value field in the usual way.

8

System Administration

The Delete button, which is only enabled for certain parameters, deletes the currently selected parameter. The standard configuration parameters are shown below. Parameters marked with an asterisk can be modified for an individual process using the CONFIG command. QM

DEADLOCK

* DUMPDIR

ERRLOG

* FILERULE

If set to 1, QM aborts any program that attempts to wait for a lock that would result in a deadlock situation. The default value (0) allows deadlocks to occur. The pathname of the directory to receive process dump files. If this parameter is null, the QMSYS directory is used. On some systems, users may not have write access to this directory. DUMPDIR may be specified as a full pathname or relative to the account directory. Sets the maximum size in kilobytes of the error log maintained in the errlog file in the QMSYS account directory. If set to zero, error logging is disabled. Sets rules for special filename syntax usage. This value is formed by adding together the following options as required: 1 Allow account:file 2 Allow server:account:file 4 Allow PATH:pathname The CONFIG command can be used to modify this value within an individual process but only to remove options. Thus, the setting of this parameter in the configuration file represents the most powerful set of filename option rules that can be used.

* FLTDIFF

The FLTDIFF configuration parameter determines how floating point values are compared. Just as some numbers such as one third cannot be represented accurately in decimal, there are numbers that cannot be represented accurately in the binary notation used in computer systems. Often, numbers that are accurate in one number base, are inaccurate in the other. The inaccuracy is extremely small, typically at about the fourteenth decimal place. A program that tests a floating point value for equality with some other value must allow for this inaccuracy rather than enforcing a strict equality. The FLTDIFF parameter determines how close two values must be to be considered as equal. The default value, 2.91E-11, is an industry standard but this can be set to any positive value less than one. The format of the data in the parameter setting may be either a simple number (0.0000000000291) or a number with an exponent (2.91E-11).

* FSYNC

Setting this parameter to 1 causes QM to perform an fsync() operation to flush data to disk every time that a file's header is updated. This corresponds to all structural changes within the file (overflow, split, merge, etc) and on closing the file. This can have a severe effect on performance but gives greater resilience to system failures.

9

System Administration

* GDI

Setting this parameter non-zero on Windows systems causes the SETPTR command to use GDI mode by default.

* GRPSIZE

Determines the default group size used when creating a dynamic file. This parameter must be in the range 1 - 8 and defaults to 1. For best performance, it should be a multiple of the operating system disk block size.

LICENCE

Licence parameters. Do not change.

* LPTRHIGH

Determines the default number of lines per page when a print unit is first referenced. This must be in the range 1 to 32767 and may be overridden using the SETPTR command or equivalent QMBasic print unit modification functions.

* LPTRWIDE

Determines the default number of characters per line when a print unit is first referenced. This must be in the range 1 to 1000 and may be overridden using the SETPTR command or equivalent QMBasic print unit modification functions.

MAXIDLEN

Sets the maximum allowed length of a record id. This must be in the range 63 to 255 and defaults to 63. Increasing this value has a significant effect on the size of the internal lock tables. It is therefore recommended that the value used should be consistent with the needs of the application. QM tracks the length of the longest id ever written to a file. Attempting to access a file where this exceeds the value of the MAXIDLEN parameter will cause the operation to fail. The QMFix utility will correct the recorded longest id value if records have been deleted from the file.

* MUSTLOCK

NETFILES

Setting this parameter to 1 enforces use of locks when writing or deleting records. If a program attempts to write or delete a record when it does not own a record update (READU) lock on the record or a file lock on the file being updated, the program will abort with error ER$NOLOCK. The ON ERROR clause can be used to trap this error. Leaving the parameter at its default value of 0 allows writes or deletes when no lock is in place. By default QM does not allow access to files on remote drives. This is because the locking system cannot detect that two systems are accessing the file simultaneously. Where it is certain that a file will never be opened from two systems concurrently, setting this parameter to 1 will enable access to remote files. Incorrect use of this feature can result in corrupt data files. Setting NETFILES to 2 enables incoming connections from other QM servers accessing files via the QMNet interface. These two mode settings are additive and can be used together.

NUMFILES

The maximum number of QM data files that may be opened at one time. This is a system wide limit. Use of the same file by multiple users counts as one file.

NUMLOCKS

The maximum number of record locks that can be held at one time as a system wide limit.

* OBJECTS

The maximum number of object programs which may be loaded into memory before discard is attempted. A program is a candidate to

10

System Administration

be discarded when it is not part of the call stack and it is not referenced from any subroutine variables from indirect calls. Setting this parameter to zero implies no limit on the number of concurrently loaded programs. * OBJMEM

PORTMAP

The maximum size of all loaded object programs in Kb before discard is attempted. Setting this parameter to zero implies no limit on the size of concurrently loaded programs. Allows users to create a fixed mapping between tcp/ip port numbers and QM user numbers. The format of this parameter is PORTMAP=p,u,n where p is the lowest port number to be mapped, u is the lowest corresponding user number n is the number of ports to be mapped. The highest available QM user number is 1023. Therefore, the value of u + n must not exceed 1024. Use of PORTMAP does not prevent users entering QM via the normal shared port defined by the QMSRVR PORT configuration parameter. Note that this parameter appears in the QM section of the configuration file as it relates to both QM and QMSvc. This feature is provided for compatibility with other environments in applications that rely on a fixed port number to user number relationship to recognise users. It is recommended that user login names should be used for this purpose in new applications as this gives a more secure system. This feature is not supported on Windows 95, 98 or ME. On a Linux system, it will be necessary to create corresponding files in the /etc/xinetd.d directory for each port to be monitored. The format of these is service qmsrvr { id = qmsrvr4001 port = 4001 bind = 0.0.0.0 type = UNLISTED protocol = tcp flags = REUSE socket_type = stream wait = no user = root server = /usr/qmsys/bin/qm server_args = -n log_on_failure += USERID disable = no } where the value 4001 in the above example is replaced by the port number.

11

System Administration

QMCLIENT

Provides additional security control for QMClient sessions. This parameter has one of three values: 0 No restrictions. 1 Bans use of QMOpen() and QMExecute(), limiting clients to calling subroutines. 2 In addition to the level 1 restrictions, QMCall can only be used to call subroutines compiled with the $QMCALL compiler directive. This parameter can be modified to a higher level in an individual process using the CONFIG command but cannot be taken to a lower level in this way.

QMSYS

Identifies the location of the QMSYS account directory. If the QMSYS directory is moved for any reason, change this parameter to point to the new location and the system should operate with no other changes.

* RECCACHE

Sets the size of the record cache (default zero, maximum 32). When a QM process reads a record, a copy of this record is retained in the cache. A subsequent read for the same record can find it from the cache rather than requiring an operating system call. The cache mechanism is most likely to benefit an application that makes heavy use of the TRANS() function to read the same record many times during a long query, for example when looking up a tax rate that is applied to every record processed.

* RINGWAIT

QM uses a ring buffer to hold type-ahead characters received from the keyboard. If this becomes full, incoming data is thrown away and a bell character is sent back to the terminal. Some applications may need to send a large burst of data which would fill the ring buffer and hence be truncated. Setting the RINGWAIT parameter to 1 causes QM to wait for space to become available in the buffer rather than rejecting input. Enabling this feature could result in the inability to use the break key if the ring buffer is full. The AccuTerm terminal emulator requires this parameter to be set to 1. (This parameter currently only affects the Windows version of QM).

* SAFEDIR

Setting this parameter to 1 causes QM to adopt a careful update process when writing records to directory files. The new record is written to a temporary file, the old record is deleted (if it exists) and the temporary item is renamed to replace it. This mechanism results in reduced performance but ensures that the original data is not lost if the write fails because, for example, there is insufficient disk space available.

* SORTMEM

The size in kilobytes at which a sort switches from memory based to disk based. The default value is 1024 (1Mb). Setting values lower than this may lead to poorer performance unless you are severely restricted by memory size. Setting values larger than this will require more memory for large sorts.

* SORTMRG

A disk based sort produces a series of intermediate files that must be merged to produce the final result. The SORTMRG parameter specifies the number of files merged in each pass. This must be in the range 2 to 10 and defaults to 4. The effect of changes to this parameter on sort times is dependant on the relative performance of

12

System Administration

the disk and processor. * SORTWORK

The pathname of the directory to hold temporary sort workfiles. These are automatically deleted on normal completion of a sort. If this parameter is null, the QMSYS directory is used. This is not recommended as it is more difficult to construct an automated process to delete temporary files that have been left by an abnormal termination of a sort.

* TERMINFO

The pathname of the directory holding the terminfo database. This defaults to a subdirectory named terminfo under the QMSYS directory.

* YEARBASE

The earliest year in the 100 year range of dates entered with two digit year numbers. This parameter is optional and defaults to 1930.

QMADMIN

HOST

IP address (or name) and port number of connection.

QMSRVR

PORT

The port for incoming client telnet connections. Leave blank to use the default port (4242). If QM is the only telnet style service used on the host system, it may be useful to set this to 23, the standard port used by telnet software. Setting this port to zero disables incoming telnet client connections. See also the PORTMAP QM configuration parameter described above.

QMCLIENT

The port for incoming QMClient telnet connections. Leave blank to use the default port (4243). Setting this port to zero disables incoming QMClient connections.

QMTERM

RETRIES

The maximum number of attempts allowed for entry of a valid username and password on QMSvc connections. This parameter defaults to 3.

TIMEOUT

The maximum wait period in seconds allowed during entry of a valid username and password on QMSvc connections. This parameter defaults to 30.

ADDR

IP address (or host name) and port number of connection.

Note: The QMSRVR parameters are used by the QMServer process on Windows 95 and 98, and by the QMSvc service on Windows NT, 2000 and XP. These parameters are not relevant to Linux installations.

13

System Administration

Opening a QM Session Users can open QM sessions in several different ways as described in the following sections.

Using QMConsole (Windows) QMConsole is the preferred method of accessing the QM database from the server system on Windows installations as it involves no inter-process communication and gives, therefore, the best performance. To invoke QMConsole, simply select its entry from the QM program group. QMConsole will ask for a valid account name to be entered. Alternatively, executing the QM.EXE item of the QMSYS account BIN subdirectory within a DOS command window will start QM in the current directory. If this directory is not already configured as a QM account, you will be prompted to confirm that this is to be done. QMConsole processes run with their QM user name set to the Windows login name and always have QM administrator rights. The window size defaults to 25 lines by 80 characters but can be changed using the TERM command or the LINES and COLUMNS environment variables. Use of the TERM command to define a new window size will automatically adjust the displayed window as well as updating internal display handling information.

Using QM from the Linux or FreeBSD Command Prompt Users who log into a Linux or FreeBSD system over a telnet connection or directly from the server can enter QM simply by typing "qm" at the command prompt. The user will run with the login name and permissions of the Linux or FreeBSD user.

Direct Connection to QM Using a Terminal Emulator Most terminal emulators can be used with QM. Ladybridge Systems recommend the AccuTerm product from AccuSoft as this has advanced file transfer and GUI application features that include support for the QM database. AccuTerm also includes support for special terminal functions required for the full screen mode of the QMBasic debugger. An AccuTerm licence is bundled with the QM licence. In addition to entering QM from the operating system command prompt, QM can be set up to listen for direct incoming connections. By default, QM listens on tcp/ip port 4242. This can be changed on Windows by modifying the QMSRVR PORT configuration parameter or on Linux or FreeBSD by editing the /etc/services file.

14

System Administration

QM Network Servers (Windows only) On Windows systems, it is necessary to start a network server process before users can connect directly to QM over a network.

Using QMSvc (Windows NT, 2000 and XP) QMSvc is a Windows service that listens for incoming network connections to a QM server system and routes them to the appropriate software component. It must be running to connect to QM using a terminal emulator such as AccuTerm or QMTerm, or to establish connections using the QMClient interface (including use of QMAdmin or QMNet) The QM installation process sets up QMSvc so that it is started automatically each time the system is booted. The service can be stopped or started if required using the Windows control panel or, more conveniently, using the QM Network Control program from the QM program group. By using a Windows service, QM is able to implement full security checking based on the user's login name and password, and to run their processes with the access rights appropriate to that user. The server normally listens for incoming connections on ports 4242 (terminal users) and 4243 (QMClient). If necessary to avoid conflicts with other software, this can be amended by changing the QMSRVR PORT and QMCLIENT parameters using the QM configuration editor. If QM is the only telnet software being used on the system, it may be appropriate to used port 23, the standard telnet port.

Using QMServer (Windows 95, 98 and ME) QMServer is a process that listens for incoming network connections to a QM server system and routes them to the appropriate software component. It must be running to connect to QM using a terminal emulator such as AccuTerm or QMTerm, or to establish connections using the QMClient interface (including use of QMAdmin or QMNet) To start QMServer, select the QM Network Control option from the QM program group and click on Start. The startup process can be automated by adding a shortcut to your Startup folder to run c:\qmsys\bin\qmsrvr.exe (You will need to modify this pathname if you chose a different location for the QMSYS account). It is recommended that you select the option to run this as a minimised window. Due to a published defect in Windows 95, 98 and ME, the server is unable to trap system shut down requests and it will be necessary to close it manually using the Stop option of the QM Network Control program, or by pressing the break key in the QMServer window, or by responding to the confirmation window displayed as part of the shut down process. The server normally listens for incoming connections on ports 4242 (terminal users) and 4243 (QMClient). If necessary to avoid conflicts with other software, this can be amended by changing the QMSRVR PORT or QMCLIENT parameters using the QM configuration editor. If QM is the only telnet software being used on the system, it may be appropriate to used port 23, the standard telnet port.

15

System Administration

Mapped ports Some applications require QM to listen for incoming telnet connections on multiple tcp/ip ports and to create the QM process with a user number based on the incoming port number. This feature can be enabled by use of the PORTMAP configuration parameter as described earlier. Note that this feature is not available on Windows 95, 98 or ME.

QMTerm (Windows clients) QMTerm is QM's own simple terminal emulator. It includes support for features specific to QM but lacks the advanced features found in some other emulators. Selecting QMTerm from the QM program group displays a screen prompting for entry of a host system address. Where QMTerm has been used previously, the prompt includes a list of recently accessed systems. The server can be selected in any of the following ways: •

Enter the number against the desired system from the recently used host list. Simply press return to select the most recent connection, displayed as list entry 1.



Enter an IP address, optionally followed by a port number. The port number defaults to 4242 if omitted and only needs to be included if the server has been configured to accept connections on a different port.



Enter a system name, optionally followed by a port number. Again, the port number defaults to 4242.



Enter Q to quit

QMTerm processes run with user name entered during login (see below). Users who are registered as system administrators will have administrator rights. The terminal type should be set to qmterm. The window is initially 25 lines by 80 characters but can be changed using the TERM command. This will automatically adjust the displayed window as well as updating internal display handling information.

16

System Administration

User Authentication (All network connections) Once a network connection has been established, a prompt appears asking for a QM user name. When connecting to a Windows NT/2000/XP, Linux or FreeBSD server, the user name and password must be recognised by the underlying operating system. When connecting to a Windows 95/98/ME server, QM uses its own security system and the user details are set up using the CREATE.USER or ADMIN.USER commands or the QMAdmin utility. These names are not necessarily the same as Windows user names. A further prompt will ask for a password. This is case sensitive and is not echoed back to the screen. At this stage, QM's default case inversion is not active so the password should be entered in the "correct" case. Unless the user has been set up to run in a specific account, a prompt for a valid account name will appear. Account names are not case sensitive.

17

System Administration

Terminal Definitions Control sequences and other characteristics of terminal devices are defined in the terminfo database. This is normally a subdirectory structure under the QMSYS account but can be moved elsewhere if required. The structure of the terminfo database closely mimics that found as a standard component on Linux and other operating systems though QM has some private extensions to the internal library format. The default terminal type is vt100 but this can be modified using the operating system TERM environment variable or by using the TERM command after connection. The initial screen size is determined by the characteristics stored in the terminfo database, usually 24 lines by 80 characters. Use of the TERM command will update QM's internal display handling information but only automatically resizes the display window on QMConsole and QMTerm sessions. The terminal definitions stored in the terminfo database are in a compiled format. Users should not attempt to modify the compiled items directly. QM provides a utility named qmtic which can be found in the bin subdirectory of the QMSYS directory. The qmtic tool can be used to compile new definitions or to decompile existing ones. Although it is possible to store separate source definitions of each terminal type, QM includes a single master source file, terminfo.src, in the QMSYS directory. This will be replaced and recompiled whenever a new version of QM is installed. To simplify maintenance of a private set of new or modified terminal definitions, the QM installation process will look for a file named terminfo.mods in the QMSYS account directory and, if it exists, will compile it after the standard source.

The format of the qmtic command to compile terminfo data is: qmtic {options} src... where src...

is a list of one or more source files to be processed.

options

are any of the following: -ppath

Use the terminfo database at the specified path.

-tname

Compile only the specified terminal definition. This option may be repeated to compile several definitions.

-v

Verbose mode. Displays progress information.

-x

Do not overwrite existing entries. Only definitions for terminals not already in the database will be written.

18

System Administration

The format of the qmtic command to decompile terminfo data is: qmtic {options} -d name... where name...

is a list of one or more terminal names to be processed.

options

are any of the following: -ppath

Use the terminfo database at the specified path.

-v

Verbose mode. Displays progress information.

Replacing the -d option with -dall will decompile all terminfo entries to produce a new master source file.

The format of the qmtic command to display an index of terminal types is: qmtic {options} -i

Linux users wishing to transfer entries from the standard Linux terminfo database to the QM terminfo database should use the Linux infocmp tool to decompile the Linux definition and then recompile it using qmtic, removing any entries that are not supported on QM.

The Terminfo Database The terminfo database is normally in a directory named terminfo under the QMSYS account. The TERMINFO configuration parameter can be used to move the database elsewhere. The terminfo directory contains a set of subdirectories named using the first character of the terminal types stored within them. Each of these directories then contains a file for each terminal type. Thus, for example, the definition for a vt100 terminal on a Windows system with the default QMSYS location would be found in c:\qmsys\terminfo\v\vt100. The definition files are stored in an encoded form that closely reflects the way in which QM uses the data internally. QM provides a utility, qmtic, to compile or decompile terminfo entries. A master source for a variety of terminals is in the QMSYS account directory as terminfo.src and the entire set of terminal definitions is compiled when QM is installed. To simplify maintenance of a private set of new or modified terminal definitions, the QM installation process will look for a file named terminfo.mods in the QMSYS account directory and, if it exists, will compile it after the standard source.

Source Format Terminfo entries contain three types of item; booleans, numbers and strings. A boolean item is present in the terminfo entry if the feature or capability that it represents is supported by the terminal. QM currently does not make use of any of the boolean items.

19

System Administration

A number entry holds the value of a numeric parameter. For example, the cols item defines the normal number of columns per line. A string item holds a control string. These may be codes to be sent to the terminal to perform a specific task such as clearing the screen or moving the cursor, or may be a code sent by the terminal when a specific key is pressed by the user. Strings representing commands sent to the terminal device often include parameterised information such as screen positions or counts. A terminfo source file consists of one or more terminal definitions separated by at least one blank line. Lines commencing with a hash character (#) are comments and are totally ignored during compilation. Each definition consists of a number of comma separated items. A definition can be split over multiple lines by inserting a newline after a comma. The first line of each entry contains a list of terminal types defined by that entry and a text description. For example: vt100|vt100-am|dec vt100 (w/advanced video), This line is separated into a number of fields using the vertical bar (|) character. The last field is the text description. All preceding fields are terminal device names. Thus, the entry introduced by the line shown above defines the vt100 and vt100-am terminal types. There will be separate compiled files for each of these terminals in the final terminfo database. The remaining lines of the entry define the characteristics of the device. Although the order is not fixed, terminfo entries normally have the booleans first, followed by the numbers, followed by the strings. A boolean entry consists only of its name. A number consists of the name, a hash character, and the value of the parameter. A string consists of the name, an equals character (=), and the value of the parameter. For example, the first few lines of the vt100 definition are: vt100|vt100-am|dec vt100 (w/advanced video), am, xenl, msgr, xon, cols#80, it#8, lines#24, vt#3, bel=^G, cr=\r, csr=\E[%i%p1%d;%p2%dr, tbc=\E[3g, clear=\E[H\E[J$, el=\E[K$, ed=\E[J$, cup=\E[%i%p1%d;%p2%dH$, cud1=\n, home=\E[H, String tokens may contain the following special character sequences: \b Backspace (char 8) \e Escape (char 27) \f Formfeed (char 12) \l Linefeed (char 10) \n Linefeed (char 10) \r Carriage return (char 13) \s Space (char 32) \t Tab (char 9) \^ Caret (^) \\ Backslash (\) \x Ctrl-x (chars 0 - 31) %x Parameter action as described below %% Percent sign (%) $ Insert an n millisecond delay. This code is ignored by QM, removing it from the final string.

20

System Administration

The %x parameter notation performs run time manipulation of the character string, often inserting parameter values. These operations use a stack for intermediate results and are described in terms of their C programming language equivalents: %c pop top stack item and print it as a character (like %c in printf()) %d pop top stack item and print it as an integer (like %d in printf()) %s pop top stack item and print it as a string (like %s in printf()) %[[:]flags][width[.precision]][doxXs] as in printf, flags are [-+#] and space. The ':' is used to avoid making %+ or %patterns (see below). %p[1-9] push ith parm %P[a-z] set dynamic variable [a-z] from top stack item %g[a-z] get dynamic variable [a-z] and push it onto stack %P[A-Z] set static variable [A-Z] from top stack item %g[A-Z] get static variable [A-Z] and push it onto stack %l replace topmost stack item with its string length %'c' push char constant c %{nn} push integer constant nn %+ replace top two stack items with their sum %replace top two stack items with their difference %* replace top two stack items with their product %/ replace top two stack items with their quotient %m replace top two stack items with the remainder from division %& replace top two stack items with their logical AND %| replace top two stack items with their logical OR %^ replace top two stack items with their logical exclusive OR %= replace top two stack items with the result of an equality test %> replace top two stack items with the result of a greater than test %< replace top two stack items with the result of a less than test %A %O logical and & or operations for conditionals %! replace top stack item with its logical inverse %~ replace top stack item with its bitwise inverse %i add 1 to first two parms (for ANSI terminals) %? expr %t thenpart %e elsepart %; if-then-else, %e elsepart is optional. For those of the above operators which are binary and not commutative, the stack works in the usual way, with %gx %gy %m resulting in x mod y, not the reverse.

For example, the QMBasic @(col,row) function translates to the cup (cursor position) terminfo entry. For the vt100 definition shown above this is cup=\E[%i%p1%d;%p2%dH$ Taking this apart, element by element for a usage as @(10,5): \E Escape character [ [ character %i Increment both arguments to allow for positions numbered from 1 rather than 0. The argument values 10 and 5 thus become 11 and 6. %p1 Push parameter 1 (11) onto the stack %d Print top item from stack as an integer ; ; character 21

System Administration

%p2 %d H $

Push parameter 2 (6) onto the stack Print top item from stack as an integer H character Delay - Ignored by QM.

The end result is thus "Esc[11;6H".

User Definable Entries The terminfo database includes 10 entries (u0 to u9) for user use. QM pre-defines the function of two of these, the remaining eight are available for any purpose that the user wishes. u0 - u7

@(-100) to @(-107)

Undefined. Users may adopt these for any purpose.

u8

@(-108)

IT$ACMD Asynchronous command execution prefix. This code prefixes a command to be executed on the client system followed by a newline. The QM session is not suspended while the command is executed.

u9

@(-109)

IT$SCMD Synchronous command execution prefix. This code prefixes a command to be executed on the client system followed by a newline. The QM session is suspended while the command is executed.

The u8 code is used internally by some parts of QM. The remaining codes will only be used as defined in user written application software.

AccuTerm Extensions The AccuTerm terminal emulator includes support for additional special functions that are not part of the standard terminal definitions for industry standard terminal types. These extra functions include •

Client side command execution (synchronous and asynchronous)



Screen region save and restore (used by the QMBasic debugger)



Mouse click detection

QM ships with extended definitions for the vt100 and vt420 under special terminal type names vt100-at and vt420-at. Users can easily add similar extensions to other terminal definitions.

22

System Administration

The QMSYS Directory The QMSYS directory, which may have a different name as specified during installation, contains all of the installed QM software components except for the QMCLIENT.DLL dynamic link library placed in the Windows directory as part of the QMClient installation. On a system with the QM database server software installed, QMSYS is a QM account. It differs from other user defined accounts in that it includes some extra commands, some of which are only available to users running with administrator rights. The QMSYS directory may contain the following items: $HOLD

The $HOLD file of this account. This is no different from the equivalent file in other accounts. There is a corresponding dictionary named $HOLD.DIC.

$IPC

A system file used for inter-process communication within QM. This file should not be accessed directly by users.

$LOGINS

Contains information about registered user names. This file cannot be accessed directly by users.

$MAP

File set up by the MAP command as a map of the system catalogue. Visible from all accounts under the name $MAP. There is a corresponding dictionary named $MAP.DIC.

$SCREENS

Screen definition file visible from all accounts under the name $SCREENS. Initially this contains system defined screens with names commencing with a dollar sign. Users may add other screen definitions that are to be shared between accounts.

$SVLISTS

The $SAVEDLISTS file of the QMSYS account.

ACCOUNTS

The central register of account names, visible from the QMSYS account under the name ACCOUNTS and from all accounts as QM.ACCOUNTS. There is a corresponding dictionary named ACCOUNTS.DIC.

bin

Contains the executable files for all installed software components. It may be useful to add this directory to the PATH environment variable.

cat

The local catalogue of the QMSYS account, usually not used.

DICT.DIC

The dictionary that describes dictionaries, visible from all accounts under the name DICT.DICT.

DIR_DICT

The dictionary used for many system created directory files.

DOCS

Contains the user documentation in Adobe Acrobat format. (Windows only)

ERRMSG

Pick style error message texts. Visible from all accounts as ERRMSG. There is also a corresponding dictionary, ERRMSG.DIC.

23

System Administration

gcat

The global catalogue for the system. There is no VOC entry for this file. It should not be accessed directly by users.

MESSAGES

Text of messages output by QM.

NEWVOC

The template VOC file used when creating new accounts or during upgrades. Users may modify this file but it will be overwritten when an upgrade is installed.

prt

Subdirectory to receive temporary files when generating printed output (Linux or FreeBSD only).

QM.VOCLIB

Visible from all accounts under the name QM.VOCLIB, this file is intended for items that might normally be found in the VOC file but are to be shared between accounts.

stacks

Subdirectory to store saved command stacks (if enabled)

SYSCOM

A directory file containing standard include records for QMBasic programs. It also contains the QMCLIENT.BAS module for QMClient applications written in Visual Basic.

terminfo

The terminal definition database described above.

terminfo.src

The master source of all terminal definitions.

VOC

The QMSYS account VOC file. This differs from other accounts in that it contains a number of commands only available in this account. There is a corresponding dictionary named VOC.DIC. The QMSYS VOC file may contain a paragraph named MASTER.LOGIN. If this is present, it is executed for all interactive users and phantom processes (but not QMClient users) when they first enter QM, before the LOGIN paragraph of the target account.

licence.txt

The software licence as a text document.

QM.HLP

The user documentation as a set of help pages. (Windows only)

readme.txt

The release notes for the installed version.

Most of these files/directories can be made read-only for QM application users. Users need write access to the following items: $IPC $LOGINS $MAP gcat (only if performing global cataloguing) prt (Linux and FreeBSD only)

Users should not use the QMSYS account as a convenient place to develop applications, rather specific new accounts should be created for this purpose.

24

System Administration

Printing QM uses the underlying operating system print management system to handle printing. Details of the printers to be used are set by the application's use of the SETPTR command or equivalent QMBasic operations. Although the SETPTR command can be used to modify some job characteristics while the data is being generated, many features of the job are set at the point when the program starts printing and any change will not take effect until the next print job to the same print unit. Users of Linux and FreeBSD systems can omit the remainder of this section. Printing on Windows systems is complicated by the availability of two distinct modes of operation. The Graphical Device Interface (GDI) is a set of Application Program Interface (API) calls that provide support for a wide range of fonts and drawing capabilities. Essentially, a description of each page to be printed is built up as a memory image and the appropriate commands are then sent to the printer to reproduce this image. The GDI is the more versatile interface but the majority of its features are not available to QM applications. The second API, known within QM as the raw interface, bypasses the GDI mechanism. The data emitted by the application is passed directly to the printer driver for transmission to the device. This limits the capabilities of the application to those supported by the printer or added by its driver but is usually totally adequate for QM application software. The choice of interface to use is selected by use of the GDI or RAW options to the SETPTR command. If neither is used, the default is taken from the setting of the GDI configuration parameter or, if this is not present, raw mode is used. Note that QM's use of the term "raw" is not the same as the Windows use of this term within some print drivers. Windows uses it to mean that the Windows printer driver does no transformation of the data and passes it directly to the printer. This can be useful, for example, with applications that generate PostScript text.

25

System Administration

Account Management A typical QM systems will have many accounts, perhaps corresponding to different applications or to different versions of the same application. Accounts are represented by an operating system directory and may include references to resources shared with other accounts. Accounts can be created using the QMAdmin tool described later or by the CREATE.ACCOUNT command. The format of this command is CREATE.ACCOUNT {account.name {pathname}} If the account name or pathname are not included on the command line, a prompt will appear. Account names are limited to 16 characters. Choose a name that reflects the purpose of the account and is easy to remember. You can find the details of existing accounts by listing the QM.ACCOUNTS file. The pathname is the directory in which QM is to place the new account. It will be created if it does not already exist. Although applications can use resources from any directory or disk partition, try to keep as much of the account's data as possible in the account directory. Creation of accounts does not require administrator rights. For more details see the Command Reference Guide. See the Developing QM Applications guide for details of the application specific tasks that may be necessary after creating an account.

Accounts can be deleted using the QMAdmin utility or the DELETE.ACCOUNT command. The format of this command is DELETE.ACCOUNT {account.name} If the account name is not included on the command line, a prompt will appear. Deletion of accounts does not require administrator rights. For more details see the Command Reference Guide.

26

System Administration

User Management and System Security Because QM runs on a variety of environments, some of which do not feature particularly good security systems, QM supports two methods of user authentication. On Windows 95/98/ME, QM supplies its own user name and password checking for network users. This can be disabled if required so that no user name or password is requested on connecting to the system. On Windows NT/2000/XP, Linux and FreeBSD, QM uses the operating system security mechanism. This cannot be disabled and a valid user name and password must be supplied for all network connections. Many of the user name management commands described here are still relevant as they handle the QM aspects of user control.

User name management is handled by four commands, available from all accounts but restricted to users with administrator rights. QMConsole users on Windows and users logging in with user names that are defined as administrators at the operating system level always have administrator rights. Other users can be registered as QM administrators using the commands described below. The user name management commands are: ADMIN.USER

User name administration tool

CREATE.USER

Creates a new user name

DELETE.USER

Deletes a user name

LIST.USERS

Lists all defined user names

Each command is described in the following pages. In addition, Windows 95/98/ME users can change their passwords using the PASSWORD command which is documented in the Command Reference Guide. This command can be used by users with administrator rights to change other users' passwords. The QMAdmin utility provides another way to perform user management. By default on Windows 95/98/ME, all network connections to a QM system require a username and password to be supplied. This security system can be disabled by the System Administrator if a simpler but less secure system is desired. This is achieved using the SECURITY command in the QMSYS account: SECURITY ON

to enable security checks

SECURITY OFF

to disable security checks

SECURITY

to display the current setting

This command can only be executed from a QMConsole session. If security checking is enabled, the SECURITY command can only be used by a user with administrator rights. If disabled, all QMConsole users have access to this command.

27

System Administration

ADMIN.USER The ADMIN.USER command allows management of the register of user names for network connections.

Format ADMIN.USER

The ADMIN.USER command is built around a form filling interface. Initially it displays a request for a new or existing user name. The F2 key will display a pick list of registered users. Entering a blank user name exits from the command. Selection of an existing user displays their details for possible amendment. Entry of a new user name displays an empty form into which the user's details may be entered.

User Administration User name

[JSMITH

Owner details Min password Force account Administrator

[John Smith, Room 14 [ ] [STOCK ] [N]

Last login

] ]

20 Mar 02 17:02

Action (A/F/D/X)

[ ]

The fields in this screen are: Owner details

Unused by QM internally and may be used for any purpose.

Min password

(Windows 95/98/ME only) Minimum acceptable password length. Leave blank to impose no restrictions.

Force account

If set, the user is forced into this account on login. If left blank, they will be asked for an account name after entry of their user name and password.

Administrator

Is this user to have administrator rights?

Last login

Displays the date and time of last login.

Action

Enter A to amend, F to file changes, D to delete this user or X to exit without saving any changes.

28

System Administration

CREATE.USER The CREATE.USER command creates a new user name in the register of users for network security checks.

Format CREATE.USER {username {account}} where username

is the name of the user to be created. User names are case insensitive and may be up to 32 character is length. If omitted, a prompt is displayed for the user name.

account

is the name of the account to be entered when this user logs in. If not specified, an account name prompt will be issued when the user logs in.

The new user will not have administrator rights. See the ADMIN.USER command for a more powerful method of managing user names. On Windows 95 and 98, the new user is created with no password. Either the PASSWORD command should be used to apply a password or the user should be encouraged to set a password on first login. On Windows NT, 2000 and XP, and on Linux, this command does not affect the underlying operating system user name database.

29

System Administration

DELETE.USER The DELETE.USER command deletes a user name from the register of users for network security checks.

Format DELETE.USER {username} where username

is the name of the user to be deleted. If omitted, a prompt is displayed for the user name.

The named user is deleted from the user name register. It is possible to delete a user who is logged in. See the ADMIN.USER command for a more powerful method of managing user names. On Windows NT, 2000 and XP, and on Linux, this command does not affect the underlying operating system user name database.

30

System Administration

LIST.USERS The LIST.USERS command lists users from the register of users for network security checks.

Format LIST.USERS

The LIST.USERS command lists the names of all entries in the user name register. This will include an entry for Console, the pseudo name used for QMConsole connections. The report shows the user name, the login account (if set), the date and time of last login and whether the user has administrator rights.

31

System Administration

Monitoring the System QM provides several tools to aid System Administrators in monitoring the system and locating problems. Each of these commands is described in detail in the Command Reference Guide.

LISTU

Displays a list of users currently logged in to QM

LIST.FILES

Shows the names of all files currently open in the system. This command can also help in determining the optimum value for the NUMFILES configuration parameter.

LIST.LOCKS

Lists process synchronisation (task) locks.

LIST.READU

Lists all active record and file locks. Includes a report of who is waiting for locks.

FSTAT

Shows file system performance related data.

PSTAT

Displays process status information including the command or program being executed.

HSM

More useful for programmers than administrators, the HSM (hot spot monitor) command shows the processing time spent in each module of an application.

Releasing Locks Sometimes a QM process may fail to release a lock. In most cases, QM will tidy up automatically if the program or process terminates but there may be times when it is necessary to release a lock manually. Be careful to consider the implications before releasing a lock. The lock was taken to protect something from simultaneous update. Releasing a lock always carries the risk of data integrity problems. Record, file locks and process synchronisation (task) locks can be released with the UNLOCK command. This command, documented in the Command Reference Guide, can only be executed from the QMSYS account and requires administrator rights.

Terminating QM Sessions A System Administrator can terminate a QM session using the LOGOUT command which is documented in the Command Reference Guide. QM will attempt to tidy up, releasing any resources owned by the terminated process. Note that terminating a process carries the risk of data integrity problems if the termination occurs in the middle of an update that affects multiple files. The Windows Task Manager or the Linux or FreeBSD kill command with signal number 9 (kill -9) should only be used as a last resort if LOGOUT fails to kill the process. QM cannot catch this event and hence cannot free resources assigned to the terminated process. The RECOVER.USERS command can be used to perform a limited automated cleanup after forced termination but there are some resources that it cannot release.

32

System Administration

Managing QM Processes from the Operating System Level The qm command has a three special options that may be of use to System Administrators. qm -k uid Kill process with QM user id uid. qm -k all

Kill all QM processes.

qm -u

List all active QM processes

33

System Administration

QMNet QMNet uses the QMClient interface to provide an extension to the QM file system allowing network access to files on another QM system. Unlike use of NFS or mapped network drives, QMNet provides locking of remote records, ensuring that data integrity can be maintained on distributed data.

Two steps are necessary to use QMNet. Firstly, the server must be defined, mapping the server name to a network address, user name and password. Secondly, the remote file must be defined using a Q-type VOC record.

Defining the Server The remote server is defined using the SET.SERVER command. This can only be executed by users with administrative rights in the QMSYS account. The command is SET.SERVER name address user.name password where name

is the name to be given to the server. This must consist of letters, numbers, periods and hyphens only and will be mapped to uppercase internally.

address

is the IP address or server name of the remote server. If the remote server uses a nonstandard port number for QMClient access, the port number should be included, separated from the IP address by a colon (e.g. 193.118.13.48:4229).

user.name is the login name to be used on the remote system. password

is the password for the specified user.

The remote server must have remote access enabled by setting the NETFILES configuration parameter to 2.

Defining the Remote File Each remote file is defined by an extended form of the Q-type VOC entry where field 4 contains the name of the server. Once the file has been defined, it may be accessed by programs in the same way as a local file. The following restrictions apply to access from QMBasic programs: •

OPENSEQ and related sequential file access operations are not supported.



Access to remote files inside transactions will be non-transactional.



The MARK.MAPPING statement is not supported. Mark mapping always occurs for directory files.



The SETLEFT, SETRIGHT, SELECTLEFT and SELECTRIGHT index processing operations are not supported.



The FILEINFO function will return the file type as FL$TYPE.NET (6). Many other modes of FILEINFO() are not supported.



A maximum of 10 servers may be accessed at one time. There is no practical limit to the number of files that may be open on each server.

34

System Administration

Listing Server Definitions A list of all defined QMNet servers can be displayed using the LIST.SERVERS command. This can only be executed by users with administrative rights in the QMSYS account. The command is LIST.SERVERS

Deleting a Server Definition The definition for a remote server may be deleted using the DELETE.SERVER command. This can only be executed by users with administrative rights in the QMSYS account. The command is DELETE.SERVER name where name

is the name of the server.

35

System Administration

Error Logging QM includes an error logging system that records brief details of errors that may require investigation by system administrators or application developers. These include: •

Run time program errors (e.g. unassigned variables)



User authentication errors (failed logins)



Forced logout



Internal file system errors.

The error log is maintained in a text file named errlog in the QMSYS directory. Although it can be written directly by programs using the sequential file processing statements, this should be avoided as the buffering used by these statements may result in lost messages. Application developers should use the QMBasic LOGMSG statement if they wish to add their own messages to the log file. To avoid faulty programs generating endless log messages, the ERRLOG configuration parameter sets the maximum size in kilobytes to which the error log file may grow. System administrators should set up some policy for periodically clearing or archiving error logs. Setting the ERRLOG parameter to zero disables error logging. Each log message consists of two lines of text. The first gives the date, time, QM user number, process id and login name of the user generating the error. The second line gives the actual message, indented by three spaces to make the file more readable. This format is easy to process using user written tools if required.

36

System Administration

The QMFix Utility The QM file system is designed to be robust, however, there are situations when power failures, hardware failures or terminating a process with the Windows Task Manager might lead to structural integrity problems within a file. The QMFix utility can be used to check the structural integrity of a file and, if an error is detected, the apply an automated correction. Although QMFix should always result in the file being usable, there are error situations where data will be lost because it simply was not in the file. To use QMFix, firstly ensure that no users have the file(s) to be processed open. It is safest to run QMFix when no users are using QM. The QMFix utility is run from the Windows DOS command prompt, not from within QM. The command line is QMFIX options pathanme where options

are case insensitive option codes from the following set: -F

Fix errors without querying

-L

Log the screen output in qmfix.log

-Lpath Log the screen output in path -Q

Query before fixing errors

-R

Recover space from unused primary and overflow blocks

pathname is the pathname of the file to be processed. This may be a list of may include wildcard characters. QMFix will ignore names that do not correspond to QM files. Thus, to check all files in a directory, simply type QMFIX * Do not run QMFix with the -F option without running it to check for errors first.

No automated error recovery tool can ever be 100% accurate in its decisions about the nature of errors so there is a very small risk that QMFix could make the situation worse. Always backup a file before fixing any errors in it.

Ladybridge Systems aim to provide software of the highest quality. We would be very interested to receive copies of any files that are reported as faulty by QMFix so that we can investigate the cause and improve the resilience of the QM product.

37

System Administration

The QMAdmin Utility This utility enables a system administrator to perform many management tasks for Windows, Linux and FreeBSD installations from any convenient PC. The initial screen displayed on entering this tool shows a pull down list of recent connections and a Connect button. The list includes an entry to enable creation of a new connection. Clicking on Connect displays a set of fields into which details of the server can be entered. The Login button establishes the connection.

Once a connection has been established, the screen changes to show a list of available administration areas and a Disconnect button. The available areas are: User names

Maintenance of user security features

Accounts

Creation and deletion of accounts

Active users

Monitoring logged in users

Files

Monitoring open files

Locks

Monitoring and releasing locks

Each of these areas is described below.

38

System Administration

Administration of User Names

This screen displays a list of users in QM's user database. Note that on Windows NT/2000/XP, Linux and FreeBSD, users only need to be registered within QM to force them into a specific account on login instead of the displaying the usual account name prompt. On Windows 95/98/ME, all QM users must be registered unless the system is running in insecure mode. Clicking on a user's name displays the details for this user on the right had side of the window. Modification of the owner, login account or administrator rights details enables the Save button to allow the modifications to be saved. The Browse button can be used to display a list of account names. The Delete user button removes this user from QM's register. It has no effect on the underlying operating system security mechanisms.

39

System Administration

Administration of Accounts

This screen displays a list of accounts registered in the ACCOUNTS file and allows the administrator to create new accounts or delete existing accounts. Clicking on an account name displays the account details at the right hand side of the window. These cannot be updated. The New account button allows entry of a new account name and corresponding pathname. The Browse button can be used to establish the pathname. The Delete button deletes the selected account. The user will be asked if the account directory is to be deleted as well as the ACCOUNTS file entry.

40

System Administration

Administration of Active Users

This screen displays all users currently logged into QM. The Auto refresh box at the top right enables automatic redisplay of the data at fixed intervals. Double clicking on a user's entry brings up a list of actions for that process. Currently the only action available is to logout the user.

41

System Administration

Administration of Files

This screen displays the files open in the system. The Auto refresh box at the top right enables automatic redisplay of the data at fixed intervals. Note that a file that has been closed by a user application may appear still to be open as QM maintains a cache of recently accessed files to boost performance of operations that repetitively open and close a file. This cache is automatically flushed on return to the command prompt and at various other times.

42

System Administration

Administration of Locks

This screen displays the active locks in the system. The Auto refresh box at the top right enables automatic redisplay of the data at fixed intervals.

43

System Administration

Backup and Restore QM does not provide any special backup and restore utilities but relies instead on use of standard operating system level backup tools. This section sets out some points to consider in planning a backup strategy. Hopefully, you have already thought of these... •

Determine what to backup. If your backup needs to be as quick as possible, remember that it is usually unnecessary to back up system files that can easily be recreated.



Do not forget that distributed applications sometimes have critical data stored on client PCs. These need to be backed up at the same time as the server to preserve data integrity across the entire backup.



How often will you back up? You need to make a sensible trade-off between the time it takes to backup and the difficulty of bringing the system up to date in the event of a restore.



Consider when to backup in relation to your business routine. It is unsafe to backup a database while it is being used. You will end up with data integrity problems and, possibly, structural integrity problems in files that were being modified while the backup progressed. The safest approach is to log all users off while the backup is performed. It is not necessary to shutdown QM.



Use a cycle of backup media rather than continuously overwriting the same media so that you are secure from failures during the backup and also have multiple points in time to which you can revert.



Ensure that your backup media is kept away from the system that it represents. A fireproof safe or an offsite store is best.



Think carefully about how long you will keep your backups. There are often legal requirements to be able to restore business data for several years.



Test your backups. Check that you really can restore your data if the need arises.

44