40m QIL Cryo_Lab CTN SUS_Lab TCS_Lab OMC_Lab CRIME_Lab FEA ENG_Labs OptContFac Mariner WBEEShop
  40m Log, Page 269 of 344  Not logged in ELOG logo
ID Date Author Type Categorydown Subject
  8776   Thu Jun 27 22:52:38 2013 Rana, Gabriele, FrancescoSummaryComputer Scripts / ProgramsLIGO-DV installed

I installed ligoDV in the /ligo/apps/ligoDV/

Now, by pointing the tool at the local NDS2 server (megatron:31200) you can access the recent local data (raw, trends, etc.)

by running /ligo/apps/ligoDV/ligodv from the command line.

  8778   Thu Jun 27 23:18:46 2013 jamieUpdateComputer Scripts / ProgramsWARNING: Matlab upgraded

Quote:

I moved the old matlab directory from /cvs/cds/caltech/apps/linux64/matlab_o to /cvs/cds/caltech/apps/linux64/matlab_oo

and moved the previously current matlab dir from /cvs/cds/caltech/apps/linux64/matlab to /cvs/cds/caltech/apps/linux64/matlab_o.

And have installed the new Matlab 2013a into /cvs/cds/caltech/apps/linux64/matlab.

Since I'm not sure how well the new Matlab/Simulink plays with the CDS RCG, I've left the old one and we can easily revert by renaming directories.

Be careful with this.  If Matlab starts re-saving models in a new file format that is unreadable by the RCG, then we won't be able to rebuild models until we do an svn revert.  Or the bigger danger, that the RCG *thinks* it reads the file and generates code that does something unexpected.

Of course this all may be an attempt to drive home the point that we need an RCG test suite.

  8986   Thu Aug 8 11:18:46 2013 manasaUpdateComputer Scripts / ProgramsUnused scripts in ASS moved

I was receiving missing path error when I was trying to measure the MC spot positions. Jenne pointed out that Koji had moved all the unused scripts in scripts/ASS to /scripts/ASS/OBSOLETE yesterday and in the process one of the scripts that the MC spot position measurement script calls for (MeasureSpotPositions.py) must have also been moved to the OBSOLETE directory. I moved the script to /scripts/ASS/MC so that we know the script is being used and also changed its path in the main script.

  9023   Sun Aug 18 20:07:41 2013 ranaUpdateComputer Scripts / Programsuserapps SVN up

JoeB and JamieR are working somewhat coherently on a set of python libraries to fulfill all of our command line CDS wants. This is being done mostly to satisfy The Guardian and the SkunkTools project.

I did an 'svn up' in /opt/rtcds/userapps (it might finish in ~1000 years) to get the things that they have so far (in particular, Joe's 'pyavg'). There's going to be some issues since the pylib stuff written by Yuta/Kiwamu has never been integrated with anything and is imported as 'epics' in many python scripts. As we move over to the new stuff there will be a lot of broken script functions since the new libraries are also used in that way.

  9075   Tue Aug 27 19:50:06 2013 JamieConfigurationComputer Scripts / Programscdsutils checked out into /opt/rtcds

I have checked out the new cdsutils repository at:

/opt/rtcds/cdsutils/release

This is a new repository that is intended to hold all of our python libraries and command-line utilities for interacting with the IFO, things like:

  • get/write values EPICS channels
  • interact with filter module switches
  • average a test point for some amount of time
  • etc.

Basically everything that used to be ez* or tds*.

There's not much in there at the moment, but hopefully it will start to get filled in soon.

WARNING:

This code in here will be used by the sites to interact with the real aLIGO IFOs.  Please be careful as you develop things in here, and o so conscientiously.  If you do bad things here and it messes things up at the sites people will be angry.  Particularly me, since I have to support everything in here for Guardian use.

Usage

<cdsutils>/lib/cdsutils is the primary python library.  For each function you want to add, put it in a new file named after the function.  So for instance function "foo" should be in a file called <cdsutils>/lib/cdsutils/foo.py.

There is a command line utility at <cdsutils>/bin/cdsutils.  It will automatically find anything you add to the library and expose it as a sub command (e.g. "cdsutils foo")

We'll try to put together a wiki page describing development and usage of this soon.

  9080   Wed Aug 28 06:17:15 2013 manasaUpdateComputer Scripts / Programsalias for MATLAB2010

Although Matlab 2013 has not been causing any visible trouble so far, it takes a while to startup.

I have added alias 'ml10' to bash to start Matlab 2010 from the terminal for convenience.

  9081   Wed Aug 28 06:26:28 2013 manasaUpdateComputer Scripts / ProgramsASS req and snap files edited

[From yesterday] ASS for X arm was behaving slightly funny over the last couple of days. ASS could not correct the BS misalignment. Jenne pointed out that the LSC output matrix on the ASS medm screen set itself to zeroes whenever we ran the ASS_dither_ON script. I checked the burt request file: ASS_DITHER_ON.req  in /opt/rtcds/caltech/c1/scripts/ASS and found that the LSC output matrix channels were not added to it. I added these channels for both the X and Y arm. Following this, I also edited the corresponding snap file as well. This should now set the LSC matrix to the right values everytime we run the script.

  9089   Fri Aug 30 01:01:28 2013 rana, nicSummaryComputer Scripts / ProgramsaLIGO Noise Budget code installed and running

Chris Wipf has been developing a new Noise Budget code that allows us to use our existing Simulink models to handle all of the noise transfer functions. This is mainly by being clever about avoiding the numerical pitfalls that we encounter when doing linearization of Simulink models (e.g. linmod or linmod2).

Screen_Shot_2013-08-30_at_1.00.02_AM.png

In this model, the optical plant is done with analytic TFs using the formulae from the Sigg Frequency Response doc. The big Orange block has just the DAC and some simple pendulum TFs. The upper section contains the simulated digital system: input matrix, digital filter TFs, and output matrix. The digital filters are just based on my memory of iLIGO. The CARM path is made to be fast to approximate the high gain of the Common Mode servo. Without this high gain the PRC optical plant is unstable due to the right half plane zeros. This simple model is used just so that we could see the NB work on a multi-loop system. For the next steps of getting it to work for the 40m, we will use the Optickle TFs instead of analytic functions and also load the digital filters directly from the FOTON files. For the LLO DRMI, we'll add some simplified version of the SUS Simulink models for triples and quads.

 

Yesterday, Nic and I took my old iLIGO IFOmodel.mdl Simulink model and added the new NB hooks that allowed us to use the new code. The screenshot below is from a run of this code:

1) Figure 1 shows the DARM Noise budget. So far we have included shot noise in DARM, CARM, MICH, & PRC. Radiation pressure noise on the ITMs and ETMs. Coating thermal noise on all mirrors.

