| iMatix home page | << | < | > | >> |
SMT Version 2.81 |
The UPM tool is a small application developed with SMT, and included as an example. The UPM tool was developed on UNIX and may not be very useful on other systems.
The UPM tool allows you to manage 'unattended' processes, which may handle input/output on some devices, typically terminals. The UPM tool lets you start and stop such processes, manually or using a timer.
The UPM tool consists of four programs:
The main UPM configuration file is called "upm.ini". This is a typical "upm.ini" file: [Setup] logfile=upmd.log [Tasks] name=task1 name=task2
The [Tasks] section defines each of the UPM tasks. Each task has a config file to define task-specific values. The config file for "task1" is called "TASK1.ini". For example:
# Configuration for Task 1 [Setup] stdin=/dev/pts/1 stdout=/dev/pts/1 stderr=/dev/pts/1 [Environment] DATABASE=test PRINTER=tcp://localhost:1000 [Run] idle=banner IDLE startup=run BBORNE.gnt cancel=cleanup
The [Setup] section defines the input/output devices for the task. The [Environment] section defines a list of variables for the task. The [Run] section defines the idle command and the startup command. These commands must be executable files (scripts or programs) with optional arguments. Redirection or multiple commands are not permitted.
Each task also has an optional TIMES file. The times file for task1 is called "TASK1.tim", and looks something like this:
# This file specifies the times for Task1 mon 8-12 12:30-20 tue 8-12 12:30-20 wed 8-12 12:30-20 thu 8-12 13:05-13:06 13:08:13-10 fri 8-12 12:30-20 12/25 off 1/1 off
Each line (except blank lines and comments) defines some times for a day. The first word on the line is the day, the remaining words are one or more time specifications. A day can be:
If no TIMES file is provided, you can (or rather, must) start and stop the tasks manually.
nohup upmd&
Run the command upmc to start the BORMAN client. The upmc program acts as a 'front-end' for the upmd daemon. Since the daemon runs as a process in the background, it cannot read commands from the keyboard itself.
When you run upmc you get a message like this:
upmc> 100- Connecting to UPM daemon...
upmc> 102- Connected to UPM daemon version 1.0
upmc>
You can give various commands at the prompt. This is what the 'help' command shows:
upmc> help Commands and arguments can be in any case. Commands are: LIST - list all known tasks START [task | ALL] - start specified task (default all) STOP [task | ALL] - stop specified task (default all) STATUS [task | ALL] - show status for specified task (default all) HALT - halt UPM daemon EXIT - end this UPM client session QUIT - end this UPM client session HELP - show this information VERSION - show UPM client version
If you run upmc when the upmd daemon is not
running, you get this:
upmc> 100- Connecting to UPM daemon...
upmc> 301- UPD daemon connection failed: Connection refused
You can also run upmc to execute a command directly:
$ upmc start all
Which is the same as typing this:
$ upmc start
UPM Trouble Shooting
These are some possible errors:
The hypertext view of SMTUPMD's dialog and source code may help to understand how SMTUPMD works.
The hypertext view of SMTUPMC's dialog and source code may help to understand how SMTUPMC works.
| << | < | > | >> | Copyright © 1996-99 iMatix Corporation |