Skip to content

Carleton Astronet Admin Log Posts

pgplot plotting routine for fortran and c

pgplot is in /usr/share/astro/pgplot/

for it to work correctly, one needs to set two environment variables, which can be done by putting the following two lines into the user’s .cshrc file:

setenv LD_LIBRARY_PATH /usr/share/astro/pgplot:/usr/local/lib
setenv PGPLOT_FONT /usr/share/astro/pgplot/grfont.dat

to compile and link a program with pgplot calls:

pglink.f77 programname for fortran 77 (do NOT include the “.f” extension in programname)
[formerly called linf77pgx]

pglink.f95 programname for fortran 95 (do NOT include the “.f90” extension in programname)
[currently the above invokes the g95 compiler/linker but expects that the source pgm has .f90 ext.]

pglink.c programname for c (do NOT include the “.c” extension in programname)
[formerly called lincpg, I think]

pglink.c.psr programname for c (do NOT include the “.c” extension in programname)
[formerly called lincpgpsr, I think] –links in starlink and psrcat routines in addition to pgplot. If this is ever used, paths in script will have to be updated. However George Hobbs said psrcat no longer needs separate starlink routines.

“locate ” to find a library etc

the way to find if a library or other file (?) is on sys is to say locate libpng

locate looks at a database so it is safer to first say updatedb which may take a while.
(note this is ~similar to “which “, which looks in your path for an executable.)

vnc client installation onto Mirzam (and later Deneb) via rpg

OUT OF DATE as of 2008-11-01.

JMW installed vnc client onto mirzam into /usr/bin.

Download it from http://rpmfind.net/linux/RPM/redhat/9/i386/vnc-3.3.3r2-47.i386.html

I did it as root and it placed a package on desktop. clicking it a few times installed it into /usr/bin

Drew added it to Deneb at a later time.

/usr/share/astro = shared astro directory

this directory is a place for astro software that needs to be shared across all hosts.

for example right now it has some scripts for compiling and linking fortran, c, pgplot, etc.

it also contains jpeg2ps, astrolib, sm, starlink, pgplot ; many of which have not yet actually been installed but only transferred to here. ie they may well have wrong paths. by the way, to add /usr/share/astro to your path (so that this directory is automatically searched for executables), either copy joel’s .cshrc to your home directory, or put into your .cshrc a line that says

set path = (. $path /usr/share/astro)

(this should replace or augment any current such statement in your .cshrc. note that there are three entries inside the parentheses: ‘.’ which means the current directory; ‘$path’ which means whatever the current value of the path is; and ‘/usr/share/astro’, which is what you want to add.)

IDL Arecibo Phil routine “.h” file directory moved slightly to work on algol

NOTE: SEE BOTTOM OF THIS POST FOR UPDATE:

i moved the h subdirectory below rather than at the same level as the gen directory. now idl on algol finds it and starts up fine with phil’s routines:

Now on algol at:

/data/psrdata/usr4/OH/wapp03/philstuff/gen/h

rather than at

as on arcturus at

/data/psrdata/usr4/OH/wapp03/philstuff/h

——————————-
but note that in late May 2006 JMW realized it is more subtle than this:

in /data/psrdata/usr4/OH/wapp03/philstuff/gen/

in aodefdir.pro, i had to define the path to

/data/psrdata/usr4/OH/wapp03/philstuff/

at which point all path difficulties cleared up. so the above “fix” is obsolete (if it ever worked!) In future installations, it should not be necessary to move the h directory.

Converting RAID to LVM-on-RAID

OUT OF DATE as of 2008-11-01.

We decided to convert the Raid1 array to LVM instead of a monolithic partition. This will make life easier.

Commands:

  1. pvcreate /dev/md0
    makes a physical volume out of the RAID array device
  2. vgcreate VolGroup01 /dev/md0
    creates a new volume group to which we can add logical volumes
  3. Use Redhat Logical Volume Management tool to create partitions on the new device
    • /docs (5 gigs)
    • /home (50 gigs)
    • /etc/secret (10 gigs)
    • /data (399 gigs)
  4. Modified /etc/exports on Algol to export the new partitions
  5. Modified /etc/fstab on the client computers to use the new partitions
  • mkdir /docs
  • mkdir /data
  • added lines to /etc/fstab:
    algol:/data /data nfs defaults 1 1
    algol:/docs /docs nfs defaults 1 1
  1. Un-tarred the backups from /bkup, which I created with the command:
    cd /bkup & tar -czvpf home.tgz /home
  2. Untar by going to desired directory and running:
    tar -xzvpf /bkup/secret.tgz
    Both of these commands put the directory INTO the desired directory. Once unpacked, it’s necessary to move the contents to the proper location.
  3. Modified /etc/cron.weekly/quotacheck.cron to be:
    #!/bin/bash
    # Update the database that keeps track of quotas
    # Created by Mark Knight (4.13.06)
    # Modified by Mark Knight (5.06.06)
    quotaoff -a
    quotacheck -agum
    quotaon -a

    exit 0

  4. Also, had to modify /etc/fstab to add quotas back on to the new mount line for /home

All in all, not that hard. The permissions are all correct, so hopefully this was just as easy & painless as I think it was.