The guardian source is available from the main guardian svn:

The code base consists of guardian python library, the main guardian daemon program, and various utility and helper apps.

external library dependencies

Guardian depends on a couple of other packages. Only the cdsutils package is needed for executing single states from the command line. The guardian state machine engine daemon additionally needs the pcaspy and networkx libraries. pydot is needed for drawing graphs.

The following packages are needed for running Guardian. The Dependencies are packages that are required for essentially any usage of Guardian. The Recommends are packages that significantly increase the usability, but are not strictly required for all use cases. Python module/package names are followed (in parentheses) by the OS-level package names available on most *NIX systems.


  • Python 2.7 (python2.7):
  • networkx (python-networkx): NetworkX networking library, used for internal representations of the state graph object, and for calculating paths on the state graphs.



All of the packages listed above are required for the aLIGO system installs.

cdsutils and ezca

Guardian modules interact with the aLIGO CDS system via EPICS. In particular, Guardian uses the Ezca EPICS Channel Access interface, which is a wrapping of the pyepics interface specifically designed for interaction between Guardian and the aLIGO RTS system. Ezca is provided as part of the cdsutils package.

.library, which is specifically designed for interacting with the LIGO CDS system and for use in Guardian. It is available in the [[CDS Software/ControlRoomTools|cdsutils]] package. See the following page for how to install the cdsutils package:

  • [[CDS Software/ControlRoomTools/installation]]


The guardian state machine engine daemon uses the [[|python EPICS portable channel access server (pcaspy)]] for creating EPICS control and status channels. This package can either be [[|installed from source]], or Jamie has built debian packages that can be retrieved from his personal git repository of the pcaspy source:

  • git://

To build the package from a checkout of Jamie’s source, do the following:

$ git clone git://
$ cd pcaspy
$ EPICS_BASE=/ligo/apps/linux-x86_64/epics/base ./debsnap
$ sudo dpkg -i build/python-pcaspy_0.4.1-1_amd64.deb

This requires the package: swig.


The guardian usercode archiving feature (>r1390) requires the python-git package. Unfortunately it requires versions >0.3, which are newer than what’s available in Ubuntu 12.04 (0.1.6-1). Fortunately, the newer version can be fairly easily retrieved from Ubuntu 14.04:

root@l1script0:~# cat /etc/apt/sources.list.d/trusty.list
deb trusty universe
deb-src trusty universe
root@l1script0:~# cat /etc/apt/preferences.d/pinning
Package: *
Pin: release n=trusty
Pin-Priority: -10
root@l1script0:~# apt-get install python-git/trusty python-gitdb/trusty python-async/trusty python-smmap/trusty


Hopefully there will soon be proper releases. Until then, there are three ways to install the code base from the SVN:


the methods that install directly from SVN can produce unreliable version numbers in the packaging and code. Care should be taken, and they should probably not be used in “production” scenarios.


The ligo-install make target installs the code directly from source into a version-specific sub-directory under the directory specified by the APPSROOT environment variable. If not specified, APPSROOT defaults to the “standard” LIGO CDS NFS software directory, e.g.:


Usually you would run “make” as a normal user, to update the version number and build the byte-compiled binaries, the run “make ligo-install” as the controls user to install it to /ligo/apps/linux-x86-64/guardian-$(VERSION):

$ make
$ su controls -c "make ligo-install"

In order to make this install usable the installed configuration file must be sourced into your bash shell, either manually or in a bashrc file:

$ . $APPSROOT/etc/

NOTE: This method is meant to be a ‘’temporary’’ stop-gap measure until we have more stable releases, in which case the use of proper packaging is preferred.


Debian/Ubuntu snapshot packages can be built with the ‘deb-snapshot’ target. This requires the Debian package building utilities, e.g. build-essential, as well as the guardian build dependencies:

  • build-essential
  • pkg-config
  • python-all-dev
  • python-setuptools
  • debhelper

Notes for older distributions (Squeese, Ubuntu 10.04):

  • debhelper version 9 is available from squeeze backports (“apt-get -t squeeze-backports install debhelper”)
  • python-argparse (this is needed for python2.6 or earlier, but is included by default with python2.7)
$ make deb-snapshot
$ ls build/