2) Figure 2 shows the breakdown of how each of the shot noises at each port couple to the DARM readout. The RED trace is the AS port DC readout shot noise. The GREEN trace is the MICH shot noise feeding through the MICH loop and being mostly cancelled by the scalar MICHdamp feedforward path.

3) Figure 3 shows that we've set the coating thermal noise to be equal on all 4 TMs.

4) Figure 78754 is a set of Bode plots of the open loop gains of the 4 LSC loops (inferred from the closed loop TF). Also plotted is the residual MICH2DARM TF (with the MICHdamp cancellation path ON).

5) Figure 9911123 are the step responses of the LSC loops: step inserted at the error point and response measured just after the excitation point.

The editor window on the left shows how simple the NB code is to use once the Simulink model has had all the hooks added to it.

  9130   Mon Sep 16 13:11:15 2013 EvanUpdateComputer Scripts / ProgramsComsol 4.3b upgrade

Comsol 4.3b is now installed under /cvs/cds/caltech/apps/linux64/COMSOL43b. I've left the existing Comsol 4.2 installation alone; according to the Comsol installation guide [PDF], it is unaffected by the new install. On megatron I've made a symlink so that you can call comsol in bash to start Comsol 4.3b.

The first time I ran comsol server, it asked me to choose a username/password combo, so I made it the same as the combo used to log on to megatron.

Edit: I've also added a ~/.screenrc on megatron (based on this Stackoverflow answer) so that I don't constantly go nuts trying to figure out if I'm already inside a screen session.

  9132   Mon Sep 16 15:29:50 2013 JamieConfigurationComputer Scripts / Programscdsutils checked out into /opt/rtcds

We now have a proper install of cdsutils:

 controls@rossa:~ 0$ cdsutils
 usage: cdsutils <cmd> <args>

 Advanced LIGO Control Room Utilites

 Available commands:

   read         read EPICS channel value
   write        write EPICS channel value
   switch       switch buttons in standard LIGO filter module
   avg          average NDS channels for some amount of time
   servo        simple integrator (pole at zero)

 Add '-h' after individual commands for command help.
 controls@rossa:~ 0$ 

It is installed in /ligo/apps/cdsutils, and should be in the path on all workstations.

The "development" source working directory is currently checked out at /opt/rtcds/cdsutils/trunk.

 

  9133   Mon Sep 16 19:41:01 2013 ranaConfigurationComputer Scripts / Programscdsutils checked out into /opt/rtcds
 controls@rosalba:~ 0$ cdsutils
Traceback (most recent call last):
  File "/ligo/apps/cdsutils/lib/cdsutils/__main__.py", line 7, in <module>
    from cdsutils import CMDS
  File "/ligo/apps/cdsutils/lib/cdsutils/__init__.py", line 4, in <module>
    from servo import servo
  File "/ligo/apps/cdsutils/lib/cdsutils/servo.py", line 1, in <module>
    from epics import PV
ImportError: No module named epics
controls@rosalba:~ 1$
Mon Sep 16 19:40:32 2013 
  9135   Tue Sep 17 17:55:42 2013 Jamie.ConfigurationComputer Scripts / Programspyepics configured

Quote:
 controls@rosalba:~ 0$ cdsutils
Traceback (most recent call last):
  File "/ligo/apps/cdsutils/lib/cdsutils/__main__.py", line 7, in <module>
    from cdsutils import CMDS
  File "/ligo/apps/cdsutils/lib/cdsutils/__init__.py", line 4, in <module>
    from servo import servo
  File "/ligo/apps/cdsutils/lib/cdsutils/servo.py", line 1, in <module>
    from epics import PV
ImportError: No module named epics
controls@rosalba:~ 1$
Mon Sep 16 19:40:32 2013 

 I properly installed the python-pyepics package on all the workstations, so this should be working now.

And for posterity, the pyepics source is at:

  pianos:/home/controls/src/pyepics

From this debian packages were built:

  controls@pianosa:~/src/pyepics 0$ debuild -uc -us

The .deb was then moved into the /ligo/apps/deb nfs:

  controls@pianosa:~/src 0$ cp python-pyepics_*_all.deb /ligo/apps/debs/pyepics/

It was then installed on the various workstations:

  controls@rosalba:~ 0$ sudo dpkg -i /ligo/apps/debs/pyepics/python-pyepics*.deb

This will probably need to be repeated any time we upgrade the EPICS install.

  9141   Thu Sep 19 18:48:24 2013 ranaUpdateComputer Scripts / ProgramsPMC locker

 In May of 2013 Den wrote a PMC Autolocker because he ignored / didn't want to read anyone else's code. Later that year Yuta also wrote another one from scratch for the same reasons.

I tried to use both today, but neither one runs. Yuta's one doesn't run because he was using a bunch of private yuta library stuff in the yuta directory. That kind of programming style is pretty useless for us since it never works after some time.

So I re-activated and tested the PMCAutolock bash script (it is actually a symbolic link called "PMCAutolock" which points to AutoLock.sh). These scripts are all basically the same:

They turn off the loop (or turn down the gain) and then scan the PZT, look for a resonance, and then activate the loop.

One problem with the logic has been that turning off the loop makes the gain so low that the peak flashes by too fast. But leaving the loop ON and just sweeping with the gain turned down to -10 dB is also not good. That only reduces the UGF from 1 kHz to ~100 Hz. What we want is more like a 10 Hz UGF while scanning the length. SO, I edited the script to turn down the modulation depth on the EOM by that factor. After acquiring lock, it returns all settings to the nominal levels as defined on the PSL_SETTINGS screen.

I've tested it a few times and it seems to work OK. You can run it from the yellow shabang button on the PMC screen.

