User Tools

Site Tools


informatica:hp_xw4400_400sb_topspin31

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
informatica:hp_xw4400_400sb_topspin31 [2014/02/19 16:45]
miquel [Afegir sermnadmin al grup 'nmrsu']
informatica:hp_xw4400_400sb_topspin31 [2014/06/26 11:52]
miquel [Problemes amb 'cf']
Line 879: Line 879:
 chmod 775 * chmod 775 *
 chmod 664 *i chmod 664 *i
-chown root:root acq_control nmrsim.mod shimcntl xwish3+chmod u+s xwish3 
 +chown root:root xwish3
 </code> </code>
  
Line 894: Line 895:
  
 root@cie-55-31:/opt/topspin3.1/prog/mod# ls -l | grep root root@cie-55-31:/opt/topspin3.1/prog/mod# ls -l | grep root
--rwxrwxr-x 1 root  root   3927964 Feb 18 16:53 acq_control +-rwsrwxr-x 1 root  root   6913656 Feb 12  2012 xwish3
--rwxrwxr-x 3 root  root   2852204 Feb 12  2012 nmrsim.mod +
--rwxrwxr-x 1 root  root   2984972 Feb 18 16:39 shimcntl +
--rwxrwxr-x 1 root  root   6913656 Feb 12  2012 xwish3+
 </file> </file>
  
