my $stcmd = sprintf("st_eb%02d.cmd", 1 + $ebproc);
my $screen_name = sprintf("ioc_eb%02d", 1 + $ebproc);
- my $cmd = "bash; . /home/scs/.bashrc; cd $ioc_dir; screen -dmS $screen_name ../../bin/linux-x86_64/ebctrl $stcmd";
+ my $cmd = "bash; . /home/scs/.bashrc; export HOSTNAME=\\\$(hostname); cd $ioc_dir; screen -dmS $screen_name ../../bin/linux-x86_64/ebctrl $stcmd";
my $cpu = $EB_Args_href->{$ebproc}->{'IP'};
my $exe = "ssh -n $cpu -l scs \"$cmd\"";
my $ioc_stcmd = <<EOF;
#!../../bin/linux-x86_64/ebctrl
-## You may have to change ebctrl to something else
-## everywhere it appears in this file
## Set EPICS environment
< envPaths
ebctrl_registerRecordDeviceDriver(pdbbase)
## Load record instances
-dbLoadTemplate "db/userHost.substitutions"
+dbLoadRecords("db/stats.db", "PREFIX=HAD:IOC:,IOC=${HOSTNAME}")
dbLoadRecords("db/evtbuild.db","eb=$ebnum")
dbLoadRecords("db/netmem.db","eb=$ebnum")
dbLoadRecords("db/errbit1.db","eb=$ebnum")