I also changed the .bashrc aliases for the MEDM command so that if you type medm_good at the command line you get MEDM screens with scalable fonts. So you can stretch the screens.

  9142   Thu Sep 19 21:15:44 2013 ranaUpdateComputer Scripts / ProgramsPMC locker

I used a script (~PSL/PMC/testAutoLocker.sh) to unlock the PMC and run autlocker ~100 times to see how robust the new autlocker is.

It failed to grab it 2 out of 137 times. During those times it just went on trying to ramp the PZT even after it had gone to a rail. Once someone resurrects Rob's 'trianglewave'  script we should be OK. Even so, I think this is good enough. Please try this out via the yellow button next time the PMC needs to be locked.

It usually takes 10-30 seconds to lock, depending upon where the fringe is compared to the upper voltage rail. Good enough.

  9144   Fri Sep 20 08:15:30 2013 SteveUpdateComputer Scripts / ProgramsOttavia, Rossa and Pianosa

Ottavia, Rossa  and Pianosa are running out of storage  space.

  9186   Wed Oct 2 23:21:54 2013 ranaUpdateComputer Scripts / Programspianosa can't find Jamie PPA

Message on 'pianosa':

Failed to fetch http://ppa.launchpad.net/drgraefy/nds2-client/ubuntu/dists/lucid/main/binary-amd64/Packages.gz  404  Not Found

  9194   Thu Oct 3 08:57:00 2013 jamieUpdateComputer Scripts / Programspianosa can't find Jamie PPA

Quote:

Message on 'pianosa':

Failed to fetch http://ppa.launchpad.net/drgraefy/nds2-client/ubuntu/dists/lucid/main/binary-amd64/Packages.gz  404  Not Found

Sorry, that was an experiment to see if I could set up a general-use repository for the NDS packages.  I've removed it, and did an update/upgrade.

  9216   Mon Oct 7 18:32:01 2013 John ZweizigSummaryComputer Scripts / Programsnds2 installed, restarted

The upgrade of megatron broke the nds2 service. I have fixed things by

  1) installing the latest version of framecpp (1.19.32) from the lsc debian repository (this was necessary because I couldn't link to the existing version)

  2) built nds2-server-0.5.11 and installed it in the system directories (/usr/bin)

  3) there were a few scripts/links/etc that didn't seem to be set up correctly and I fixed them to correspond with my preious message.

 nds2 is now running and the channel list should be updated regularly and the service restarted as appropriate.

 

  9309   Tue Oct 29 18:14:52 2013 JamieConfigurationComputer Scripts / Programsfixing python-matplotlib from LSCSOFT

Jenne just discovered an issue with the python-matplotlib package that I knew was coming but forgot about.

We pull packages from the LSCSOFT Debian "squeeze" archive, which is a convenient way for us to install LIGO data analysis software.  There are no LSCSOFT archives for Ubuntu, and Debian "squeeze" is the closest supported distribution to Ubuntu 10.04 "lucid", which is what we are using.

DASWG recently added python-matplotlib to the LSCSOFT squeeze archive.  The version they added (1.0.1-3) supersedes the version in lucid, so by default apt wants to install it.  However, the LSCSOFT version is compiled against a newer version of some standard libraries, so it won't function on our system and seg faults.

The solution (a solution) is to use apt "pinning" to pin the package to the lucid version that works.  I've added the following file on all the 10.04 workstations to prevent the package from upgrading to the LSCSOFT version:

controls@pianosa:~ 0$ cat /etc/apt/preferences.d/pin_python-matplotlib
Package: python-matplotlib
Pin: release a=lucid
Pin-Priority: 1000

 

  9310   Tue Oct 29 18:54:36 2013 JamieConfigurationComputer Scripts / Programsfixing python-matplotlib from LSCSOFT

Quote:
controls@pianosa:~ 0$ cat /etc/apt/preferences.d/pin_python-matplotlib
Package: python-matplotlib
Pin: release a=lucid
Pin-Priority: 1000 

I forgot that there were a couple of different matplotlib packages that all needed to be pinned.  To be safe I decided to just pin all packages to the lucid versions.  This will still allow us to install lscsoft packages that are not ubuntu, but it will always prefer packages from lucid instead.  Here's the new pinning file:

controls@pianosa:~ 0$ cat /etc/apt/preferences.d/pinning 
Package: *
Pin: release a=lucid
Pin-Priority: 1000
controls@pianosa:~ 0$ 

  9318   Wed Oct 30 08:32:55 2013 EvanHowToComputer Scripts / Programsmatplotlibrc

FYI, you can trick out matplotlib by creating a matplotlibrc config file. This allows you to set defaults for plot size, trace color, fonts, grids, etc., analogous to what is achieved in ATF:1840 for Matlab.

Note also that matplotlib supports LaTeX by default (if you have LaTeX installed), which means, for example, that you can include true square roots on your spectral densities:

plt.ylabel('Voltage spectral density (V/$\\sqrt{\\mathrm{Hz}}$)')

Since the backslash is used for escape characters in python, you must escape LaTeX backslashes.

For maximum effect, you can set the following lines in your matplotlibrc file:

text.usetex = True

text.latex.preamble = \usepackage{txfonts}

Then all text and mathematics in your plot will be sent through LaTeX for processing and will appear in Times.

Also, why is the conversion from watts to volts V = 50 * sqrt(W) and not V = sqrt(50 * W)?

  9321   Thu Oct 31 00:06:45 2013 masayukiUpdateComputer Scripts / Programscds fft,tf,offsets

I wrote the scripts for cdsutils.

1. fft

usage: fft.py [-h] [-c N_CYCL] [-a N_AVG] freq channel [channel ...]

Measures the frequency content of one or more NDS channels
at the specified frequecy.
    The measurement results are  magnitude, phase, real part imaginary part, and the standard deviation of the real and imaginary parts.

positional arguments:
  freq        measurement frequency
  channel     list of measurement channel

optional arguments:
  -h, --help  show this help message and exit
  -c N_CYCL   define number of cycles. Default is 10
  -a N_AVG    define number of average. Default is 100

2. tf

usage: tf.py [-h] [-c N_CYCL] [-a N_AVG] [--dB] freq input output

Measures the transfer funtion of one NDS channels pair  at the specified frequecy.
    The measurement results are the coherence, magnitude, phase, real part, imaginary part, and the standard deviation of the real and imaginary parts.

