\begin{lstlisting}[label=dhcp-request,caption=Sample of DHCP request]
# you must run following command as a root
-$ watch tail /var/log/messages # it may be different for your system, AYA
+\$ watch tail /var/log/messages # it may be different for your system, AYA
# now restart your TRB3 and watch incoming messages, you should see something like this
Nov 29 10:55:18 localhost dhcpd: DHCPDISCOVER from 02:00:be:d9:21:90 via eth0
# if there is another DHCP in the network then you will see its answer
Now you can test your DNS with ping. You should get something like this.
\begin{lstlisting}[label=,caption=Example of ping results on working TRB3]
-$ ping trb033 -c 3
+\$ ping trb033 -c 3
PING trb033 (10.0.0.33) 56(84) bytes of data.
64 bytes from trb033 (10.0.0.33): icmp_req=1 ttl=255 time=0.077 ms
64 bytes from trb033 (10.0.0.33): icmp_req=2 ttl=255 time=0.058 ms
Here is example how to start TRBnet and get IDs of all FPGAs on the TRB3
\begin{lstlisting}[label=,caption=Testing TRBnet for multi TRB3 system]
-$ TRB3_SERVER=trb033 trbnetd -i 1
-$ DAQOPSERVER=localhost:1 trbcmd i 0xffff
+\$ TRB3_SERVER=trb033 trbnetd -i 1
+\$ DAQOPSERVER=localhost:1 trbcmd i 0xffff
0xf3c0 0x7c0000039021d928 0x05
0xf306 0x9e00000390195f28 0x00
0xf306 0x5100000390195528 0x01
can easily find them with following commands
\begin{lstlisting}[label=,caption=Identifying of TRBnet daemons]
-$ ps ax | grep trbnetd
+\$ ps ax | grep trbnetd
2556 ? S 1:15 trbnetd -i 33
21818 pts/21 S+ 0:00 /bin/grep trbnetd
-$ cat /proc/$(pgrep -f "trbnetd -i 33")/environ | strings | grep TRB3
+\$ cat /proc/\$(pgrep -f "trbnetd -i 33")/environ | strings | grep TRB3
TRB3_SERVER=trb033
\end{lstlisting}
If you are using only one TRB3 then you can also export variables globally
\begin{lstlisting}[label=lst:rawtrbnet,caption=Recommended way to run TRBnet for single TRB3 system]
-$ export TRB3_SERVER=trb033
-$ trbnetd -i 1
-$ export DAQOPSERVER=localhost:1
-$ trbcmd i 0xffff
+\$ export TRB3_SERVER=trb033
+\$ trbnetd -i 1
+\$ export DAQOPSERVER=localhost:1
+\$ trbcmd i 0xffff
0xf3c0 0x7c0000039021d928 0x05
0xf306 0x9e00000390195f28 0x00
0xf306 0x5100000390195528 0x01
column is the FPGA number (0x05 is the central FPGA). To set proper addresses
execute following command
\begin{lstlisting}[label=,caption=Updating addresses and serial numbers]
-$ ~/trbsoft/trb3/merge_serial_address.pl ~/trb3/base/serials_trb3.db ~/trb3/base/addresses_trb3.db > /dev/null
+\$ ~/trbsoft/trb3/merge_serial_address.pl ~/trb3/base/serials_trb3.db ~/trb3/base/addresses_trb3.db > /dev/null
\end{lstlisting}
It will load proper configuration to your TRB3. After this we can check whether our changes made expected result.
\begin{lstlisting}[label=,caption=Results of addresses changes]
-$ trbcmd i 0xffff
+\$ trbcmd i 0xffff
0x8000 0x7c0000039021d928 0x05
0x1000 0x9e00000390195f28 0x00
0x1001 0x5100000390195528 0x01
After this your changes should be saved, for this commit changes to the
repository (requires password).
\begin{lstlisting}[label=,caption=Commiting changes to repository]
-$ cvs commit -m "Description of your changes" addresses_trb3.db
+\$ cvs commit -m "Description of your changes" addresses_trb3.db
\end{lstlisting}
\begin{warning}
Be sure that everything is OK, your changes may break system of all
}
1;
-\end{lstlisting}
\ No newline at end of file
+\end{lstlisting}
\subsection{Starting TRB3}
The next task is to setup all necessary registers in the TRB3, which include
-TRBNet addresses and Ethernet-MAC-destination addresses. An example is available in
-the git at ./daqtools/base/startup\_example.sh. It contains all vital settings and can
-be extended as needed. If you want to share your own script, put it to ./daqtools/user/yourproject/.
+TRBNet addresses and Ethernet-MAC-destination addresses. As examples you can find
+in
+
+\verb!~trbsoft/daqtools/users/gsi_ee_lab_kp1pc105/start_test_system_internal_cts.sh!.
+It contains all vital settings and can
+be extended as needed. If you want to share your own script, put it to ./daqtools/users/yourproject/.
First the script updates all TRB3 with proper addresses, then the basic
configuration for GbE is set. The last part sets registers for TDC and CTS configuration.
set the same string key. So in the first terminal we run
\begin{lstlisting}[label=,caption=Running Event Builder{,} part 1]
-$ cd ~
-$ daq_evtbuild -m 1 -o /hldfiles -x te -I 1 --ebnum 1 -q 32 -S test -d file
+\$ cd ~
+\$ daq_evtbuild -m 1 -o /hldfiles -x te -I 1 --ebnum 1 -q 32 -S test -d file
# To generate small files with event builder you need to add these options to command above:
# --resdownscale 20 --resnumevents 2000 --respath /shldfiles --ressizelimit 80
\end{lstlisting}
\end{itemize}
The \verb+/hldfiles+ and \verb+/shldfiles+ are locations for big and small hld
-fiels and should be adjusted to your system.
+files and should be adjusted to your system.
When daq\_evtbuilder is working we need to run daq\_netmem to start capture data
to file. For this run
\begin{lstlisting}[label=,caption=Running Event Builder{,} part 2]
-$ daq_netmem -m 1 -i UDP:0.0.0.0:50000 -q 32 -d 1 -S test
+\$ daq_netmem -m 1 -i UDP:0.0.0.0:50000 -q 32 -d 1 -S test
\end{lstlisting}
+
where value for parameter \verb+-S+ should be the same like for
-\verb+daq_evtbuild+.
\ No newline at end of file
+\verb+daq_evtbuild+.
+
+As and quick example you can use
+
+\verb!~/trbsoft/daqtools/users/gsi_ee_lab_kp1pc105/start_readout.pl!.
\section{How to set up SUSE 12.2 (64bit) on a GSI machine}
-This is a short overview how you set up SUSE 12.2 (64bit) on a GSI machine. You
+This is a short overview how you set up SUSE 12.2 (64bit). You
can skip this when your are not at GSI, but maybe some steps could be
interesting for you.
Now you can press \textbf{INSTALL}. After some time there a some self-explanatory steps again. After that you have successfully installed an SUSE 12.2 on a GSI machine.
+Some additional packages you need:
+\begin{lstlisting}[label=,caption=Additional Packages]
+sudo zypper ar
+http://download.opensuse.org/repositories/devel:/languages:/perl/openSUSE_12.1/
+"download.opensuse.org-perl"
+sudo zypper ref
+
+sudo zypper install perl-IPC-ShareLite
+sudo zypper install perl-Log-Log4perl
+sudo zypper install perl-JSON
+sudo zypper install perl-qt4-devel
+sudo zypper install gnuplot
+zypper install perl-Config-Auto
+
+\end{lstlisting}
+
+
Now you can open a shell and make a full system update. Use the package manager \verb+zypper+.
\begin{lstlisting}[label=,caption=Update SUSE]
-$ zypper ret; zypper dup
-# Start a sytem update
+\$ zypper ref; zypper dup
+\# Start a sytem update
\end{lstlisting}