Line 941: Line 939:
   * [[http://149.236.99.91 | Bruker Gradient Amplifier - Device Information]]   * [[http://149.236.99.91 | Bruker Gradient Amplifier - Device Information]]
   * [[http://149.236.99.20 | BSMS Service Web - Main Menu]]   * [[http://149.236.99.20 | BSMS Service Web - Main Menu]]
 +
 +====== Problemes amb 'cf' ======
 +
 +Cada cop que s'executa la comanda ''cf'', surten en pantalla uns missatges d'avís per indicar que el programa no ha pogut crear uns enllaços (//hardlinks//) necessaris pel funcionament del Topspin i que caldrà crear-los a mà. Per exemple,
 +
 +<file>
 +hconfserver
 +
 +Operation not permitted
 +Cannot make link
 +link must be done manually with
 +  ln /opt/topspin3.1/prog/mod/go4 /opt/topspin3.1/prog/mod/acq_control
 +
 +Operation not permitted
 +Cannot make link
 +link must be done manually with
 +  ln /opt/topspin3.1/prog/wobble/pp_birds /opt/topspin3.1/prog/wobble/pulsprog_X
 +</file>
 +
 +Per resoldre provisionalment el problema,
 +  * he escrit un petit //script// amb les comandes a executar per crear els enllaços i copiar un fitxer (''shimcntl'') que de vegades desapareix quan s'executa la comanda ''cf''; i
 +  * he configurat el sistema perquè l'usuari //sermnuab// pugui executar aquest //script// amb els permisos necessaris.
 +
 +Així doncs, després d'executar la comanda 'cf' al Topspin,
 +
 +<WRAP center round tip 60%>
 +  * obre una finestra per comandes, i
 +  * escriu la següent ordre:\\ ''sudo /home/sermnuab/bin/fix_topspin31.sh''
 +</WRAP>
 +
 +el resultat de la comanda hauria de ser semblant a,
 +
 +<file>
 +sermnuab@cie-55-31:~$ sudo /home/sermnuab/bin/fix_topspin31.sh 
 +
 +creating file '/opt/topspin3.1/prog/wobble/pulsprog_X'
 +`/opt/topspin3.1/prog/wobble/pulsprog_X' => `/opt/topspin3.1/prog/wobble/pp_birds'
 +442373 -rw-rw-r-- 2 nmrsu nmrsu 686 Oct  5  2012 /opt/topspin3.1/prog/wobble/pp_birds
 +442373 -rw-rw-r-- 2 nmrsu nmrsu 686 Oct  5  2012 /opt/topspin3.1/prog/wobble/pulsprog_X
 +
 +creating file '/opt/topspin3.1/prog/mod/go'
 +`/opt/topspin3.1/prog/mod/go' => `/opt/topspin3.1/prog/mod/go4'
 +368896 -rwxr-xr-x 2 nmrsu nmrsu 3927964 Oct  5  2012 /opt/topspin3.1/prog/mod/go
 +368896 -rwxr-xr-x 2 nmrsu nmrsu 3927964 Oct  5  2012 /opt/topspin3.1/prog/mod/go4
 +
 +creating file '/opt/topspin3.1/prog/mod/acq_control'
 +`/opt/topspin3.1/prog/mod/acq_control' => `/opt/topspin3.1/prog/mod/go4'
 +368896 -rwxr-xr-x 3 nmrsu nmrsu 3927964 Oct  5  2012 /opt/topspin3.1/prog/mod/acq_control
 +368896 -rwxr-xr-x 3 nmrsu nmrsu 3927964 Oct  5  2012 /opt/topspin3.1/prog/mod/go4
 +
 +creating file '/opt/topspin3.1/prog/mod/shimcntl'
 +`/home/sermnuab/bin/shimcntl' -> `/opt/topspin3.1/prog/mod/shimcntl'
 +368675 -rwxr-xr-x 1 nmrsu nmrsu 2988748 Jun 26 11:46 /opt/topspin3.1/prog/mod/shimcntl
 +</file>
 +
 +Pels més curiosos, aquest és el contingut del script,
 +
 +<code>
 +#!/bin/sh
 +#******************************************************************
 +#
 +# Copyright (c) 2014
 +# SeRMN, Universitat Autonoma de Barcelona
 +#
 +#******************************************************************
 +# DESCRIPTION
 +#
 +# When TopSpin 3.x runs on a Debian GNU/Linux, the 'cf' command
 +# fails to create several hard links needed to run the software,
 +# and to (re)create the program 'shimcntl'.
 +
 +# To fix this problem,
 +# 1. run 'cf' and ignore all warnings and errors about not
 +#    being able to create hardlinks.
 +# 2. run this script. It requires root permissions to create, hence,
 +#     this script upon running the 'cf' command.
 +#
 +#******************************************************************
 +
 +echo ""
 +
 +# link pulsprog_X to pp_birds
 +echo "creating file '/opt/topspin3.1/prog/wobble/pulsprog_X'"
 +ln -fv /opt/topspin3.1/prog/wobble/pp_birds /opt/topspin3.1/prog/wobble/pulsprog_X
 +ls -li /opt/topspin3.1/prog/wobble/pp_birds /opt/topspin3.1/prog/wobble/pulsprog_X 
 +echo ""
 +
 +# link go to go4
 +echo "creating file '/opt/topspin3.1/prog/mod/go'"
 +ln -fv /opt/topspin3.1/prog/mod/go4 /opt/topspin3.1/prog/mod/go
 +ls -li /opt/topspin3.1/prog/mod/go /opt/topspin3.1/prog/mod/go4
 +echo ""
 +
 +# link acq_control to go4
 +
 +# NOTE: apparently, this link is only required on the AvanceIII-600.
 +# Remove or comment out these lines on the AvanceIII-400sb.
 +#
 +echo "creating file '/opt/topspin3.1/prog/mod/acq_control'"
 +ln -fv /opt/topspin3.1/prog/mod/go4 /opt/topspin3.1/prog/mod/acq_control
 +ls -li /opt/topspin3.1/prog/mod/go4  /opt/topspin3.1/prog/mod/acq_control
 +echo ""
 +
 +# copy shimcntl to /opt/topspin3.1/prog/mod/
 +echo "creating file '/opt/topspin3.1/prog/mod/shimcntl'"
 +cp -fv /home/sermnuab/bin/shimcntl /opt/topspin3.1/prog/mod/
 +chown nmrsu:nmrsu /opt/topspin3.1/prog/mod/shimcntl
 +chmod 755 /opt/topspin3.1/prog/mod/shimcntl
 +ls -li /opt/topspin3.1/prog/mod/shimcntl
 +echo ""
 +</code>
 +
 +i aquesta la línia on es configura el programa ''sudo'' perquè //sermnuab// pugui executar aquest //script// amb permisos de superusuari (o //root//).
 +
 +<file>
 +# Allow sermnuab to fix some problems related to running Topspin 'cf' command.
 +sermnuab  ALL=(root) NOPASSWD: /home/sermnuab/bin/fix_topspin31.sh
 +</file>
  
  
  
  
informatica/hp_xw4400_400sb_topspin31.txt · Last modified: 2020/07/09 13:05 by miquel