positional arguments:
  freq        measurement frequency
  input       list of measurement input channel
  output      list of measurement output channel

optional arguments:
  -h, --help  show this help message and exit
  -c N_CYCL   define number of cycles. Default is 10
  -a N_AVG    define number of average. Default is 100
  --dB        print the amplitude in dB

 

3.offsets

usage: offset.py [-h] [-t SECONDS] filterbank [filterbank ...]

Zero the offset of one or more filterbank. Take average of OUT16 channel, and put (-1 * average / gain) into offset.  After change offsets, it will turn on the offset.
    example usage) offset -d 25 C1:LSC-AS55_Q C1:LSC-AS55_I

positional arguments:
  filterbank  list of filterbank to zero offset

optional arguments:
  -h, --help  show this help message and exit
  -t SECONDS  define the averaging time. default value is 10

I put these scripts in /opt/rtcds/cdsutils/trunk/lib/cdsutils.
I couldn't put them into cds library, but I will left tomorrow to Japan...

So please help me Jamie or Joe !!

 

 

By the way,

I modified the LSCoffset script  (script)/LSC/LSCoffsets.py.

usage: LSCoffsets.py [-h] [-d SECONDS] [--PDlist]

 Zero the offsets of LSC PDs. During taking average, we will close the PSL and green shutter. After zeroing, it will turn on the offsets switch.
    example usgae) LSCoffset2.py -d 20    

optional arguments:
  -h, --help  show this help message and exit
  -d SECONDS  define the averaging time. default value is 10
  --PDlist    print PD list for LSC and exit

i made new directory 'offset_backup' for old offset script. I move all old offset script into there.

But unfortunately that cannot use right now, because cds offsets script is not available yet...

  9423   Fri Nov 22 14:21:43 2013 JamieUpdateComputer Scripts / ProgramsDAQ?

Quote:

Jamie, I think the computers know that you are away. c1lsc keeps going down.

The short time plots are correct.

Is there some indication from the attached image that there is a problem with c1lsc?  I see some drop outs in the channels you're plotting, but those are not c1lsc channels.

The channels with the drop outs are I think derived channels, as opposed to ones that are generated on the front end.  Therefore they could have been affected by the c1auxey outages from earlier in the week.

  9578   Mon Jan 27 17:49:46 2014 ranaHowToComputer Scripts / Programssendmail started on nodus: fixing SwiftMail on Dokuwiki

Since the recent filesystem fracas, the new accounts could not be created on nodus / dokuwiki (for the controls workshop, for example).

I started sendmail on nodus using the command:   sudo /etc/init.d/sendmail start

and the SwiftMail plugin on there is now sending out the confirmation emails again. This will happen each time we reboot nodus, so let's replace it.

  9686   Mon Mar 3 21:50:35 2014 JenneUpdateComputer Scripts / ProgramsDropbox installed on Workstations

I have installed Dropbox on the 40m workstations, using the foteee account. 

I put it in /users/Dropbox.

As a side note, I did the install while sitting on Pianosa, but since I put the folder on the mounted hard drive, I think we should be able to use it from any workstation, although I have not yet confirmed this.

  9714   Tue Mar 11 15:01:28 2014 ericqUpdateComputer Scripts / ProgramsMC Signal Monitoring

Two weeks ago (Feb 26) I took the "Q MON" output of the demodulator that sends its Q output to the MC servo board as the error signal, and connected it to an SR785, so we can occasionally monitor the error signal noise. (Also, I did not appropriately ELOG the fact I touched things...)

I'm working on an automated script to do the monitoring, but the wireless router that the SR785 is connected is wicked slow. I should run an ethernet cable to it...

I'm just figuring I'll look at the full span (~100kHz) spectrum every ten minutes, and compare it to some nominal spectrum from a known-good time, and the last few hours.

  9722   Tue Mar 11 21:38:43 2014 manasaUpdateComputer Scripts / ProgramsIFO configure scripts in burt modified

I have modified the IFOconfigure scripts and the corresponding .req files for the X arm and Y arm in burt. I have also added configure scripts to save and restore LSC settings for locking the arms using ALS error signals.

The settings are yet to be saved and the scripts should also be checked if they are working as required.

  9770   Tue Apr 1 17:37:57 2014 EvanUpdateComputer Scripts / ProgramsComsol 4.4 upgrade

Comsol 4.4 is now installed under /cvs/cds/caltech/apps/linux64/COMSOL44. I've left the other installations alone. I've changed the symlink on megatron so that comsol now starts Comsol 4.4.

The first time I ran comsol server, it asked me to choose a username/password combo, so I made it the same as the combo used to log on to megatron.

We should consider uninstalling some of the older Comsol versions; right now we have 4.0, 4.2, 4.3b, and 4.4 installed.

  9897   Fri May 2 01:58:52 2014 ranaConfigurationComputer Scripts / ProgramsupdateDB configured to index NFS during CRON daily

I wanted to use locate to find some files today, but found that it doesn't index any of our NFS mounted files (i.e. the whole /cvs/cds/ and /opt/rtcds/ ).

So I went into /etc/updatedb.conf and edited it like so, so that it no longer ignores NFS type file systems:

controls@rossa:/etc 0$ diff updatedb.conf updatedb.conf~
4c4
< PRUNEFS="nfs4 rpc_pipefs afs binfmt_misc proc smbfs autofs iso9660 ncpfs coda devpts ftpfs devfs mfs shfs sysfs cifs lustre_lite tmpfs usbfs udf fuse.glusterfs fuse.sshfs ecryptfs fusesmb devtmpfs"
---
> PRUNEFS="NFS nfs nfs4 rpc_pipefs afs binfmt_misc proc smbfs autofs iso9660 ncpfs coda devpts ftpfs devfs mfs shfs sysfs cifs lustre_lite tmpfs usbfs udf fuse.glusterfs fuse.sshfs ecryptfs fusesmb devtmpfs"

The CRON.daily on ROSSA only should run each morning at 6:25 (under the ionice class 3 protocol as usual). If this seems OK after a week or so, we can do the same for the other CDS workstations (remembering to adjust their cron.daily times so that not every one hammers the NFS at the same time).

  9925   Wed May 7 23:09:06 2014 rana, jamieSummaryComputer Scripts / ProgramsOttavia back on network

