Pythia

From Olympus
Jump to: navigation, search

Pythia is a the MITRE-Contributed process manager for Galaxy Communicator with some modifications. The main modification so far is the ability to specify working directories for processes.

Contents

Features

especially compared to the other process manager

  • doesn't reboot your computer!
  • each process can be individually started and stopped if needed, and it's easy to tell if a process has stopped
  • output can be paused so that it doesn't keep scrolling when you're trying to examine it
  • output is available even after a crash
  • the code is much better organized, so new features are a possibility
  • you have a lot more control over what windows are visible, and what starts up automatically
  • configuration has access to environment variables
  • email notification when processes die

How to use

Write a Configuration

There's some documentation from MITRE.

Here's an example from an Olympus project:

EXPAND: $OLYMPUS_ROOT %OLYMPUS_ROOT
EXPAND: $GC_HOME ..\..\ExternalLibraries\Galaxy
EXPAND: $MITRE_ROOT $GC_HOME\contrib\MITRE
EXPAND: $TEAMTALK ..\..
EXPAND: $CONFIGURATION $TEAMTALK\Configuration\DesktopConfiguration
EXPAND: $AGENTS $TEAMTALK\Agents
EXPAND: $PENDECODER $AGENTS\PenDecoder
EXPAND: $BIN $TEAMTALK\Bin\x86-nt
EXPAND: $NLG $AGENTS\TeamTalkNLG
EXPAND: $RESOURCES $TEAMTALK\Resources
EXPAND: $GRAMMAR $RESOURCES\Grammar
EXPAND: $DECODER $RESOURCES\DecoderConfig
EXPAND: $JAVAEXE java
EXPAND: $PERL perl

TITLE: TeamTalk

PROCESS: $JAVAEXE -classpath bsh-core-2.0b4.jar;bsh-util-2.0b4.jar;jiu.jar;dist/PenDecoder.jar;$MITRE_ROOT/bindings/java/lib/galaxy.jar edu.cmu.ravenclaw.pendecoder.PenDecoderServer -port 11002 -peerfile $CONFIGURATION\peerfile.txt
PROCESS_WORKDIR: $PENDECODER
PROCESS_TITLE: PenDecoder

PROCESS: $BIN\KalliopeSwift.exe -maxconns 6 -config swift.cfg
PROCESS_TITLE: Kalliope

PROCESS: $BIN\TeamTalkBackend-DEBUG.exe -verbosity 1 -maxconns 6
PROCESS_TITLE: TeamTalkBackend

PROCESS: $PERL -I../Rosetta bin/TeamTalk
PROCESS_WORKDIR: $NLG
PROCESS_TITLE: Rosetta

PROCESS: $BIN\NlgServer2.exe -maxconns 6 -nlghost localhost
PROCESS_TITLE: NLGServer

PROCESS: $BIN\phoenix2.exe -maxconns 6 -grammardir $GRAMMAR -grammarfn $GRAMMAR\zap2.net
PROCESS_TITLE: Phoenix

PROCESS: $BIN\Audio_Server-DEBUG.exe -maxconns 6 -sps 16000 -engine_list sphinx_engines.txt
PROCESS_TITLE: Audio_Server

PROCESS: $BIN\Sphinx_Engine -name male -argfn male-16khz.arg -port 9990
PROCESS_WORKDIR: $DECODER
PROCESS_TITLE: Sphinx_Male

PROCESS: $GC_HOME\bin\x86-nt\HUB.exe -verbosity 3 -pgm_file TeamTalk-hub-desktop-skeleton.pgm
PROCESS_TITLE: Hub

The % symbol in %OLYMPUS_ROOT will expand into the value of the OLYMPUS_ROOT environment variable. This only works in the RHS of an EXPAND clause.

In addition to the main configuration file, there's support for a user configuration. That file must be the same name as the main configuration, but with .user appended to it (e.g. my_config.config.user). It is intended to be store implementation-specific configuration information as opposed to application-specific configuration information. For example, we've used this file for email notification configuration, as in:

NOTIFY: tkharris@cs.cmu.edu
NOTIFY-FROM: tkharris@cs.cmu.edu
NOTIFY-SMTP: smtp.srv.cs.cmu.edu

Run

From your configuration directory, run:

C:\Project\Configurations\YourConfiguration>%OLYMPUS_ROOT%\Agents\Pythia\dist\process_manager.exe your_pythia_confg.config

Selecting Restart All under Process Control will start everything. If you close the window without canceling applications they will continue to run without display.

Development

Requires Python + the python windows extensions[1]

Building a binary

  1. Download py2exe[2] (you need python too, of course).
  2. From the Pythia directory, run:
[Pythia]$ python src/setup.py py2exe
[Pythia]$ cp src/process_monitor.ico dist

The executable depends on the following binaries, which are probably already installed on most systems.

  • ole32.dll - C:\WINDOWS\system32\ole32.dll
  • OLEAUT32.dll - C:\WINDOWS\system32\OLEAUT32.dll
  • USER32.dll - C:\WINDOWS\system32\USER32.dll
  • IMM32.dll - C:\WINDOWS\system32\IMM32.dll
  • SHELL32.dll - C:\WINDOWS\system32\SHELL32.dll
  • KERNEL32.dll - C:\WINDOWS\system32\KERNEL32.dll
  • comdlg32.dll - C:\WINDOWS\system32\comdlg32.dll
  • WSOCK32.dll - C:\WINDOWS\system32\WSOCK32.dll
  • COMCTL32.dll - C:\WINDOWS\system32\COMCTL32.dll
  • ADVAPI32.dll - C:\WINDOWS\system32\ADVAPI32.dll
  • NETAPI32.dll - C:\WINDOWS\system32\NETAPI32.dll
  • WS2_32.dll - C:\WINDOWS\system32\WS2_32.dll
  • GDI32.dll - C:\WINDOWS\system32\GDI32.dll
  • VERSION.dll - C:\WINDOWS\system32\VERSION.dll
  • MSWSOCK.dll - C:\WINDOWS\system32\MSWSOCK.dll
Personal tools