Miscellaneous Notes for Admins
Admin notes for the OSU Physics lab computers
This is meant to be a page describing non-standard things done to the computers to make them work properly. In all cases, the standard way was attempted, but for some reason did not seem to work, or was unsuitable.
Mathematica and Maple license files
Because we use SystemImager to manage our labs, I had to come up with a method to have generic Mathematica and Maple license files so that I wouldn't have to manually do each one after an image deployment.For Mathematica, we switched to using the COSINe license server. This will give licenses out to computers inside the oregonstate.edu IP range (128.193.xxx.xxx). The mathpass file then looks like this:
################
!lic.science.oregonstate.edu
################
For Maple, the license.dat file can have multiple entries. Maple will only use the one that matches the machines HOSTID (MAC address). Setting this up is a bit of a pain in that you must individually license each machine, then put all of the resulting license.dat file entries into one large file. It then looks something like this:
################ There are ones above and below the shown entries here, one for each computer ######
#wngr497-pc06
FEATURE Maple10WithExcel maplelmg 2007.0430 permanent uncounted \
HOSTID=00123f5cef48 PLATFORMS="i86_n ppc_mac i86_r i86_g" \
ISSUER=Maplesoft ISSUED=28-apr-2006 NOTICE="Oregon State \
University" SN=xxxxxxxxxxxxxxxx TS_OK SIGN=17530B9C702C
#<FileName>license.dat</FileName>
#wngr497-pc07
FEATURE Maple10WithExcel maplelmg 2007.0430 permanent uncounted \
HOSTID=00123f5e1e30 PLATFORMS="i86_n ppc_mac i86_r i86_g" \
ISSUER=Maplesoft ISSUED=28-apr-2006 NOTICE="Oregon State \
University" SN=xxxxxxxxxxxxxxxx TS_OK SIGN=88B9664A6FE6
#<FileName>license.dat</FileName>
################
where the SN has been changed to protect the innocent.
When new machines are added or MAC's change, just relicense Maple and add to the license.dat file. Make sure it is also updated on the image on physics-server so that the next time an image is pushed, it doesn't break.
Mathematica error messages and getting the scroll wheel to work
On Linux machines with Mathematica installed, whenever Mathematica is started the following error messages show up and show up periodically after started:Warning: Actions not found: delete-next-characterThis is a known problem and a fix is outlined on a support page on Wolfram.com. The only thing I did different was I added both lines to the Xresources file it mentions so the Xresources file looks like this:
!===========================================================================
! XMathematica
!===========================================================================
XMathematica*XmText.translations:
XMathematica*Text.translations:
This is right below the "Default Mapping for delete" section at the top of the file.
The mouse fix for Mathematica requires that imwheel be installed. This can be found at the sourceforge page. Installation is a standard ./configure & make & make install. Then, the following changes are added to the /etc/X11/imwheel/imwheelrc:
#############
# this scrolls the window by a couple line in Mathematica 5.0
"XMathematica"
None, Up, Control_L|Up|-Up|-Control_L
None, Down, Control_L|Down|-Down|-Control_L
Shift_L, Up, Page_Up
Shift_L, Down, Page_Down
Control_L, Up, Page_Up, 2
Control_L, Down, Page_Down, 2
#############
Then, Mathematica should be called with a wrapper script (ie. make a global script named mathematica in a directory in the $PATH) with the following text:
#!/bin/sh
# `-r' flag means don't use the "Configurator"
# and pass wheel events to the root window
imwheel -r
/usr/local/Wolfram/Mathematica/5.2/Executables/mathematica $1
imwheel -kq
#############
That should fix the scroll in Mathematica.
There are 2 other problems to fix
The num-lock key breaks Mathematica so that Shift-Enter doesn't work and neither does the backspace. The fix is described here at this site.
The other thing that I have found, (at this point only applicable to my workstations, not the lab computers since I haven't installed it yet) if if XGL/Compiz is installed, the text becomes unreadable as the opacity of the window is not 100% as it should be. After some googling, I found the following fix that seems to work.
Edit the XMathematica file as described in this post by gringo and magbenji. That seems to fix it.
Global hosts file
I have made a global hosts file so that communication between workstations does not have to be fully-qualified (ie. wngr412-pc01 vs wngr412-pc01.physics.oregonstate.edu)######### Added to end of /etc/hosts ###########
128.193.97.4 wngr412-pc01.physics.oregonstate.edu wngr412-pc01
128.193.97.5 wngr412-pc02.physics.oregonstate.edu wngr412-pc02
128.193.97.6 wngr412-pc03.physics.oregonstate.edu wngr412-pc03
.....
###########
Unmounting of NFS drives
A description of the setup and the problem:
There are 2 mounts that are to be done via NFS on our system. The first is the /usr/local and the second is the home directory. /usr/local/ is mounted via the vfstab and is working fine. This mount should always be available whether anyone is logged in or not. This mount serves as a location for some global files and programs.
The actual problem was with the home directories. User accounts are set up via NIS (at some point, I will have another document describing this setup), but the home directories mount using the auto.master and auto.home files. This was working fine, meaning that the directories would mount and user could log in and use the files, but when the user logged out, the directory would stay mounted, permanently. This was causing undo strain on the file server.
Things that were tried:
Manually unmounting works, but is undesirable.
In the file auto.master, there is an option for --timeout=120. This should have worked, and is the preferred method. This would automatically umount the directory after 2 minutes of no use. For some reason, this is ignored in Suse.
Solution:
Fix involved 3 things. First was to upgrade the version of automount to 4.1.4 from 4.1.3. However, this alone did not fix the problem. I had to modify the source code of the automount and then do the ./configure, make, make install. Here is the modification that I made:
In the file daemon/automount.c (after the files were
unzipped), at about line 857
original
case EXP_STARTED:
/* Wait until expiry process finishes */
sigprocmask(SIG_SETMASK, &ready_sigs, NULL);
return 0;
modified
case EXP_STARTED:
/* Wait until expiry process finishes */
ap.state = ST_EXPIRE;
sigprocmask(SIG_SETMASK, &ready_sigs, NULL);
return 0;
I have no idea why this is required (something about a race condition), but I found the info from here:
After this change was made, I did a ./configure, make, and then put the files in a global location to make it easier to apply to all machines. In my case, this was /usr/local/autofs-4.1.4/. I then wrote a little script (must be ran as su) that then did the make install and also fixed the auto.master and autofs files that were created during the install, as these were not the correct ones. Here are those files.
Note that the autofs file was just the original one from before
the install.
note:
The next part of the fix was mostly trivial, and is actually done in my auto.master. This was to change the timeout option to be ---timeout 120 instead of --timeout=120. For some reason, Suse needs an extra dash and also cannot use the equals sign
Things I still need to add to here
Configuration for NIS and NFS, installing ATI drivers. If I ever get around to doing it, XGL/compiz or Beryl setup (I need to test this more in a production environment. I may also wait until I upgrade workstations to openSuse 10.2).| Attachment | Size |
|---|---|
| auto.home.txt | 43 bytes |
| auto.master.txt | 361 bytes |
| autofs.txt | 8.74 KB |
| fix.txt | 236 bytes |