After Jamie fixed the third party repo issue with Ottavia, he was able to upgrade it to Ubuntu 12.04 Precise Pangolin. But its network stopped working.

I tried to fix its issues by ifconfig and GUI, but what it really wanted was for me to put the network cable back into its eth0 slot. The eth1 network card appears not be working anymore.

All seems fine now. Next I will mount the shared user disk from linux1 and put in a .bashrc.

  10013   Mon Jun 9 19:02:34 2014 Evan, EricUpdateComputer Scripts / ProgramsSVN is back

The SVN Apache server was not happy trying to read from /cvs/cds/caltech/svn/; it complains "Value too large for defined data type" when trying to modify certain files.

To remedy this, Eric ran an rsync job to copy over the svn directory to /export/home/svn/, which is directly on nodus rather than on the NFS mount.

Accordingly, I edited the httpd-ssl.conf file in /cvs/cds/caltech/apache/etc/ so that SVNPath points to /export/home/svn. The original config file is preserved as httpd-ssl.conf.old_20140609.

Then I started the Apache server using the instructions on the 40 m wiki (search "Apache"). The SVN now appears to be working fine; you can svn up and svn ci as necessary.

However, this means that we now need to start backing up /export/home/svn/, rather than the NFS-mounted directory.

  10014   Mon Jun 9 20:07:53 2014 nicolasHowToComputer Scripts / ProgramsLatex (math) in the elog

\text{\LaTeX} in the elog

One feature that has been sorely missing in the elog has been the ability to easily add mathematical symbols. Here is an imperfect solution.

There is a browser plugin available for firefox, safari and chrome that allow you to add “markdown” formatting to any rich text input box in the browser. One feature of markdown is latex math formulae.

http://markdown-here.com/

The way it works is you type some latex formatted math text in between dollar signs, click the button in your browser, and it converts them to rendered images.

So this

$E=mc^2.$

becomes this

E=mc^2.

Some drawbacks:

The images are actually rendered through a google service, so if that service changes or goes down, the images won’t render, however the HTML source still contains the source string.
The size of formulae are not really matched to the text.
Going back and forth between rendered and unrendered can lose changes (if you make changes after rendering).

Bonus features:

It also works in Gmail!
You can do code highlighting:

#!/bin/bash   ### this is a comment  PATH=$PATH:/home/user/path    echo "How cool is this?" 

EDIT: it looks like the code highlighting is sort of broken :-(.

  10020   Tue Jun 10 12:49:46 2014 AkhilUpdateComputer Scripts / ProgramsInterfacing UFC-6000 with Raspberry Pi completed

 Goal:

 To interface the Mini Circuits RF Frequency Counter(FC) Model UFC-6000 with Raspberry Pi on Linux platform. Also to create a User friendly interface, to control the FC with command lines.

 

Highlights of the Code(script attached):

The  code enables the user to communicate and control different parameters of the UFC like:

1)Frequency Range Selection( for the device to read different frequencies, AutoRange is set by default).

2)Sampling Time (The time intervals for which the data will be retrieved)

3)Read Device Status(Whether the device is reading data or not).

 

Description of the Code:

HID USB Interfacing by sending byte Values.

 

 1)Read The Freq or Range 

Reading the Freq is done by reading the 1st and 2nd LCD of the Frequency counter.

1st line containing Range information, 2nd line is the Frequency result

the code should be send is 2

1st byte: 2

The returned 64 byte array is as follows:

1st byte: 2

2nd byte to Byte17 the ascii value of 16 characters of the 1st LCD line

Byte18 to Byte33  the ascii value of 16 characters of the 2nd LCD line

 

2) Set the Range  

By default Freq Counter is in "AutoRange" mode.

To set the range manually send the code 4

1st byte: 4

2nd byte: the range value. can be any legal range value. for auto range  need to be 255.

the 64 byte array is:

1st byte: 4

 

3)Set the Sample Time   

By default Freq Counter Sample Time is 1 sec.

you can set the sample time from 0.1 sec and up in step of 0.1 sec.To set the Sample Time send the code 3

1st byte: 3

2nd byte: the sample value in sec double 10.

for example: to set the sample time  to 0.4 sec 2nd byte need to be: 4

the 64 byte array is:

1st byte: 3

 

These bytes can be changed by changing the values of buffer[0] and buffer[1]  in function /*Send Report to the device*/ in the main program.

The data is written into a .txt file(example attached) and the user can  control the recording of data. The frequency data can now be made to talk to EPICS through slow channels.

The data from the .txt file can be used for error analysis at different sampling periods.

 

Results:

The interface of the FC with the Pi is now complete.

 

Plan:

 Make this FC talk to EPICS through slow channels.

 

 

 

 

 

 

  10045   Mon Jun 16 21:22:16 2014 JenneUpdateComputer Scripts / ProgramsRossa having a bad day

[Jenne, Rana]

Today, Rossa has been hanging at bootup.  You get the desktop, and most of the gui things, and can move the mouse pointer around, but clicking the mouse or using the keyboard have no effect.  Once you try clicking something, the mouse pointer turns into the spinning ball, and stays like that.

If, upon rebooting (soft rebooting from another machine, through an ssh session), you hold down the Shift key, you should get to a Grub menu.  If you arrow-key down and select the next-most-recent version (not the recovery mode, but just the regular earlier version), and press Enter, Rossa starts up nice and happily.

I am not sure how to make Rossa always boot into this version of things, or how to get rid of the newest version so that the version that works is the most recent, but I'm hoping one of my Linux buddies will help me out on this one.  I think (maybe) that I need to find out what package was recently updated and could have caused problems, and then revert that one package.  (I think I can look at tail /var/log/apt/history.log to tell me what has recently been updated).

  10046   Mon Jun 16 21:56:53 2014 JenneUpdateComputer Scripts / Programsfstab updates, MC autolocker running, FSS slow loop alive

[Rana, Jenne]

Mc autolocker:

MC autolocker is running.  The trouble was with caput and caget and cavput on Pianosa.  Rana has switched those lines in mcup and mcdown over to ezcaread and ezcawrites, and that seems to have fixed things. For the MC2tickleON and -OFF scripts, we left the caput and caget and cavput, and saw that they do run successfully on Ottavia.  (We tried testing again on Pianosa, and now it seems to be okay with cavput, but we promise it was hanging up on this earlier this evening.)  Anyhow, it's all a bit confusing, but it seems to be running fine now.

