Computing tips

From CompBio
Jump to: navigation, search

Contents

Rebooting systems

Shut the machine off at the power supply. Keep it shut off until the fan is completely stoppped and then repower. This is an essential step to debugging problems.

When you reboot, and if the machine is stubborn on the fscking (at least three attempts have produced the same behaviour), then please comment out the offending disk in /etc/fstab to the machine can reboot gracefully and then try to fix the problem (reformat and/or repartition the drive for example). Use fsck -Cy <disk> if you want to see the progress status and also answer "yes" by default to all its queries (see the man page for more information).

Testing account

An account for testing scripts on the systems has been created. To get into the account type:

 rsh -l testing <host>

where <host> is the name of the system you wish to do testing on. It may be any of the desktops or the farm. This should work if you are logged onto any machine which appears in the .rhosts file in the testing account home directory.

Do NOT use MS Windows conventions

Do NOT use Microsoft Windows conventions, filenames, and files. That is, files with extensions like ".exe" or ".htm", and files containing ^M. This may result in data loss and will end up being your headache.

Most of the systems in the lab have "dos2unix" installed to help with removing ^M's in DOS text files. If you don't have dos2unix, this Perl oneliner will do the trick too:

 perl -p -e 's/\r$//' < dosfile.txt > unixfile.txt

More info is at http://www.google.com/search?q=convert+between+unix+and+windows+text

Web server rules of thumb

Regarding symlink/redirection rules: if it's due a wrong URL that has gotten propagated too much, let's do it using .htaccess. If it's a visible redirect (i.e., for example, we'd like the same html document to be pointed by several files, like index.html, then we'll use symlinks).

Long paths

If you issue "pwd" at the command line, you may see a long path like this:

/tmp_mnt/nas1/shares/maxa/home/username/some/directory/

This is a temporary path that exists only while your files are being accessed on a machine. If someone tries to "cd" into that directory on another machine, it will most likely fail. When publishing (emailing) paths, replace "tmp_mnt" with "hosts". The above path should be:

/hosts/nas1/shares/maxa/home/username/some/directory/

Explanation: When you access /hosts/machine/some/path then the files on machine are automatically mounted on /tmp_mnt/hostname/some/path. This mount expires when access to that path ceases.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox