database.dat file.
Refer to maintaining database.dat
for details on how to create and use this file.
If you are just getting started and want to play with a simulation, an example database is
available in text format. To use this file, follow the following steps:
blctlxx:/usr/local/dcs/dcss/linux > cp ../examples/example_bl111sim_dump.txt .
Using a text editor, change the host names to match the names of the
computers on the new beam line. For example, the third line of a DHS
entry may need to change to reflect the name of a DHS running on a
different computer. If you plan to run the dhs on the same machine
as DCSS, then you can use
localhost as the hostname.
simDhs 3 localhost 1
database.dat
memory mapped file:
blctlxx:/usr/local/dcs/dcss/linux > ./dcss -r example_bl111sim_dump.txt ....<OUTPUT REMOVED>......... A total of 157 devices were read in from the dump file. blctlxx:/usr/local/dcs/dcss/linux >
serverPorts.txt file from the examples directory into
the /usr/local/dcs/dcss directory.
blctlxx:/usr/local/dcs/dcss > cp ../examples/serverPorts.txt .
The serverPorts.txt file is read by DCSS at start-up to determine what the listening ports are for the clients. The format is simply a single line of text for three different port numbers. The first port number is for the scripting engine to connect to. The second port number is for all of the hardware clients (DHS's) to connect to. The third port number is for all of the gui clients to connect to.
This file could be added to the mysql database schema, but currently is not.
/usr/local/dcs/dcss/scripts/engine/scriptingEngine.tcl
to reference the correct build directory for the tcl_clibs.so file,
built previously.
blctlxx:/usr/local/dcs/dcss/scripts/engine > grep tcl_clibs.so *.tcl scriptingEngine.tcl:load $DCSS_DIR/../../tcl_clibs/linux/tcl_clibs.so dcs_c_library
beamline_configuration database:
bl921:~ > /usr/local/mysql/bin/mysql -u admin -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 354856 to server version: 3.22.32 Type 'help' for help. mysql> use beamline_configuration Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> grant select on DCSS to dcss@blctlxx.slac.stanford.edu; Query OK, 0 rows affected (0.17 sec) mysql> grant select on Users to dcss@blctlxx.slac.stanford.edu; Query OK, 0 rows affected (0.00 sec) mysql> flush privileges; Query OK, 0 rows affected (0.55 sec) mysql>
BeamlineID. This somehow seems redundant,
but I remember it making sense at one point.
mysql> select * from Beamlines where id=12; +----+-------+ | id | Name | +----+-------+ | 12 | bl-xx | +----+-------+ 1 row in set (0.02 sec)
mysql> select * from DCSS where id=12; +----+---------------------------+---------------+---------------+------------+----------+ | id | HostName | ListeningPort | MemoryMapFile | BeamlineID | beamline | +----+---------------------------+---------------+---------------+------------+----------+ | 12 | blctlxx.slac.stanford.edu | 14242 | database.dat | 12 | bl-xx | +----+---------------------------+---------------+---------------+------------+----------+ 1 row in set (0.00 sec)
/usr/local/dcs/dcss/linux directory. You may need to
run DCSS as root, depending on authentication issues.
blctlxx:/usr/local/dcs/dcss/linux > ./dcss -s