The autolocker is now running on Ottavia, and Rana is putting it into Ottavia's cronjob list, and commented it out on op340m.

 

fstab changes:

We have removed the option "all_squash" from /etc/exports on Chiara (both lines).  We then checked that the files have ownership "controls controls" on Chiara, Pianosa and Rossa.  Ottavia still has ownership of "nobody nogroup", so we still need to figure that out. 

 

FSS slow loop:

We confirmed that the slow loop is running.  Also, since caput and caget seem to take a while, and the real PID integral gain is the value that we set times a sampling rate, the effective gain had changed.  So, Rana compensated by changing C1:PSL-FSS_SLOWKI from 0.03 to 0.1. 

 

Other thoughts:

Do we have an autoburt saver on another computer, in addition to op340m?  (It's in the op340m crontab list)  We really only want one of these at a time.

 

  10048   Tue Jun 17 12:04:40 2014 manasaUpdateComputer Scripts / ProgramsMC autolocker NOT running, FB needs some attention

MC autolocker and Ottavia

I assume that the MC was left with a fully functioning autolocker enabled and running on ottavia last night.

But as of this morning, the MC autolocker is NOT running alright. The MC was in an unlocked state and the autolocker has been doing nothing to the servo sliders.  I think this was the state of MC since last night as seen on the stripchart.

Since the autolocker has been left to run on ottavia, I tried to look at the cronlogs to see if it running the autolocker script at all. I looked at the list on ottavia and it has the MCautlocker on it cronjobs list and yet doing nothing.

Later, I did a softreboot on ottavia when I could not ssh into it from rossa or pianosa. ssh to ottavia now works just fine.

I am leaving Ottavia at this and returning to the more important job of fixing the MC. I locked the MC manually and am now working on the alignment.

 

Framebuilder

Also, the CDS FE status screen had red lights blinking as if it required an 'mxstream restart'. I did the same and it did not fix the problem. So I tried to restart fb using the usual 'telnet fb 8087'; but could not restart fb that way.

Attached: FE status screen

  10049   Tue Jun 17 16:52:40 2014 ericqUpdateComputer Scripts / Programsautolocker confusion

Quote:

the MC autolocker is NOT running alright.

I'm kind of confused by the current auto locker situation. Somebody renamed the script from autolockMCmain40m to AutoLockMC.csh and did not update the crontab with the new filename. 

Furthermore it doesn't seem like  scripto_cron,a script which keeps the auto locker alive, runs ok on ottavia. When I run this on the command line, it claims that the process is already running, and returns some bunk PID that doesn't correspond to any running process. The script has a line stating setenv OSTYPE solaris , so maybe there's something funky going on with it's pgrep-ing or other command parsing.   

Lastly, if I try running AutoLockMC.csh directly on ottavia, I get a bunch of complaints about pmath and pezcabit not being found. 

  10050   Tue Jun 17 17:04:26 2014 ericqUpdateComputer Scripts / ProgramsFB troubles

Quote:

Also, the CDS FE status screen had red lights blinking as if it required an 'mxstream restart'. I did the same and it did not fix the problem. So I tried to restart fb using the usual 'telnet fb 8087'; but could not restart fb that way.

 FB is acting strange. When ssh-ing in, certain commands cause an inescapable hang, which can't be ctrl-c'd out of. Telling it to reboot does nothing. This kind of situation was seen by me before, when we were getting all the front ends back, I eventually hard rebooted it, hoping it was a one time thing. Guess it's not. 

Looking at the dmesg output, daqd seems to be segfault-ing all over the place. This may be related... Here are some examples:

451314.730502] daqd[17339]: segfault at 7ff589ae3b30 ip 00007ff589ae3b30 sp 00007ff49931dfb8 error 15 in libmyriexpress.so[7ff589ae3000+1000]

[530516.313238] daqd[18442] general protection ip:7f3f2ce73a6c sp:7f3e29949d50 error:0

[530516.313250] daqd[18420] general protection ip:7f3f2ce73a6c sp:7f3e2a19fd50 error:0 in libc-2.10.1.so[7f3f2ce3f000+14c000]

[530516.313262]  in libc-2.10.1.so[7f3f2ce3f000+14c000]

[530516.327083] daqd[18412]: segfault at 3b04c9cd0 ip 00007f3f2ce73a6c sp 00007f3e2a4a7d50 error 4 in libc-2.10.1.so[7f3f2ce3f000+14c000]

[537695.364481] daqd[18489]: segfault at 12dbbcae0 ip 00007fa35a3b8a0a sp 00007fa298381af0 error 6 in libmyriexpress.so[7fa35a399000+28000]

[577316.821618] daqd[18758]: segfault at 7f5c4d3e9b30 ip 00007f5c4d3e9b30 sp 00007f5b5cc23fb8 error 15 in libmyriexpress.so[7f5c4d3e9000+1000]

I'm not inclined to go reboot it right now, but not sure how to address these problems...

 

 

  10052   Tue Jun 17 19:39:29 2014 ranaUpdateComputer Scripts / Programsautolocker confusion

I renamed the Autolocker and described it in the elog from this weekend. To run it, you have to run it from the scripts/MC/ directory (as always). I restarted the autolocker on Ottavia with nohup.

> nohup ./AutoLockMC.csh &

To figure out how to get cron to run it, we will have to debug the difference between linux and solaris pgrep, so that's in progress.

  10054   Wed Jun 18 11:28:19 2014 ManasaUpdateComputer Scripts / Programsautolocker confusion

Quote:

I renamed the Autolocker and described it in the elog from this weekend. To run it, you have to run it from the scripts/MC/ directory (as always). I restarted the autolocker on Ottavia with nohup.

> nohup ./AutoLockMC.csh &

To figure out how to get cron to run it, we will have to debug the difference between linux and solaris pgrep, so that's in progress.

I am NOT convinced that the autolocker script is running or doing anything. The MC was unlocked as of this morning and the autolocker wasn't doing anything to any of the MC servo buttons and sliders. The autolocker control shows that it is 'alive' but it still blinks 'MC down' even after I locked the MC manually. I am suspecting that this might have to do something with the caget and caput in autolock script itself rather than the CRON. I will look into this problem later today.

