Documentation:TreeAccess - MdsWiki
Personal tools

From MdsWiki

Jump to: navigation, search


Tree Access

With the exception of the thin client which uses an explicit connection to an mdsip server, i.e. MdsConnect[TDI], MDSplus.Connection[python], the access to the tree files is controlled by tree path envs. These tree paths can be defined statically or dynamically using '~' wildcards also all path location can be set up as ';' separated list (with limitations when the old thick client is involved).

  • Using a static absolute path, e.g. for a tree called 'main':
  • Using an alias, e.g. if 'main' is an alias for 'realmain':
  • Using wildcards to a 10 digits long shot value (~[a-j]) and the tree name (~t), e.g. if tree 'main', shot 1234567890 should map to '/1/2/3/4/5/6/7/8/9/0/main':
  • Using a TDI function 'main_tree_filename(IN _shot)'

- Where 'main_path_filename' should return the fullpath to the tree file without extension e.g. to map all shots to model:


Remote Access

In the current alpha branch we improved the flexibility on how to connect to remote data servers, which is why some remote methods are only available if client and server run on newest alpha.

Direct Connection

If you are on the same network as the data server, e.g. 'target', you can directly connect to I via its host name appended by '::' for a thick client connection (practically as powerful as distributed client in newer alpha).


which is short for


If you know the path to the tree files on the server you can use the distributed client which on older versions of MDSplus is superior compared to thick client (e.g. segment support).


Depending of the server i might be necessary to authenticate you identity for write or read and write access. I this case you may have to specify a different protocol, e.g. for ssh authentication:


ssh connections

IMPORTANT: It is recommended to setup passwordless authentication (e.g. via ssh-copy-id) and exercise the connection once thru shell before using it in MDSplus.
This is to avoid errors due to user interaction for password exchange or during hostkey checking.

Gateway Connection

In case you are not on the same network as the data server you may have the option to connect to a gateway e.g. via ssh which you then can use as a jump host. Depending the number jump hosts that is required to reach your target server you have a few options:
For situations where your jump hosts are running a recent version of alpha with active mdsipd you can chain thick clients definitions:


If you are only one jump host away from your target, your gateway allows ssh logins, and it has nc (or equivalent), you can setup a custom protocol 'mdsip-client-gate' and set your path to:


If all jump hosts are accessed via ssh connections you can setup proxies for each one in you ~/.ssh/config file. E.g. for localhost->>>mds-data1:

 Host gate1
 Host gate2
     ProxyCommand ssh -x -a -q gate nc 22'
 Host gate-target gate-target2
     ProxyCommand ssh -x -a -q gate-term nc $(echo %h|sed 's/gate-//') 22                # sed strips the 'gate-' away

and set your path to: