|
Size: 1451
Comment:
|
Size: 1384
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 1: | Line 1: |
| = Using NDS off site = | = NDS (Network Data Server) = |
| Line 3: | Line 3: |
| Use the NDS2 interface: nds40.ligo.caltech.edu:31200 |
The NDS2 Server runs on megatron. It reads the 40m frames and serves them up through nds40.ligo.caltech.edu at port 31200 |
| Line 8: | Line 6: |
| ---- | |
| Line 10: | Line 7: |
| = The instructions below are BAD and will break things, so don't ever use them = | === How to Install the NDS2 client === Its best to do this in python, within a anaconda environment dedicated to this purpose. |
| Line 12: | Line 10: |
| Internally, the NDS1 server at the 40m has the hostname `fb` or `fb.martian` and listens on port 8088. | e.g. {{{ conda env create --name LIGO |
| Line 14: | Line 14: |
| Off site, one way to get access to NDS is to use SSH tunneling. On your own computer, run the following command: {{{ $ ssh -f controls@nodus.ligo.caltech.edu -L 18088:fb:8088 -N |
conda activate LIGO conda install numpy scipy matplotlib pandas astropy jupyterlab nodejs conda install -c conda-forge python-nds2-client |
| Line 19: | Line 21: |
| The `-f` option tells SSH to go into the background after starting. The `controls@nodus.ligo.caltech.edu` argument tells SSH to log in to the server `nodus.ligo.caltech.edu` with the user name `controls`. The `-L 18088:fb:8088` option tells SSH that it should redirect traffic on port 18088 on the local side to port 8088 on host `fb` on the remote side. The `-N` option tells SSH not to execute any command on the remote side. | |
| Line 21: | Line 22: |
| You'll next be prompted for a password, so give the password for `controls@nodus`. | === How to debug the NDS2 Server on Megatron === The NDS2 process is handled by the user '''nds2mgr''', so don't try debuggin as controls. |
| Line 23: | Line 25: |
| If you have done everything correctly, it will look like nothing has happened, but really an ssh process has started in the background, listening on port 8088 on localhost. | {{{ ~>sudo su nds2mgr nds2mgr@megatron:/home/controls$ cd nds2mgr@megatron:~$ cd nds2-megatron/ nds2mgr@megatron:~/nds2-megatron$ make -f test_restart make: 'restart_stamp' is up to date. nds2mgr@megatron:~/nds2-megatron$ rm restart_stamp nds2mgr@megatron:~/nds2-megatron$ make -f test_restart echo "about to restart" about to restart sudo /etc/init.d/nds2 restart Shutting down nds2: Starting nds2: /usr/bin/nds2 already running. }}} |
| Line 25: | Line 40: |
| Now, start using your favorite NDS client tool: ligoDV, pynds, etc. Use `localhost` as the server and 18088 as the port. '''''Enjoy!''''' '''Note:''' In order to ''disable'' the SSH tunnel, you will need to hunt down the ID of your background ssh process and then `kill` it. |
Sometimes, if people have been hammering the server or if there's another kind of hangup, you may run '''htop''' and see that one nds2 thread is using up near 100% of a CPU. Then its time to kill it with seriousness: {{{ sudo pkill -9 nds2 }}} and then rerun the 'make -f test_restart' as usual |
NDS (Network Data Server)
The NDS2 Server runs on megatron. It reads the 40m frames and serves them up through nds40.ligo.caltech.edu at port 31200
How to Install the NDS2 client
Its best to do this in python, within a anaconda environment dedicated to this purpose.
e.g.
conda env create --name LIGO conda activate LIGO conda install numpy scipy matplotlib pandas astropy jupyterlab nodejs conda install -c conda-forge python-nds2-client
How to debug the NDS2 Server on Megatron
The NDS2 process is handled by the user nds2mgr, so don't try debuggin as controls.
~>sudo su nds2mgr nds2mgr@megatron:/home/controls$ cd nds2mgr@megatron:~$ cd nds2-megatron/ nds2mgr@megatron:~/nds2-megatron$ make -f test_restart make: 'restart_stamp' is up to date. nds2mgr@megatron:~/nds2-megatron$ rm restart_stamp nds2mgr@megatron:~/nds2-megatron$ make -f test_restart echo "about to restart" about to restart sudo /etc/init.d/nds2 restart Shutting down nds2: Starting nds2: /usr/bin/nds2 already running.
Sometimes, if people have been hammering the server or if there's another kind of hangup, you may run htop and see that one nds2 thread is using up near 100% of a CPU. Then its time to kill it with seriousness:
sudo pkill -9 nds2
and then rerun the 'make -f test_restart' as usual