Moral of the story: The autolocker is not doing its job.

  10056   Wed Jun 18 13:29:48 2014 ranaUpdateComputer Scripts / Programsautolocker confusion

 

 Moral is wrong.

AutoLocker was working fine last night and we observed it to run and do the appropriate mcdown and mcup stuff. Probably something is breaking with it after several hours.

If you have suspicions about the script, best to look through the logs during the first few hours when we had it running yesterday.

  10060   Wed Jun 18 17:38:14 2014 JenneUpdateComputer Scripts / Programsautolocker running again

The MC autolocker is once again running on Ottavia, with the nohup command.  

It was hanging for a long time (at least minutes) on the cavput and the caputs in the MC2 tickle on and off scripts.  I claim that there isn't a good reason to not just use ezcawrite, or whatever the latest and greatest fully functioning function is, so I've changed the cavput to a series of ezcawrites, and all of the caputs are also ezcawrites.  Now I don't see any hanging, and the MC locks itself.

This does not solve the scripto_cron issue, so if Ottavia is rebooted, or the autolocker is otherwise killed, it will not start itself up. 

  10061   Wed Jun 18 18:00:36 2014 ericqUpdateComputer Scripts / Programscontrol room bashrc change

Some time ago, Rana changed the PS1 prompt codes on the control room computers. However, the exit codes of commands weren't being displayed, and there was some lingering color changing after the line. Hence, I changed it to look like this:

PS1='\[\033[0;35m\]\u'
PS1="$PS1\[\033[0;30m\]@"
PS1="$PS1\[\033[0;33m\]\h"
PS1="$PS1\[\033[0;97m\]|"
PS1="$PS1\[\033[0;92m\]\W"                                                 
PS1="$PS1\[\033[0;31m\] \${?##0}"
PS1="$PS1\[\033[0;97m\]>\[\033[0m\] "

