Skip to content

Carleton Astronet Admin Log Posts

Hitting disk space limit? Near disk quota?

If you see funny behavior on your account, it might be that you are running out of disk space.
A good citizen might do the following every few months, but that ain’t me babe.

The command :   quota         will tell you how close you are to your quota.

If you are close (or over!!!), then it’s probably junk files doing it, which can safely be trashed.

But how to find the culprits?  How to separate the chaff from the wheat?

(See update at bottom for some of Bruce’s tips on how to find offending files,
but immediately below this line are Joel’s less sophisticated directions.)

du -ak | sort -n | tail   will give you a list of the biggest dozen or so files.  That, of
course, doesn’t necessarily mean they are trash.  But common places
with lots of trash are (in my experience)

<your home directory>.Mathematica/Paclets/Temporary      (note the dot before Mathematica!)                                      This often has enormous garbage there. Clear out any contents (but
probably not the directory “Temporary” itself.). I had the courage to byte
this bullet after reading
https://mathematica.stackexchange.com/questions/64130/mathematica-appdata-folder-is-taking-up-too-much-space
Note that the comment there also makes the reasonable statement that
the contents of any directory called Temporary or the like are fair game!

<your home directory>.mozilla/firefox will have one or more directories with gibberish names.
(note the dot before mozilla!)
If there is more than one, than trash all but the newest.

For me at least, even in the newest, I had a cache2 directory whose enormous contents I
trashed.  I also googled how to force firefox to automatically clear its cache
whenever firefox is logged out so that this garbage doesn’t accumulate!


Here are Bruce’s more sophisticated directions from an email on July 15, 2024:

I ran this report:
du -hx /var/share/home/curtina | grep -P ‘^[^\s]+M’

 

 

 

IDL’s array index special handling, including the colon ( ‘:’ ) and the asterisk ( * )

Note that IDL 2-dimensional arrays are given as Z[A,B] where A is column ref; B is row ref

x[*] means take each element of x (separately), so

x[*] = y[*] means,
x[0] = y[0], x[1] = y[1], … up to all elements of the arrays

x[0:2] is essentially does the same but on a subset of an array; eg
take elements 0 through 2 of the array (and do “whatever”)

I read also that this notation, esp on lhs, is much much faster than
conventional looping etc.

link example ln -s

Here is a successful example of linking a file that really exists in subdir of PersArmNoIntarm,
up to a phake one in main PersArmNoIntarm.  Note I am doing it FROM desired location of
phake.  I say to ln -s the original, down in subdir, to “dot” which is current (main) dir:

PersArmNoIntArm> ln -s OutputFromLocBoots/PersNoIntArmvsLocSlopes.20240717_S.Summ.eps .

print idl’s path and see if it can find a file within it and note capitalization conventions

IDL> print, file_which(‘chjuldaytolmstGALFA.pro’)
/usr/share/astro/idlshare/locallib/chjuldaytolmstGALFA.pro

 

and more specifically:

from https://stackoverflow.com/questions/29986130/idl-procedure-wont-compile

IDL procedure won’t compile

But when I try to find the procedure using “Findpro” I get

Procedure CHLOADCT found in directory  /data/clh93/colortables/CH/

So my paths are right. I don’t understand why it won’t find my procedure, does anyone know what’s going on?

Answers:

Things to check in situations like this:

  1. you are consistent about whether the routine is a function or procedure, i.e., routine is procedure and you are calling it as a procedure
  2. routine you are calling is either compiled already or the last routine in a file named the same as it with a .pro extension; the case of the filename and routine call must match or the filename must be all lowercase (just use all lowercase in filenames!)
  3. quick check to see if my_routine.pro is in your !path:
    IDL> print, file_which('my_routine.pro')
    

    It will return an empty string if it can’t find it.

  4. make sure the file is not in your !path twice and you are getting someone else’s or an old version

Detect input (read) error without crashing program. Complicated fortran-like reads

Fortran has the ability to send one somewhere upon an I/O error:

read(43,100,end=50) x,y,z         in which case program will go to statement labeled “50′ upon a read error.

IDL does not have such a simple way to do it. But after many hours, I got an equivalent process to work.  An example is in the
/data/psrdata/rmgalprojs/rm2016/AO_Pulsars_RM/Longi_RM_Plots.pro file, specifically in
the PersArmNoIntArm data input section.

——————————————————————————

The same section of code illustrates painful read in of a complicated data file, where a single (long) row had been turned into six. It is similar to but not quite identical to fortran. I had to eliminate all format = ‘(sd;jkfsd;jkg)’ statements because idl and i (≡fortran) did not interpret them the same. Instead I had to force variables to have the right type before reading data into them, by initializing them.  For example, to read the following variables properly, i did things like:

ztext = ‘  ‘
xfloat = 3.5
ydoubleprecision=8.d0

Then when I read a file into those variables from a file , idl will treat those variables as the types given in the initialization statements.

When Mirzam can’t be ssh-ed or even locally logged into (usually after reboot), thuban2 dirs are not mounted

When Mirzam or Canopus can’t be ssh-ed into (usually after reboot), probably /home and other dirs shared by thuban2 are  not mouned:

/home and other NFS volumes exported by thuban2 probably aren’t mounted.
 
They should have automounted when mirzam was rebooted because they’re listed in /etc/fstab.

The fix is to login as root (which does not require /home) and then run the ‘mount -a’ command.

Bruce

Joel adds:  One needs root’s password in order to pull this off! Also after talking with Dan, Aug 2026, I realize that this is done on the client that I can’t log in to; eg canopus or mirzam. Note that Dan suggested sudo mount -a -t nfs (where ‘t’=type), once again on the client eg canopus or mirzam.

Note that the list of thuban2 dirs to be mounted is on canopus or mirzam at /etc/fstab, and that
/usr/share/astro on thuban2 is actually /usr/share/astro_centos7

How to exit vncviewer’s fullscreen mode? full screen

In Jan 2024:

click mouse inside window you want to take in or out of full screen – this gives this window primacy. E.g., vnc

hit <fn> f8 to bring up a menu with “full screen” option at top.*

Now let go of those two keys and that menu should persist

Now either click on full screen or else hit f key

This should toggle in and out of full screen mode.


*If menu is flashing, while keeping the <fn> f8 keys held down, also enter f (yes hand-gymnastics!)

====================================================================

On Sep 9, 2022 I had gave  the following two solutions. Don’t seem to work as of Jan 2024

To exit from full-screen mode, press Ctrl-Alt-Shift-F.

Alternately, press Ctrl-Esc Esc and then right-click on the vncviewer taskbar icon to see the menu.

where files really are on thuban2: /var/share (But not so fast for /usr/share/astro/ !)

e.g.  /var/share/data/psrdata

and /var/share/home/jweisber
(note that when I first log in to thuban2, I go to a wrong  /home jweisber  )

–joel 20220804

(But not so fast for mirzam’s /usr/share/astro/ “real” location on thuban2:

when I did a “mount” command on mirzam on 20231231, I discovered that

/usr/share/astro/ on mirzam is really on thuban2’s /var/share/astro_centos7/    !  )

–joel 20231231

tl;dr:  this stems from our upgrade from centos6 to 7. The directory still occupying thuban’s
/var/share/astro/ is a carcass from centos6 days!