ecFlow's documentation is now on readthedocs!

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

All communication with the ecflow_server is done with ecflow_client

For any communication with the server, the client needs to know the machine
where the server is running, and the port on the server. There can be multiple
server’s running on the same machine, hence the port number is important.

This tutorial will show examples of using the client at the shell and in a python script.

Client Shell Interface

For a full list of available commands type:

> ecflow_client --help
The ecflow_client uses the following method of determining the host and port
  • Default host and port is localhost:3141

  • These defaults are overridden by ECF_NODE and ECF_PORT environment variables

  • This can be further overridden by using –port and –host options
    and can be used for any of shell level command shown with –help option.
    For example to ping a server on the command line we can use:
    > ecflow_client --ping --host=machineX --port=4141

Client Python Interface

The functionality provided by ecflow_client is also available via the ecFlow Python Api.
Please see ecflow.Client.
The python interface uses the same algorithm for determining the host and port,
and allows the host and port to be set explicitly. See class ecflow.Client
This is shown by the following python example:
import ecflow

ci = ecflow.Client()
ci.set_host_port("oetzi","3444")  # Explicitly set host and port
try:
   ci.ping()
except RuntimeError, e:
   print "failed: " + str(e);

What to do:

If your ecflow_server was started with ecf_start.sh and wish to use the shell
interface, then set ECF_NODE and ECF_PORT environment variables
  • No labels