The \${?##0} means: display the exit code if it is not zero (which means success). Thus, it only displays the exit code when its something other than what is expected.

  10063   Wed Jun 18 19:30:28 2014 JenneUpdateComputer Scripts / ProgramsRossa having a better day

I have modified the /etc/default/grub file, so that we're loading up the previous linux kernel version on reboot.  Now Rossa boots up (at least one time so far) without any fancy button-pushing.

(Note, if things go south again, we have to push "shift" starting after the Dell screen is gone.  Holding it down while the Dell screen is still up doesn't seem to make it register that you want the grub menu).

The grub file USED to look like:

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

but now it looks like:

GRUB_DEFAULT=2
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=false
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

Note that the first line, GRUB_DEFAULT has changed from 0 (first item in grub menu, if you successfully hit shift and get to it) to 2 (the third item in the list).  I think that the GRUB_HIDDEN_TIMEOUT_QUIET=false is supposed to force it to show the countdown time when you can push shift, but I didn't see any difference there.

To edit this file, you must use "sudo [text editor] grub".  I like emacs, so I used "sudo emacs grub".  After an edit, before a reboot, you must run "sudo update-grub".  Then you can reboot (sudo shutdown -r now is what I use), and hopefully it will boot as you directed.

Right now, the 0th (first) entry in the grub menu is "Ubuntu, with Linux 2.6.32-61-generic".  The 2nd (third) entry is "Ubuntu, with Linux 2.6.32-58-generic".  If we install a new kernel version, the 61 version will bump down in the list, and we'll be booting that, which I assume will fail.  We should not update Rossa until we're ready to go to Ubuntu 12, and when we do, we must ensure that the grub file first line reads GRUB_DEFAULT=0.  (As a side note, the 1st (really 2nd) entry in the grub menu is "Ubuntu, with Linux 2.6.32-61-generic (recovery mode)", which we don't want.  The 58 version has a recovery mode as the next line item, since it alternates version-N, version-N recovery mode, version-(N-1), version-(N-1) recovery mode, etc.)

  10073   Thu Jun 19 14:52:20 2014 not ericqUpdateComputer Scripts / Programscontrol room bashrc change

Quote:

Some time ago, Rana changed the PS1 prompt codes on the control room computers. However, the exit codes of commands weren't being displayed, and there was some lingering color changing after the line. Hence, I changed it to look like this:

PS1='\[\033[0;35m\]\u'
PS1="$PS1\[\033[0;30m\]@"
PS1="$PS1\[\033[0;33m\]\h"
PS1="$PS1\[\033[0;97m\]|"
PS1="$PS1\[\033[0;92m\]\W"                                                 
PS1="$PS1\[\033[0;31m\] \${?##0}"
PS1="$PS1\[\033[0;97m\]>\[\033[0m\] "

The \${?##0} means: display the exit code if it is not zero (which means success). Thus, it only displays the exit code when its something other than what is expected.

  It's a very good plan to always inspect the exit code of your command.  Well done.

  10074   Thu Jun 19 16:49:15 2014 ranaUpdateComputer Scripts / Programsautolocker running again

  We've noticed that the caget/caput and cdsutils take a long time to return the command prompt. The following two ping commands indicate that it may be related to routing or our new BIND9 DNS setup on chiara.

 

 

controls@ottavia|~ > ping -c 5 -D c1sus

 

PING c1sus.martian (192.168.113.85) 56(84) bytes of data.

 

[1403221338.383403] 64 bytes from 192.168.113.85: icmp_req=1 ttl=64 time=0.114 ms

 

[1403221343.386211] 64 bytes from 192.168.113.85: icmp_req=2 ttl=64 time=0.059 ms

 

[1403221348.387666] 64 bytes from 192.168.113.85: icmp_req=3 ttl=64 time=0.060 ms

 

[1403221353.389736] 64 bytes from 192.168.113.85: icmp_req=4 ttl=64 time=0.059 ms

 

[1403221354.390713] 64 bytes from 192.168.113.85: icmp_req=5 ttl=64 time=0.060 ms

 

--- c1sus.martian ping statistics ---

 

 

 

5 packets transmitted, 5 received, 0% packet loss, time 20007ms

 

rtt min/avg/max/mdev = 0.059/0.070/0.114/0.023 ms

 

 

 

controls@ottavia|~ > ping -c 5 -D 192.168.113.85

 

PING 192.168.113.85 (192.168.113.85) 56(84) bytes of data.

 

[1403221463.737857] 64 bytes from 192.168.113.85: icmp_req=1 ttl=64 time=0.078 ms

 

[1403221464.737353] 64 bytes from 192.168.113.85: icmp_req=2 ttl=64 time=0.059 ms

 

[1403221465.737318] 64 bytes from 192.168.113.85: icmp_req=3 ttl=64 time=0.050 ms

 

[1403221466.737316] 64 bytes from 192.168.113.85: icmp_req=4 ttl=64 time=0.052 ms

 

[1403221467.737321] 64 bytes from 192.168.113.85: icmp_req=5 ttl=64 time=0.050 ms

 

 

 

--- 192.168.113.85 ping statistics ---

 

5 packets transmitted, 5 received, 0% packet loss, time 3999ms

 

rtt min/avg/max/mdev = 0.050/0.057/0.078/0.014 ms

 
  10077   Thu Jun 19 22:04:23 2014 ericqUpdateComputer Scripts / Programscaget/caput now return in reasonable time

I think I've fixed the caget/caput issue. Rana's observation that pinging the IP directly was faster than pinging the hostname set me on a path of googling which informed making the following changes to the DNS setup on chiara (specifically, informed by this thread: http://www.dslreports.com/forum/r11836974-BIND-slow-to-reply-over-LAN-Solved)

/etc/bind/named.conf.local has these lines:

zone "martian" IN {
 type master;
 file "/etc/bind/zones/martian.db";
 };
zone "113.168.192.in-addr.arpa" {
 type master;
 file "/etc/bind/zones/rev.113.168.192.in-addr.arpa";
};

The first zone command links hostnames like c1lsc to an IP like 192.168.113.62, but apparently in the second, we need to do the inverse. So, for each line in martian.db like

c1lsc           A       192.168.113.62

I added a line in rev.113.168.192.in-addr.arpa like so:

62 IN PTR c1lsc.martian

This seems kind of silly, but now if you do the host command from a workstation, it can find the hostname associated with an IP. 

controls@pianosa|~ > host 192.168.113.62
62.113.168.192.in-addr.arpa domain name pointer scipe12.martian.113.168.192.in-addr.arpa.
62.113.168.192.in-addr.arpa domain name pointer c1lsc.martian.113.168.192.in-addr.arpa.

[At this point, note that we have a bunch of duplicate entries in https://wiki-40m.ligo.caltech.edu/Martian_Host_Table  with these scipe## hostnames. What are these for?]


 
Now (edited for brevity):
 
controls@ottavia|~ > ping -c 5 -D c1sus
PING c1sus.martian (192.168.113.85) 56(84) bytes of data.
<SNIP>
--- c1sus.martian ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3997ms
rtt min/avg/max/mdev = 0.051/0.075/0.114/0.028 ms
controls@ottavia|~ > ping -c 5 -D 192.168.113.85
PING 192.168.113.85 (192.168.113.85) 56(84) bytes of data.
<SNIP>
--- 192.168.113.85 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3998ms
rtt min/avg/max/mdev = 0.052/0.130/0.380/0.127 ms
 
controls@pianosa|~ > time caget C1:LSC-XARM_GAIN
C1:LSC-XARM_GAIN               0.015
real    0m0.039s
 
controls@pianosa|~ > time caput C1:LSC-XARM_GAIN 0.0151
Old : C1:LSC-XARM_GAIN               0.015
New : C1:LSC-XARM_GAIN               0.0151
real    0m0.054s
 
 
 

 

  10080   Fri Jun 20 11:43:30 2014 ericqUpdateComputer Scripts / ProgramsRestarting ELOG

Manasa let me know that the ELOG was down, and that she used the normal restart procedure, but then all entries were gone. 

This is because the ELOG has been moved on nodus, so going to the old place and running the restart script starts up the old dysfunctional ELOG installation. 

The proper place to restart the ELOG is now nodus:/export/home/elog/start-elog.csh

I'm updating the relevant 40m wiki page now. 

  10084   Fri Jun 20 19:07:44 2014 ranaUpdateComputer Scripts / Programsop340m DNS

I had forgotten to fix the DNS setup on op340m and so our slow, perl, PID loops for the laser were not running well (and that's why the FSS-FAST has been saturating).

I edited /etc/resolv.conf on there and then did /usr/sbin/reboot as super-user.

op340m:~>more /etc/resolv.conf
domain martian
nameserver 192.168.113.104
nameserver 131.215.125.1
nameserver 131.215.139.100
nameserver 131.215.9.49
op340m:~>date
Fri Jun 20 19:06:37 PDT 2014

The FSSSlowServo.pl now seems to be holding the NPRO PZT to ~6 V. I twiddled the PID settings a little bit to make sure nothing was squirrelly. Seems OK. Time constant of the loop is ~1 minute.

As a reminder, op340m runs our autoburt for all the FE machines, VME IOCs, does the watchdog threshold rampdown, and also the RefCav and NPRO temperature control.

  10095   Tue Jun 24 22:46:15 2014 ericqUpdateComputer Scripts / Programsop340m crons

Quote:

The FSSSlowServo.pl now seems to be holding the NPRO PZT to ~6 V. I twiddled the PID settings a little bit to make sure nothing was squirrelly. Seems OK. Time constant of the loop is ~1 minute.

As a reminder, op340m runs our autoburt for all the FE machines, VME IOCs, does the watchdog threshold rampdown, and also the RefCav and NPRO temperature control.

 We had fiddled with the scripts/general/scripto_cron script to try and get the MC auto locker working on ottavia, but in doing so broke op340m's reliance on it to run it's cron jobs, like FSSSlowServo.

I've reverted scripto_cron to its original state, and the FSS slow servo starts up again.  

However, scripts like this that we want to always have on seem to be a better fit, to me, for the init system, like we do with daqd and nds on the FB. op340m's inittab looks different than what I'm used to, so I'm not making any changes; this is just a thought. 

MC autolocker is still being ran from an Ottavia GUI terminal; I'll try to get it consistently running on megatron, as suggested in  ELOG10039, now that caget/caput issues seem to be sorted. 

Addendum: I've changed the MC auto locker script to have megatron as its host. Haven't yet gotten it to run automatically; it's running in a detached tmux terminal. I'll finish it up tomorrow. 

ELOG V3.1.3-