Differences between revisions 2 and 5 (spanning 3 versions)
Revision 2 as of 2012-01-11 21:58:49
Size: 1298
Comment:
Revision 5 as of 2020-07-26 16:48:56
Size: 1463
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:
Internally, the NDS1 server at the 40m has the hostname `fb` or `fb.martian` and listens on port 8088. The NDS2 Server runs on megatron. It reads the 40m frames and serves them up through nds40.ligo.caltech.edu at port 31200
Line 5: Line 5:
Off site, one way to get access to NDS is to use SSH tunneling. On your own computer, run the following command:

=== How to Install the NDS2 client ===
Its best to do this in python, within a anaconda environment dedicated to this purpose.

e.g.
Line 7: Line 12:
$ ssh -f controls@nodus.ligo.caltech.edu -L 18088:fb:8088 -N 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
Line 10: 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. Example jupyter notebook to get 40m data:
Line 12: Line 23:
You'll next be prompted for a password, so give the password for `controls@nodus`. attachment:plotSeismicData.ipynb
Line 14: 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. === 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 16: Line 28:
Now, start using your favorite NDS client tool: ligoDV, pynds, etc. Use `localhost` as the server and 18088 as the port. '''''Enjoy!''''' {{{
~>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 18: Line 43:
'''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

Example jupyter notebook to get 40m data:

attachment:plotSeismicData.ipynb

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

How_To/NDS (last edited 2024-06-13 19:05:02 by DhatriraghunathanATligoDOTorg)