home > Documentation

Cohorte Scripts and Tools




Ensure that Cohorte is properly installed and $COHORTE_HOME environment variable is set.

cohorte-version

This commands shows the actual installed version of Cohorte distribution.

$ cohorte-version

-----------------[ Installed COHORTE distribution ]--------------------

    - distribution : cohorte-macosx-distribution
    - version      : 1.1.0
    - stage        : dev
    - timestamp    : 20150701-233214
    - location     : /Users/debbabi/tools/cohorte

-----------------------------------------------------------------------	
  • distribution : the name of the installed distribution (linux, windows, macosx, python)
  • version : the version number
  • stage : release or dev
  • timestamp : when this distribution was built
  • location : where is this distribution installed on your system

cohorte-update

This command allows you to update your installed distribution

[INFO] getting latest cohorte-macosx-distribution info (from internet)...

    +-----------+-----------------+-----------------+-----------------+
    |           | ACTUAL          | LATEST DEV      | LATEST RELEASE  |
    +-----------+-----------------+-----------------+-----------------+
    | version   | 1.1.0           | 1.1.0           | 1.0.0           |
    +-----------+-----------------+-----------------+-----------------+    
    | stage     | dev             | dev             | release         |    
    +-----------+-----------------+-----------------+-----------------+    
    | timestamp | 20150701-174741 | 20150701-182127 | 20150420-094900 |
    +-----------+-----------------+-----------------+-----------------+

[INFO] There is a new 'development' version!
     | Would you like to install it (yes/no)? or show its changelog (log)? _

It shows the installed distribution informations, as well as the latest available development build and the latest release.

If a new development build is available, the tool propose you to update your distribution to that build version, or to upgrade to the latest release if available.

cohorte-update tool compresses and puts the actual distribution in .archive directory. You can rollback the previous installed version by adding --roll-back option.

cohorte-create-node

See Creating and Starting Nodes.

cohorte-start-node

See Creating and Starting Nodes.

Shell commands

COHORTE has an integrated shell to allow users manipulate and monitor the system.

You should start a Cohorte node using --console to get access to this integrated shell interface.

In the following, we detail the list of the provided shell commands.

Manage COHORTE Platform

Option Description
nodes Lists the nodes visible from this isolate
isolates [<node>] Lists the isolates of the given node, or of all nodes
ping [<isolate>] Checks if the given isolate (name or UID) is alive
forker:stop <isolate> Stops the given isolate (name or UID)
shutdown Shutdown all the platform (all the nodes)

Other advanced commands

These commands are categorized by namespace.

“default” name space

Option Description
? [<command>] Prints the available methods and their documentation, or the documentation of the given command.
bd <bundle_id> Prints the details of the bundle with the given ID or name
bl [<name>] Lists the bundles in the framework and their state. Possibility to filter on the bundle name.
close Stops the current shell session (raises a KeyboardInterrupt exception)
echo ... Echoes the given words
exit Stops the current shell session (raises a KeyboardInterrupt exception)
help [<command>] Prints the available methods and their documentation, or the documentation of the given command.
install <module_name> Installs the bundle with the given module name
loglevel [<level>] [<name>] Prints/Changes log level
properties Lists the properties of the framework
property <name> Prints the value of the given property, looking into framework properties then environment variables.
quit Stops the current shell session (raises a KeyboardInterrupt exception)
sd <service_id> Prints the details of the service with the given ID
sl [<specification>] Lists the services in the framework. Possibility to filter on an exact specification.
start <bundle_id> Starts the bundle with the given ID
stop <bundle_id> Stops the bundle with the given ID
sysprop <name> Prints the value of the given environment variable
sysprops Lists the framework process environment variables
thread <thread_id> Prints details about the thread with the given ID (not its name)
threads Lists the active threads and their current code line
uninstall <bundle_id> Uninstalls the bundle with the given ID
update <bundle_id> Updates the bundle with the given ID

“herald” name space (COHORTE messaging layer)

Option Description
fire <target> <subject> ... Fires a message to the given peer.
fire_group <group> <subject> ... Fires a message to the given group of peers.
forget <uid> Forgets about the given message
local Prints information about the local peer
peers Lists known peers and their accesses
post <target> <subject> ... Post a message to the given peer.
post_group <group> <subject> ... Post a message to the given group of peers
send <target> <subject> ... Sends a message to the given peer(s). Prints responses in the shell.

“ipopo” name space (Service-Oriented Component Model)

Option Description
factories [<name>] Lists the available iPOPO component factories
factory <name> Prints the details of the given component factory
instance <name> Prints the details of the given component instance
instances [<name>] Lists the active iPOPO component instances
instantiate <factory> <name> [<property=value> ...] Instantiates a component of the given factory with the given name and properties
kill <name> Kills the given component instance
waiting [<name>] Lists the components waiting to be instantiated

“shell” name space

Option Description
pids [<isolate>] Prints the Process ID of the isolate(s)
shells [<isolate>] [<kind>] Prints the port(s) to access the isolate remote shell(s)

“top” name space

Option Description
dist [<filename>=autorun_conf.js] [<base>=conf] Parses a composition and computes its node distribution
dump [<node>] Dumps the content of status
load [<filename>=autorun_conf.js] [<base>=conf] Instantiates the given composition
read [<filename>=autorun_conf.js] [<base>=conf] Reads a file
stop <uid> Kills the distribution with the given UID