User guide at SBC


Table of Contents

1. Introduction
2. New computer users
2.1. Applying for a new user account
2.2. The first day you arrive
2.3. When you log in for the first time
2.3.1. Adjust your ~/.bashrc and ~/.bash_profile
2.3.2. Adjust your ~/.ssh/config
2.3.3. Set thunderbird as your preferred mail client
2.3.4. Set "Visual effects" to "None" in gnome-appearance-properties
2.3.5. Get informed about the support policies
3. Leaving
3.1. Clean your work place
3.2. Don't leave things at the office
3.3. Organize your computer account
3.3.1. Try to reduce your afs usage
3.3.2. Try to reduce the number of files
3.3.3. Adjusting file permissions
3.3.4. Make a personal copy of your files before leaving
4. SciLifeLab documents
4.1. SciLifeLab Policy Document
5. Keys and entrance cards
5.1. Entrance card to SciLifeLab
5.2. Key to drawer at Roslagstullsbacken 35
5.3. Lockers at SciLifeLab
6. Snail mail and packages
6.1. Addresses for mail
6.1.1. Address for letters
6.1.2. Address for courier and business parcels
6.2. Sending
6.2.1. Internal mail
6.2.2. External mail
6.3. Receiving
6.3.1. Mail slots
6.3.2. Delivery schedule
7. Computers
7.1. Never disconnect the Linux desktop computers
7.2. Dell Dimension 5000
7.3. Dell 1905P UltraSharp Flat Panel Monitor
7.3.1. rotating the screen
8. Personal data on the web
8.1. Staff at www.sbc.su.se
8.2. Staff at www.su.se
9. User accounts
10. Passwords
10.1. Policy about passwords at SBC
10.1.1. You must not reuse a password for different things
10.1.2. Make your passwords hard to guess
10.1.3. You are required to write down all your passwords at SBC on a paper and store it at home
10.2. The passwords at SBC
10.2.1. Password for desktop computers
10.2.2. Password for mail.sbc.su.se
10.2.3. Password for www.sbc.su.se
10.2.4. KTH kerberos password
10.2.5. kth.se password
10.2.6. Password for subversion
10.2.7. Password for SciLifeLab email
10.2.8. Password for homer.scilifelab.se
11. Email
11.1. Your email address
11.2. Email clients
11.3. SciLifeLab email address
11.3.1. Getting a SciLifeLab email address
11.3.2. Web interface for your SciLifeLab email address
11.3.3. Using an email client to access your SciLifeLab email address
11.4. Email client settings
11.4.1. Password and username in the mail system
11.4.2. Receiving mail
11.4.3. Sending mail
11.5. Webmail
11.6. Mailing lists
11.6.1. Mailing lists that you will automatically be subscribed to
11.6.2. Mailing lists you need to subscribe to yourself
11.6.3. Creating a new mailing list
11.7. Forwarding mail
11.8. Spam
11.9. mail.sbc.su.se is shutting down 1 October 2013
12. Getting started with Linux
13. Responsibility over computer administration
13.1. sysadmin-administrated computers
13.2. user-administrated computers
14. File services
14.1. file server homer.scilifelab.se
14.2. AFS
14.2.1. Getting tickets
14.2.2. Verify validity of tickets
14.2.3. Your AFS home directory
14.2.4. Quota
14.2.5. Backup
14.2.6. Limits
14.2.7. fs sysname
14.2.8. More AFS documentation
14.2.9. Current status of the AFS file servers
14.3. AFS at SU.SE
14.4. HSM at PDC
14.5. Local hard drive
14.5.1. /scratch
15. Chromium web browser
15.1. Run chromium with the profile on the local harddrive
16. Subversion
16.1. Subversion book
16.2. Repositories at svn.sbc.su.se
16.2.1. Group repositories at svn.sbc.su.se
16.2.2. Project specific repositories at svn.sbc.su.se
16.3. Repositories and access rights
16.4. Some advice on usage
17. Printing
17.1. Printing from Linux desktop computers
17.1.1. printing from the command line with lpr
17.1.2. lpstat
17.2. Printers
17.2.1. Printers at SBC (Roslagstullsbacken 35)
17.3. Printing queues
17.4. Transparencies
17.5. Printing syntax highlighted source code
18. Digital camera
19. Memory card reader
20. Scanners
20.1. Ricoh scanners
21. Burning CDROMs and DVDs
22. static and dynamic web content
22.1. Publishing static web content at www.nada.kth.se
22.2. publishing dynamic web content at www.nada.kth.se
22.3. web server on www.sbc.su.se
22.3.1. WebDAV at www.sbc.su.se
22.3.2. creating web content on www.sbc.su.se
22.4. Writing secure CGI
22.5. Testing your CGI scripts on your local Linux desktop with Konqueror
23. Servers running as KVM
23.1. List of KVMs
23.2. Log in with SSH to a KVM
23.3. Accessing port 80 and port 443 of a KVM
23.4. HTTP reverse proxy
23.5. KVM administrator
23.6. Requesting installation of a new KVM
23.7. rebooting a KVM
23.8. rebooting a KVM that is hanging
23.9. Security updates on the KVM
24. Commercial software
25. Sukat account
26. Reading e-journals
27. Doing presentations
27.1. Presentation software
27.2. Video projectors
27.2.1. Video projector in RB35
27.2.2. Portable video projector
27.3. Computer for the seminar room
28. KTH network secret
29. Eduroam
29.1. Configure Eduroam for a kth.se account
29.1.1. Configure Eduroam for a kth.se account for Ubuntu Linux
29.1.2. Configure Eduroam for a kth.se account for Mac Os
29.1.3. Configure Eduroam for a kth.se account for Windows
29.2. Configure Eduroam for a KI email account
29.3. Configure Eduroam for a Sukat account
30. Connecting laptops to the local network
30.1. Internet access for your personal laptop
30.1.1. Wireless ethernet
30.1.2. Wired ethernet
30.2. Security
30.3. Setup
30.4. Wireless lan
30.5. Finding your MAC-addresses
30.6. Laptop printing settings
30.6.1. Linux laptop printing settings
30.6.2. MacOS laptop printing settings
30.6.3. Windows laptop printing settings
31. b6.biotech.kth.se 72 Gb RAM computer
32. Compute cluster resources
32.1. Getting cluster compute time
32.1.1. Large scale application
32.1.2. Medium scale application
32.1.3. Small local allocation
33. UPPMAX
33.1. applying for a computer account at UPPMAX
33.2. Tintin cluster
33.3. Kalkyl cluster
34. Ferlin cluster
34.1. General
34.2. Log in to the Ferlin cluster
34.3. Commands
34.3.1. esubmit
34.3.2. spq
34.3.3. sprelease
34.3.4. spusage
34.3.5. spwhen
34.4. Interactive and non interactive
34.5. Freely available untrustworthy nodes ( also called interactive nodes )
34.6. Advice on usage
34.6.1. don't write to the same AFS file from many nodes at the same time
34.6.2. Use the local file system as much as possible
34.6.3. 4-hour jobs are preferred
34.6.4. Don't fill the queuing system with too many jobs
34.6.5. Checkpointing
34.7. Scheduler
35. Databases
35.1. mysql
35.1.1. mysql at www.sbc.su.se
35.1.2. mysql at your local desktop computer
36. Firewalls
37. Working from home
37.1. Knoppix
37.2. xlivecd
37.3. Cygwin
38. The Windows computer
38.1. Cygwin
39. Customizing your desktop
39.1. Hardware beep signal
39.1.1. Command line beep signal
39.1.2. Emacs beep signal
39.1.3. Turning off beep altogether
40. Module sub system
40.1. Module usage
41. Installing software
41.1. Installing software with apt-get install
41.2. Install your own software as a module from source code
41.2.1. Installing c/c++ software as a module from source code
41.2.2. Installing perl software from cpan
41.2.3. Installing perl software as a module from source code
41.3. Installing python modules on the cluster
42. Troubleshooting
42.1. General advice
42.1.1. Find the answer with Google
42.1.2. Find the answer on superuser.com or some other Stackexchange web site
42.2. Printing
42.2.1. The print job is not printed
42.3. Subversion
42.3.1. Password for '(null)' GNOME keyring:
42.4. Can't log in
42.4.1. Can't log in to text terminal
42.4.2. Can't log in to desktop computer with ssh
42.4.3. Can't log in to my Gnome desktop
42.4.4. Can't log in to the Ferlin cluster
42.5. Gnome
42.5.1. Could not update ICEauthority file
42.5.2. Gnome desktop configuration disappeared
42.5.3. Resetting the desktop configuration
42.6. AFS
42.6.1. Very slow AFS
42.6.2. Kerberos principal expiration date
42.6.3. Kerberos password expiration date
42.6.4. Non valid tickets
42.6.5. Lost afs tickets after logging out with ssh
42.6.6. connection timed out
42.7. module: command not found
42.8. Problems with keyboard and mouse
42.9. firefox
42.9.1. firefox is slow
42.9.2. killing all firefox processes
42.9.3. firefox asks about user profile
42.9.4. parentlock files are not removed when firefox is shut down
42.9.5. resetting firefox configuration
42.9.6. how to circumvent an AFS bug that stops firefox
42.10. how to log in to text terminal
42.11. Proxy Error: The proxy server received an invalid response from an upstream server
42.12. You've left SBC but you are in need of an old file in your AFS home directory
43. Reboot policy
43.1. Please don't reboot, could you make an exception just for me
44. Support
44.1. How to request support
44.2. Advices for requesting support
44.2.1. Don't request support for private things
44.2.2. Reboot your local desktop computer to see if it solves your computer problem
44.2.3. Check that you don't overuse your AFS file system quota
44.2.4. Keep it work related
44.2.5. Try to accept small inconveniences
44.2.6. Don't do a reply to an unrelated email message
44.2.7. One support request per email
44.2.8. Specify the hostname of the problematic computer
44.2.9. Search the user guide before sending a computer support request
44.2.10. Subject line should describe your support request with a few words
44.2.11. Cut and paste from your shell session
44.2.12. If you have forgotten your password
44.2.13. If you solve your computer support request by yourself
45. Fitness training
45.1. The gym at Albanova
45.2. Fitness training at Stockholm University
46. Links to more information
46.1. Albanova
46.2. Stockholm university

List of Figures

1. Drawer key
2. Mail slot at floor 2 at SciLifeLab
3. Video projector

List of Tables

1. Explanation of some of the fields in PDC:s electronic form
2. Email client settings for Scilifelab email address
3. Email client settings for sbc.su.se email address
4. Default mailing lists at SBC
5. Information needed for a new mailing list
6. Group repositories at SBC Subversion server
7. Printer queues
8. Settings for eduroam
9. Interesting stackexchange.com web sites

List of Examples

1. Finding information about the command wget
2. Recursively changing AFS access permissions
3. Mounting a new AFS volume
4. Your total amount of used AFS space
5. The amount of used AFS space per volume
6. The sum of your AFS quotas
7. Freeing up disk space by compressing files
8. Restore an AFS file from the nightly backup
9. Creating a new project dir in an SVN group repository
10. Burning the content of a directory to a CDROM
11. Restricting access for a web directory
12. Use Konqueror to execute the CGI script /scratch/my_dir/test.cgi
13. Submitting a job
14. Submitting 10 separate jobs
15. Releasing jobs
16. Working interactively on a node
17. Catching the SIGTERM in the job
18. Logging in to your SciLifeLab Linux desktop from home
19. Using cygwin to copy a file to a Linux computer and logging in
20. Install flashplugin with apt-get
21. Install missing include file with apt-get
22. Installing TreeView as module from source code
23. Installing bioperl from source code
24. Installing the Python module networkx from source code
25. Resetting your kde and gnome configurations
26. how to detect which users access your afs file server a lot
27. example of a well written computer support request email

1. Introduction

The primary URL for this document is http://www.sbc.su.se/user-guide/output/user-guide.html.utf8. This document was mostly written by Erik Sjölund. Please send comments about it to

2. New computer users

2.1. Applying for a new user account

Our user accounts are located at PDC. Please follow their instructions. Note PDC:s statement that you could "expect about fourteen days of turn-around time to receive an account", so fill out their electronic form and send in the documents via normal paper mail as soon as possible.

Most of the fields in PDC:s electronic form are obvious but some of them might need an explanation:

Table 1. Explanation of some of the fields in PDC:s electronic form

fieldwhat you should write
Postal address

If your group leader is Erik Sonnhammer type as your address:


Your name
c/o Erik Sonnhammer
SciLifeLab
KISP (Karolinska Science Park)
PO Box 1031
Solna 171 21
SWEDEN

----------------- If your group leader is Lars Arvestad type as your address:


Your name
c/o Lars Arvestad
SciLifeLab
KISP (Karolinska Science Park)
PO Box 1031
Solna 171 21
SWEDEN

------------ If your group leader is Jens Lagergren type as your address:


Your name
c/o Jens Lagergren
SciLifeLab
KISP (Karolinska Science Park)
PO Box 1031
Solna 171 21
SWEDEN

------------------ If your group leader is Arne Elofsson type as your address:


Your name
c/o Arne Elofsson
Department of Biochemistry and Biophysics,
The Arrhenius Laboratories for Natural Sciences,
Stockholm University
Stockholm 106 91

----------------- If your group leader is Lukas Käll type as your address:


Your name
c/o Lukas Käll
SciLifeLab
KISP (Karolinska Science Park)
PO Box 1031
Solna 171 21
SWEDEN

Project:No Current Project
Motivation:I need a kerberos principal to log in to our local SBC systems and to access AFS volumes
Additional commentsI would like to have an AFS home directory volume with 10 Gb space.

Please send an email to some days before you arrive to SBC, so we know when you are coming.

2.2. The first day you arrive

Make sure your read and sign the SciLifeLab Policy Document (see Section 4.1, “SciLifeLab Policy Document”).

2.3. When you log in for the first time

When you log in for the first time you need to:

2.3.1. Adjust your ~/.bashrc and ~/.bash_profile

You need to make sure your ~/.bashrc looks like this

. /etc/profile

and that your ~/.bash_profile looks like this

if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

If these two files don't exit, you need to create them.

2.3.2. Adjust your ~/.ssh/config

To be able to log in to the Ferlin cluster you need to make sure your ~/.ssh/config looks like this

# Hosts we want to authenticate to with Kerberos
Host *.kth.se *.kth.se.
# User authentication based on GSSAPI is allowed
GSSAPIAuthentication yes
# Key exchange based on GSSAPI may be used for server authentication
GSSAPIKeyExchange yes

# Hosts to which we want to delegate credentials. Try to limit this to
# hosts you trust, and were you really have use for forwarded tickets.
Host *.csc.kth.se *.csc.kth.se. *.nada.kth.se *.nada.kth.se. *.pdc.kth.se *.pdc.kth.se.
# Forward (delegate) credentials (tickets) to the server.
GSSAPIDelegateCredentials yes

# All other hosts
Host *

If the file doesn't exit, you need to create it. See also Section 34.2, “Log in to the Ferlin cluster”

2.3.3. Set thunderbird as your preferred mail client

You need to set your preferred mail client to be thunderbird in the menu SystemPreferencesPreferred applications so that thunderbird is being used.

2.3.4. Set "Visual effects" to "None" in gnome-appearance-properties

If you in the menu choose SystemPreferencesAppearance you will start the configuration program gnome-appearance-properties. In the tab "Visual Effects" you need to choose "None". By doing this you avoid some X server bugs that can hang your desktop from time to time.

2.3.5. Get informed about the support policies

As you now are starting to use the SBC computers, you now need to be aware of how to ask support. Read more about it in Section 44.1, “How to request support”. You must not forget to write down all your SBC passwords on a paper and keep the paper in safe place at home ( Section 10.1.3, “You are required to write down all your passwords at SBC on a paper and store it at home” ).

3. Leaving

Nothing lasts forever. You will someday leave SBC. There are something you are responsible for when you leave.

3.1. Clean your work place

No one else will clean your desk before the next employee sitting there arrives, so you need to clean your desk, keyboard, mouse and monitor. If your keyboard is really dirty and you may want to unscrew the screws at the bottom of the keyboard. You could then use water and dish liquid to clean the mechanical upper part of the keyboard.

3.2. Don't leave things at the office

You must not leave anything at the office when you work your last day. In other words it is not possible to use the office as a storage room for e.g. books after you have left.

3.3. Organize your computer account

3.3.1. Try to reduce your afs usage

This section is mostly intended for those of you who consume a lot of AFS usage. If you just can free up some 100 Mb of disk space it may not be worth the effort, but if you can save many Gb, please spend some time looking into this.

You need to take a look in your home directory and see if you somehow can use less file system space. A good idea is to focus on the files taking the most space. First identify big volumes ( see Example 5, “The amount of used AFS space per volume” ).

We saw that the volume "prj.sbc.esjolund00" is big.

[esjolund@otto ~]$ fs lsmount vol01
'vol00' is a mount point for volume '#prj.sbc.esjolund00'
[esjolund@otto ~]$ du -sm vol00/*
3876 vol00/research_dir
90   vol00/smalldir

Here we identified vol00/bigdir as the directory that consumes more disk space. But we didn't check directories and files with names starting with a dot.

[esjolund@otto ~]$ du -sm vol00/.[^.]*
76 vol00/.dot-dir
5  vol00/.some-other-dot-dir
10 vol00/.some-dot-file

[esjolund@otto ~]$ cd vol00
[esjolund@otto vol00]$ find -noleaf research_dir
research_dir
research_dir/file1
research_dir/file3
research_dir/file2

Let us compress the directory ~/vol00/research_dir

[esjolund@otto vol00]$ tar czf research_dir.tar.gz research_dir/

Take a quick look into the generated tar.gz file

[esjolund@otto vol00]$ tar tzf research_dir.tar.gz 
research_dir/
research_dir/file1
research_dir/file3
research_dir/file2

After you are sure it worked, don't forget to remove the original files.

Instead of compressing whole directories you might want to compress the files separately ( see Example 7, “Freeing up disk space by compressing files” )

3.3.2. Try to reduce the number of files

Having hundreds of thousands of files will cause difficulties for the PDC backup system. It will then take a long time for the PDC backup system to traverse the AFS file tree. If possible try to make tar archives dir.tar.gz or dir.tar.bz2 if you have a lot of files that don't need to be directly accessible.

3.3.3. Adjusting file permissions

Talk to your supervisor about what file permissions are suitable for your research directories. It is advisable to at least give read permissions to your supervisor, maybe also write permissions. Maybe the whole research group should be given the same permissions. ( See Example 2, “Recursively changing AFS access permissions” )

3.3.4. Make a personal copy of your files before leaving

If you are leaving SBC you must make a personal copy of all the files in your AFS home directory that you might need in the future. Copy the files to your own personal computer. The normal scenario for people leaving is that PDC is soon disabling access to their AFS home directories.

4. SciLifeLab documents

The SciLifeLab documents are only accessible on the intranet.

4.1. SciLifeLab Policy Document

This document needs to be signed by all people working at SciLifeLab. It contains a lot of different information and rules and is found at http://intranet.scilifelab.se/documents

5. Keys and entrance cards

5.1. Entrance card to SciLifeLab

Entrance card to SciLifeLab is given to you by to Petra Lauritsch ().

5.2. Key to drawer at Roslagstullsbacken 35

Figure 1. Drawer key

Drawer key

You may use the keys to the drawers, but don't forget to leave them here when you stop working at SBC.

5.3. Lockers at SciLifeLab

If you have an office at SciLifeLab you will not get a locker.

If you are a diploma worker, master student, temporary guest or on a shorter contract (less than 6 months) you are supposed to use the smaller lockers. The larger lockers are destinated for those with permanent positions or long term contracts.

Always mark the locker with your name.

6. Snail mail and packages

6.1. Addresses for mail

6.1.1. Address for letters

The address for letters:


SciLifeLab
KISP (Karolinska Science Park)
your name
PO Box 1031
Solna 171 21
SWEDEN

6.1.2. Address for courier and business parcels

The address for business parcels ( företagspaket ) and courier parcels ( DHL, UPS ... ):


SciLifeLab
KISP (Karolinska Science Park)
your name
Tomtebodavägen 23 B
Solna 171 65
SWEDEN

6.2. Sending

6.2.1. Internal mail

There is no internal mail service (in Swedish: internpost) at SciLifeLab, so we use external mail (Posten AB) (see Section 6.2.2, “External mail”) for outgoing post.

6.2.2. External mail

Envelopes and bar code labels are found near the entrance at floor 2.

Envelopes and bar code labels

Put a bar code label on your envelope because they function as stamps.

example letter

You then need to put the envelope in the right most and lowest mail slot (seen in Figure 2, “Mail slot at floor 2 at SciLifeLab”) that is used for outgoing mail.

Where to put outgoing post

The mail slot for outgoing mail is emptyed 15.00 every working day.

6.3. Receiving

6.3.1. Mail slots

If you are a Ph D Student, Postdoc or employee you will get a mail slot at SciLifeLab.

Figure 2. Mail slot at floor 2 at SciLifeLab

Mail slot at floor 2 at SciLifeLab

6.3.2. Delivery schedule

Normally the post for Albanova arrives to the building at 9.30-10.00. Normally between 10.00 and 10.30 the post has been delivered into the post boxes. There is often a small second delivery of postage to the building in the afternoon. Around 15.30 those mails have been delivered to the post boxes. On the wall the time is written for the last delivery.

We see that the last delivery occured at 10.15

7. Computers

SBC has about 50 computers. All of them are normal PC computers. About 5-10 of them are acting as servers. The desktop computers are all running Ubuntu 8.10 Linux but with some exceptions.

7.1. Never disconnect the Linux desktop computers

[Note]Note

Never remove the network cable from the Linux desktop computers. The Linux desktop computers must always be connected to the network.

If you need an extra network slot, please write an email to . You might also be helped by the wireless network ( Section 30.4, “Wireless lan” ).

7.2. Dell Dimension 5000

Description of the connectors. Our Dell Dimension 5000 computers have this specification: Intel Pentium4 2.8 GHz, 2 Gb RAM, 40 Gb SATA HD, DVD-ROM

7.3. Dell 1905P UltraSharp Flat Panel Monitor

User manual

You may need to press the auto-adjust button to improve the focus ( see monitor buttons ).

Dell 1905FP UltraSharp monitors are tiltable and hight adjustable.

7.3.1. rotating the screen

The Intel graphics driver supports rotating of the screen. To rotate

[esjolund@otto ~]$ xrandr -o left

To rotate back

[esjolund@otto ~]$ xrandr -o normal

8. Personal data on the web

Unfortunately there are three different places where information about the personel at SBC is published. The information is not coordinated, so if you for instance change room number, you have to make sure it changes in all three places.

8.1. Staff at www.sbc.su.se

You should find your contact data at http://www.sbc.su.se/contacts. If you are missing or if the information isn't correct, write an email to .

8.2. Staff at www.su.se

All employees at Stockholm University ( note that not all employees at SBC are employees at Stockholm University ) should be found when their names are entered in the search box "Namn:" at Sök bland anställda vid Stockholms universitet. See also Section 25, “Sukat account”.

9. User accounts

Your user account will stop be valid 6 months after you leave SBC. That is ssh-login, email, and web services will be canceled. If you want to extend the life time of your account you have to actively contact Erik Sjölund. Right now even older user accounts are still valid, but cleaning up in the user data base are in the planings.

10. Passwords

10.1. Policy about passwords at SBC

10.1.1. You must not reuse a password for different things

[Important]Important

You must not reuse a password for different things at SBC. Use new unique passwords for each password service.

10.1.2. Make your passwords hard to guess

You should choose a password consisting of digits, lower and upper case letters. If you also use other characters, e.g. ( !/%,#=- ) your password will be even more secure.

10.1.3. You are required to write down all your passwords at SBC on a paper and store it at home

[Important]Important

Please take very good care of your passwords at SBC and don't forget them. You should be able to remember them even after being away on a long vacation so you must write down all your SBC passwords on a paper and keep the paper in safe place at home

10.2. The passwords at SBC

10.2.1. Password for desktop computers

You use your Section 10.2.4, “KTH kerberos password” to log in to the desktop computers.

10.2.2. Password for mail.sbc.su.se

You have one password for all mail services. The same password is also used for logging in to mail.sbc.su.se. If you want to change that password log in to mail.sbc.su.se with ssh and type passwd.

esjolund@otto:~$ ssh mail.sbc.su.se
esjolund@mail.sbc.su.se's password: 
Last login: Tue May 20 10:12:56 2008 from otto.sbc.su.se
[esjolund@boron ~]$ passwd
Changing password for user esjolund.
Changing password for esjolund
(current) UNIX password: 
New UNIX password: 
Retype new UNIX password: 

See also Section 44.2.12.4, “Forgetting the Mail password” and Section 10.1.3, “You are required to write down all your passwords at SBC on a paper and store it at home”

10.2.3. Password for www.sbc.su.se

You are not automatically added as a user to the computer www.sbc.su.se. If you need to publish things on www.sbc.su.se, please send a support request to sbc-sys@sbc.su.se and say that you need an account. If you want to change your password on www.sbc.su.se, first log in to www.sbc.su.se with ssh and type passwd.

esjolund@otto:~$ ssh -p 50011 www.sbc.su.se
esjolund@www.sbc.su.se's password: 
Last login: Tue May 20 12:26:56 2008 from sly.sbc.su.se
[esjolund@zinc ~]$ passwd
Changing password for user esjolund.
Changing password for esjolund
(current) UNIX password: 
New UNIX password: 
Retype new UNIX password: 

See also Section 44.2.12.5, “Forgetting the Web password” and Section 10.1.3, “You are required to write down all your passwords at SBC on a paper and store it at home”

10.2.4. KTH kerberos password

When you start working at SBC you will be given an envelope containing your KTH Kerberos password. That password is used to get valid Kerberos tickets needed to access your AFS home directory and to log in to the cluster ( see Section 14.2.1, “Getting tickets” ). You use the Kerberos password to log in to the SBC desktop computers. At the same time you will get valid Kerberos tickets. To change the Kerberos password type kpasswd on the command line on your desktop computer. See also Section 44.2.12.1, “Forgetting the KTH kerberos password” and Section 10.1.3, “You are required to write down all your passwords at SBC on a paper and store it at home”

10.2.5. kth.se password

With a kth.se password you can get eduroam wireless access (see Section 29, “Eduroam”) or a VPN connection to KTH. Note, the kth.se password is not the same as your KTH kerberos password. ( see Section 10.2.4, “KTH kerberos password” ).

Information about kth.se accounts (written in Swedish)

See also Section 44.2.12.2, “Forgetting the kth.se password” and Section 10.1.3, “You are required to write down all your passwords at SBC on a paper and store it at home”

10.2.6. Password for subversion

When you start working at SBC you are normally given your subversion password. Unfortunately it is not possible to change this password. See also Section 16.3, “Repositories and access rights”, Section 44.2.12.3, “Forgetting the Subversion password” and Section 10.1.3, “You are required to write down all your passwords at SBC on a paper and store it at home”

10.2.7. Password for SciLifeLab email

This password will be given to you by Petra Lauritsch. It is used for the SciLifeLab email address. There is a web interface for the SciLifeLab emails (see Section 11.3.2, “Web interface for your SciLifeLab email address”). There you can change this password. Note, after changing this password, it will no longer match the password for homer.scilifelab.se ( Section 10.2.8, “Password for homer.scilifelab.se” ).

10.2.8. Password for homer.scilifelab.se

This password is the same as the original password for the SciLifeLab email (see Section 10.2.7, “Password for SciLifeLab email”). The password for homer.scilifelab.se can not be changed. So if you have altered the SciLifeLab email password, the two passwords will no longer match.

The password for homer.scilifelab.se is used for the homer file server (see Section 14.1, “file server homer.scilifelab.se”, room booking and for the VPN access (this might change in the future).

11. Email

11.1. Your email address

You have the email address username@sbc.su.se. You can also use firstname.surname@sbc.su.se where any non-english characters have been replaced. For example ö will be replaced by o.

In addition to this also the email addresses username@cbr.su.se and firstname.surname@cbr.su.se end up in the same Inbox.

11.2. Email clients

Use the graphical email client thunderbird. Do not use the email client evolution as it has more bugs. Please set your preferred mail client to be thunderbird ( see Section 2.3.3, “Set thunderbird as your preferred mail client” ).

There is also a terminal based mail client called mutt. But there is no support for it.

11.3. SciLifeLab email address

11.3.1. Getting a SciLifeLab email address

Contact Petra Lauritsch to get a SciLifeLab email account.

11.3.2. Web interface for your SciLifeLab email address

The SciLifeLab email is run by Google and has a web interface. In the field "Username:" specify your new email address "firstname.lastname" and in the field "Password:" specify the email passsword you were given by Petra Lauritsch (see Section 10.2.7, “Password for SciLifeLab email”). If you want to use thunderbird or some of the other supported IMAP clients, you should configure your IMAP client to use imap.gmail.com (port 993).

11.3.3. Using an email client to access your SciLifeLab email address

If you want to use thunderbird or some of the other supported IMAP clients, you should configure your email client like this

Table 2. Email client settings for Scilifelab email address

entryvaluedetails
smtp serversmtp.gmail.comuse secure connection over SSL (port 465) and password authentication
imap serverimap.gmail.comuse secure connection over SSL ( port 993 ) and password authentication

11.4. Email client settings

Table 3. Email client settings for sbc.su.se email address

entryvaluedetails
smtp serversmtp.su.se 
pop servermail.sbc.su.seuse secure connection over SSL ( port 995 )
imap servermail.sbc.su.seuse secure connection over SSL ( port 993 )

11.4.1. Password and username in the mail system

The same password and username is used for the POP server, IMAP server, webmail ( see Section 11.5, “Webmail” ), and for logging in to mail.sbc.su.se with ssh .

11.4.2. Receiving mail

You can use either POP over SSL or IMAP over SSL to receive mail to your mail client. "Over SSL" means that the connection is encrypted. Your mail client may have a check box named "Use secure connection" or something similar. Use that.

If you choose to use IMAP over SSL instead of POP over SSL, you leave the mails on the mail server. This has the advantage that you will see the same mail folders independently of if you use an IMAP mail client from home or one from inside of SBC or if you access your email by webmail ( see Section 11.5, “Webmail” ).

11.4.3. Sending mail

As smtp server specify smtp.su.se in the settings of the mail client. You will only be able to send mail through this smtp server if your computer is located inside of SBC ( or of Stockholm university ).

If you have a SUKAT account ( see Section 25, “Sukat account” ) you can follow the instructions in https://support.it.secure.su.se/kb/entry!default.jspa?categoryID=192&externalID=2963&fromSearchPage=true to configure your laptop to be able to send email through smtp.su.se both from inside and outside the Stockholm University network.

11.5. Webmail

There is web access to our mails through the software squirrelmail. It can be found at https://mail.sbc.su.se/webmail.

First you will have to accept the SSL certificate when your web browser asks you. Then you log in with your normal username but with the password that you use in your mail clients. (That's the same password that you use to log in with ssh to mail.sbc.su.se)

Here are some settings you probably want to change after you've logged into webmail:

  • options -> Personal Information -> Full Name

  • options -> Personal Information -> Email Address

otherwise the mail header FROM: on your sent mails will just be e.g. esjolund@sbc.su.se instead of Erik Sjölund <erik.sjolund@sbc.su.se>

Provided you have been using IMAP in your normal mail client, you should be able to see your mail folders in webmail. If you don't see them, you could check two things:

  • options -> Folder Preferences -> Folder Path ( If your mail folders reside on mail.sbc.su.se in a subdirectory of your home directory, write that directory name here. )

  • Folders -> Unsubscribe/Subscribe ( Squirrelmail only displays folders to which you are subscribed. Subscription is as a way to set folders visibility in IMAP. )

11.6. Mailing lists

SBC is running most of its mailing list with the mailing list software mailman. There is web interface to the mailman mailing lists at SBC.

SBC also uses the mailing lists that are run at SciLifeLab.

11.6.1. Mailing lists that you will automatically be subscribed to

All new users at SBC should automatically get subscribed to the mailing lists sbc@sbc.su.se, sbc-sys@sbc.su.se and seminars@sbc.su.se when they start here. If you notice that you are not a member of these lists, you could sign up at the links below:

Table 4. Default mailing lists at SBC

mailing listdescription
sbc@sbc.su.seeveryone in the SBC
sbc-sys@sbc.su.sediscussion and support forum for the computer systems at SBC
seminars@sbc.su.seseminar announcements (SBC members + others)

11.6.2. Mailing lists you need to subscribe to yourself

After SBC moved to SciLifeLab we also use the mailing lists that are run at SciLifeLab. You are recommended to subscribe to at least the mailing list:

  • bioinformatics@scilifelab.se

You subscribe by filling out a support request at the SciLifeLab helpdesk web form.

11.6.3. Creating a new mailing list

If you want to create a new mailing list, please write a support request email to and provide these details:

Table 5. Information needed for a new mailing list

fieldcomment
name of the mailing listFor instance: seminars@sbc.su.se
descriptionA terse phrase identifying this list. This phrase will be shown in the web interface
list administratorsThe list administrator email addresses. Multiple administrator addresses are ok. . The list administrators are the people who have ultimate control over all parameters of this mailing list. They are able to change any list configuration variable available through these administration web pages.
list moderatorsThe list moderator email addresses. The list moderators have more limited permissions; they are not able to change any list configuration variable, but they are allowed to tend to pending administration requests, including approving or rejecting held subscription requests, and disposing of held postings. Of course, the list administrators can also tend to pending requests.
What steps are required for subscription?Choose between "Confirm and approve" and "Confirm". If you choose just "Confirm" then anyone on the Internet can subscribe without any approval from the list admin.

11.7.  Forwarding mail

If you want to forward all your mail to another email address, create a file .forward in your home directory at mail.sbc.su.se with the content of just that email address.

[esjolund@oxygen esjolund]$ ssh esjolund@mail.sbc.su.se
esjolund@mail.sbc.su.se's password:
[esjolund@boron esjolund]$ emacs .forward
[esjolund@boron esjolund]$ cat .forward
erik.sjolund@home.se
[esjolund@boron esjolund]$

[Caution]Caution

If you create or change the .forward file, please do some tests to see that it works as you expect.

11.8.  Spam

You may get problem of receiving a lot of unsolicited commercial email, commonly called "spam". One way to minimize spam is to set up a mail filter in your email client. Incoming mail is analyzed by the program spamassassin that is running on the mail server at Stockholm University. Spamassassin adds some mail headers to each mail, for instance:


X-Spam-Level: *********
X-Spam-Flag: YES

The more asterisks there are after "X-Spam-Level:", the more probable it is the email is really a spam. You can use that to create a filter rule in your email client to filter all incoming emails containing the text "X-Spam-Level: ********" into a special email folder. You can adjust the number of asterisks to your likings. Make sure to check your spam email folder from time to time, that it only includes spams.

11.9.  mail.sbc.su.se is shutting down 1 October 2013

Our mail server mail.sbc.su.se that hosts all email addresses ending with @sbc.su.se and @cbr.su.se will be shut down Tuesday 1 October 10:00 AM 2013. Already now it's advisable to stop sending emails from those email addresses, i.e. to send emails that have a From-address ending with @sbc.su.se or @cbr.su.se. Use your @scilifelab.se email address instead.

The mail server mail.sbc.su.se also serves as an IMAP server and a POP server. If you would like to keep your emails that are stored on mail.sbc.su.se, you need to move them away yourself before Tuesday 1 October 10:00 AM. One way is to use an email client such as Thunderbird. Select the emails in the graphical user interface and right click. Then choose "Move to" ....

Another way is to just copy the emails with scp

scp -rC esjolund@mail.sbc.su.se:Maildir /path/on/local/computer

The emails are stored in the Maildir-format on our mail server. Note, that it might be difficult to import those files into another email client afterwards.

12. Getting started with Linux

There is a lot of online documentation about Linux. Here are some starting points:

The printed book Running Linux, 4th Edition is also a good read.

Example 1. Finding information about the command wget

If you want to find out information about a command, let's say the command wget you should first look at the man page if available.

[esjolund@oxygen esjolund]$ man wget

you will see something like: ( not the whole man page has been included here )

WGET(1)                            GNU Wget                            WGET(1)

NAME
       wget - GNU Wget Manual

SYNOPSIS
       wget [option]... [URL]...

DESCRIPTION
       GNU Wget is a free utility for non-interactive download of files from
       the Web.  It supports HTTP, HTTPS, and FTP protocols, as well as
       retrieval through HTTP proxies.

       Wget is non-interactive, meaning that it can work in the background,
       while the user is not logged on.  This allows you to start a retrieval
       and disconnect from the system, letting Wget finish the work.  By con-
       trast, most of the Web browsers require constant user’s presence, which
       can be a great hindrance when transferring a lot of data.

       Wget can follow links in HTML pages and create local versions of remote
       web sites, fully recreating the directory structure of the original
       site.  This is sometimes referred to as ‘‘recursive downloading.
       While doing that, Wget respects the Robot Exclusion Standard
       (/robots.txt).  Wget can be instructed to convert the links in down-
       loaded HTML files to the local files for offline viewing.

       Wget has been designed for robustness over slow or unstable network
       connections; if a download fails due to a network problem, it will keep
       retrying until the whole file has been retrieved.  If the server sup-
       ports regetting, it will instruct the server to continue the download
       from where it left off.

OPTIONS
       Basic Startup Options

       -V
       --version
           Display the version of Wget.

       -h
       --help
           Print a help message describing all of Wget’s command-line options.

Some commands also have info pages. Let's see if wget has info pages,

[esjolund@oxygen esjolund]$ info wget

This is then shown on the screen:

File: wget.info,  Node: Top,  Next: Overview,  Prev: (dir),  Up: (dir)

Wget 1.8.2
**********

   This manual documents version 1.8.2 of GNU Wget, the freely
available utility for network download.

   Copyright (C) 1996, 1997, 1998, 2000, 2001 Free Software Foundation,
Inc.

* Menu:

* Overview::            Features of Wget.
* Invoking::            Wget command-line arguments.
* Recursive Retrieval:: Description of recursive retrieval.
* Following Links::     The available methods of chasing links.
* Time-Stamping::       Mirroring according to time-stamps.
* Startup File::        Wget's initialization file.
* Examples::            Examples of usage.
* Various::             The stuff that doesn't fit anywhere else.
* Appendices::          Some useful references.
* Copying::             You may give out copies of Wget and of this manual.
* Concept Index::       Topics covered by this manual.

--zz-Info: (wget.info.gz)Top, 25 lines --All-- Subfile: wget.info-1.gz--------
Welcome to Info version 4.3. Type C-h for help, m for menu item.

It is somewhat similar to a webbrowser. You can navigate in the structure of pages.

Almost all commands have explanations of the command line options listed when you give the flag --help.

[esjolund@oxygen esjolund]$ wget --help  | head -10
GNU Wget 1.8.2, a non-interactive network retriever.
Usage: wget [OPTION]... [URL]...

Mandatory arguments to long options are mandatory for short options too.

Startup:
  -V,  --version           display the version of Wget and exit.
  -h,  --help              print this help.
  -b,  --background        go to background after startup.
  -e,  --execute=COMMAND   execute a `.wgetrc'-style command.

The head -10 was added to cut out the first 10 lines.

Commands are always part of a deb package. The deb package may also have installed other documentation files. You can list all the files from a deb package like this,

esjolund@otto:~$ dpkg -L xsltproc
/.
/usr
/usr/bin
/usr/bin/xsltproc
/usr/share
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/xsltproc.1.gz
/usr/share/doc
/usr/share/doc/xsltproc
/usr/share/doc/xsltproc/AUTHORS
/usr/share/doc/xsltproc/NEWS.gz
/usr/share/doc/xsltproc/README
/usr/share/doc/xsltproc/TODO
/usr/share/doc/xsltproc/copyright
/usr/share/doc/xsltproc/changelog.gz
/usr/share/doc/xsltproc/FEATURES.gz
/usr/share/doc/xsltproc/changelog.Debian.gz

Files named README are often interesting. Let's take a look...

esjolund@otto:~$ cat /usr/share/doc/xsltproc/README

     XSLT support for libxml2 (XML toolkit from the GNOME project)

Full documentation is available on-line at
    http://xmlsoft.org/XSLT/

This code is released under the MIT Licence see the Copyright file.
 
To report bugs, follow the instructions at:
  http://xmlsoft.org/XSLT/bugs.html

A mailing-list xslt@gnome.org is available, to subscribe:
    http://mail.gnome.org/mailman/listinfo/xslt

The list archive is at:
    http://mail.gnome.org/archives/xslt/

All technical answers asked privately will be automatically answered on
the list and archived for public access unless pricacy is explicitely
required and justified.

Daniel Veillard

$Id: README,v 1.7 2003/02/04 17:20:01 veillard Exp $

13. Responsibility over computer administration

13.1. sysadmin-administrated computers

  • You need to be prepared that reboots might happen when security updates are applied to the computer.

  • The computer might occasionally need to be reinstalled ( but partition /dev/sda5 will be kept ).

  • You still have sudo-rights, and can apt-get install things but don't run ./configure && make && make install as root. Installing from source code should be done from a normal user account.

  • You are not allowed to change the local firewall on your computer. If you want to run a service that listens to the Internet ( e.g. a web server, a license server ) you need to administrate your computer yourself ( see Section 13.2, “user-administrated computers” ).

  • You must not block root from being able to log in. ( Make sure that root is listed after the AllowUsers directive in /etc/ssh/sshd_config )

13.2. user-administrated computers

  • There should be one responsible administrator and at the same time contact person for the computer. This information should be stated in computerlist.xml. Instructions of how to update the computerlist.xml file is found in README.txt.

  • The computer should be updated with security updates. This should happen without unnecessary delay. Even if you have turned on automatic security updates, you still need to make sure the security updates are applied. If it is not possible to apply security updates anymore, e.g. due to a too old Linux distribution, the computer should be disconnected from the Internet.

  • It is fully possible to administrate a Linux computer remotely, but if you are not able to administrate your computer, which might happen for instance during holidays, trips or parental leave, you should either appoint the responsibility to another person or the computer should be turned off. If you choose that it should be turned off, please label the computer with some paper and write that it should not be turned on. If you appoint the responsibility to someone else please update the file computerlist.xml.

  • Please limit the users that are able to log in to the computer. You should make sure there is no /root/.ssh/authorized_keys that gives life.sbc.su.se the permission to log in to the computer.

14. File services

14.1. file server homer.scilifelab.se

On the SciLifeLab intranet there is the main documentation for the file server homer.scilifelab.se.

14.2. AFS

The Center for Parallel Computers at KTH is hosting our AFS file services. Each user at SBC has its own AFS directory. PDC is backing up our AFS files and directories each night.

[Important]Important

All your important data in need of backup should be placed in your AFS directory.

14.2.1. Getting tickets

Before you can access your afs directory you need valid tickets. To get tickets that expires in one month type kinit -f -l1month. You will now be asked for your Kerberos password ( see Section 10.2.4, “KTH kerberos password” ). See also Section 42.6.2, “Kerberos principal expiration date” and Section 42.6.3, “Kerberos password expiration date”

14.2.2. Verify validity of tickets

To list your valid tickets use the command klist -v.

[esjolund@oxygen esjolund]$ klist -v
Credentials cache: FILE:/tmp/krb5cc_4495
        Principal: esjolund@NADA.KTH.SE
    Cache version: 4

Server: krbtgt/NADA.KTH.SE@NADA.KTH.SE
Ticket etype: des3-cbc-sha1, kvno 4
Auth time:  Jun  9 10:16:33 2005
End time:   Jul  9 10:16:33 2005
Renew till: Jul  9 10:16:33 2005
Ticket flags: forwardable, renewable, initial
Addresses: IPv4:130.237.93.68

Server: afs/pdc.kth.se@NADA.KTH.SE
Ticket etype: des-cbc-crc, kvno 2
Auth time:  Jun  9 10:16:33 2005
End time:   Jul  9 10:16:33 2005
Ticket flags: transited-policy-checked
Addresses: IPv4:130.237.93.68

Server: afs@NADA.KTH.SE
Ticket etype: des-cbc-crc, kvno 12
Auth time:  Jun  9 10:16:33 2005
End time:   Jul  9 10:16:33 2005
Ticket flags: transited-policy-checked
Addresses: IPv4:130.237.93.68

We see that the validity of the tickets end at July 9 2005. Because the -f flag was used in the kinit command, the ticket got marked as forwardable. This is important when you submit jobs to the cluster. The submitting computer needs to have forwardable tickets.

[esjolund@oxygen esjolund]$ klist -v | grep forwardable 
Ticket flags: forwardable, renewable, initial

See also Section 34.3.1, “esubmit”

14.2.3. Your AFS home directory

Your AFS home directory is your home directory at the desktop machine and at the PDC compute cluster machines.

let us look into the directory $HOME

[esjolund@oxygen esjolund]$ ls -l $HOME
total 8
lrwxr-xr-x    1 esjolund nfsnobody        9 Aug  6  2003 OldFiles -> .OldFiles
drwx------    7 esjolund nfsnobody     4096 Feb  9 17:08 Private
drwxr-xr-x    2 esjolund nfsnobody     2048 Aug  7  2003 Public

AFS is using a more fine-grained type of permissions than the normal unix file system permissions. Let us look at them:

[esjolund@oxygen esjolund]$ fs listacl /afs/pdc.kth.se/home/e/esjolund/Private/
Access list for /afs/pdc.kth.se/home/e/esjolund/Private/ is
Normal rights:
  esjolund:remote-users rlidwka
  system:administrators rlidwka
  esjolund rlidwka
[esjolund@oxygen esjolund]$ fs listacl /afs/pdc.kth.se/home/e/esjolund/Public/
Access list for /afs/pdc.kth.se/home/e/esjolund/Public/ is
Normal rights:
  esjolund:remote-users rlidwka
  system:administrators rlidwka
  system:anyuser rl
  esjolund rlidwka

This means, files that you want to be public and readable from the whole Internet should be placed in the Public directory. Private files that you want to keep for yourself should be placed in the Private directory.

A newly created directory inherits the access permissions from its parent directory.

[esjolund@otto ~]$ mkdir ~/Public/testdir
[esjolund@otto ~]$ fs la ~/Public/testdir
Access list for /afs/pdc.kth.se/home/e/esjolund/Public/testdir is
Normal rights:
  esjolund:remote-users rlidwka
  system:administrators rlidwka
  system:anyuser rl
  esjolund rlidwka

To change the permissions for a directory, use the command fs setacl ( abbreviated fs sa ).

[esjolund@otto ~]$ fs sa ~/Public/testdir system:anyuser l
[esjolund@otto ~]$ fs la ~/Public/testdir
Access list for /afs/pdc.kth.se/home/e/esjolund/Public/testdir is
Normal rights:
  esjolund:remote-users rlidwka
  system:administrators rlidwka
  system:anyuser l
  esjolund rlidwka

Now the anonymous Internet user ( system:anyuser ) can't read the files in ~/Public/testdir anymore. But he can list (l) the file names in the directory.

[esjolund@otto ~]$ fs la ~/Public/testdir
Access list for /afs/pdc.kth.se/home/e/esjolund/Public/testdir is
Normal rights:
  esjolund:remote-users rlidwka
  system:administrators rlidwka
  esjolund rlidwka

Now he can't even list filenames anymore.

Example 2. Recursively changing AFS access permissions

We create two directories ~/research and ~/research/dir

[esjolund@otto ~]$ mkdir research research/dir
[esjolund@otto ~]$ fs la ~/research
Access list for /afs/pdc.kth.se/home/e/esjolund/research is
Normal rights:
  esjolund:remote-users rlidwka
  system:administrators rlidwka
  system:anyuser l
  esjolund rlidwka
[esjolund@otto ~]$ fs la ~/research/dir
Access list for /afs/pdc.kth.se/home/e/esjolund/research/dir is
Normal rights:
  esjolund:remote-users rlidwka
  system:administrators rlidwka
  system:anyuser l
  esjolund rlidwka

to recursively add read permissions to the user maccallr under the directory ~/research

[esjolund@otto ~]$  find ~/research/ -noleaf -type d -exec fs sa {} maccallr  read \;

Let us check the permissions

[esjolund@otto ~]$ fs la ~/research/
Access list for /afs/pdc.kth.se/home/e/esjolund/research/ is
Normal rights:
  esjolund:remote-users rlidwka
  system:administrators rlidwka
  system:anyuser l
  maccallr rl
  esjolund rlidwka
[esjolund@otto ~]$ fs la ~/research/dir/
Access list for /afs/pdc.kth.se/home/e/esjolund/research/dir/ is
Normal rights:
  esjolund:remote-users rlidwka
  system:administrators rlidwka
  system:anyuser l
  maccallr rl
  esjolund rlidwka

Ok, the user maccallr now has read access.

Read more about AFS file permission ( see Section 14.2.8, “More AFS documentation” )

14.2.4. Quota

You can not store more data in a AFS directory than what the quota is set to for the AFS volume it resides in. The command to see the quota is fs listquota.

[esjolund@oxygen user-guide]$ fs listquota /afs/pdc.kth.se/home/e/esjolund/
Volume Name                   Quota      Used %Used   Partition
H.esjolund                   500000     84102   17%         64%

We found out that the quota was set to 500 Mb. That is given to you by default for the AFS volume mounted as your AFS home directory. If you need an additional AFS volumem, please fill in this web form at PDC. In the field "Project information", don't forget to mention that you belong to SBC.

Instead of requesting an additional AFS volume you could also try to make free space available by compressing files ( see Example 7, “Freeing up disk space by compressing files” ).

Example 3. Mounting a new AFS volume

We have a new AFS volume prj.sbc.esjolund00 and we want to mount it at /afs/pdc.kth.se/home/e/esjolund/Private/extravolume . First we could check that the volume name is indeed correct. To list all AFS volumes belonging to a user we do

[esjolund@oxygen esjolund]$ /usr/bin/vos listvldb | egrep "(^|\.)$USER[0-9]*[[:blank:]\.]"
H.esjolund
prj.sbc.esjolund00

Looks good. The volume prj.sbc.esjolund00 was listed.

we go ahead and mount it

[esjolund@oxygen esjolund]$ cd /afs/pdc.kth.se/home/e/esjolund/Private
[esjolund@oxygen Private]$ fs mkmount -dir vol00 -vol prj.sbc.esjolund00 -cell PDC.KTH.SE
[esjolund@oxygen Private]$ fs lq -path vol00/
Volume Name                   Quota      Used %Used   Partition
prj.sbc.esjolund00          5000000         2    0%         74%
[esjolund@oxygen Private]$ ls vol00
[esjolund@oxygen Private]$ fs lsmount -dir vol00
'vol00' is a mount point for volume '#prj.sbc.esjolund00'

Example 4. Your total amount of used AFS space

You could sum up the space used by all your volumes by using a script like this

#!/bin/sh
for i in `/usr/bin/vos listvldb | egrep "(^|\.)$USER[0-9]*[[:blank:]\.]"`;
  do /usr/bin/vos examine $i | awk '{print $4; exit}';
done | awk 'BEGIN {sum=0} {sum +=$1} END {print sum}'

The sum is printed in kilobytes.

Example 5. The amount of used AFS space per volume

To get a list of your volumes and how much afs space they use

[esjolund@otto ~]$ emacs /tmp/a.sh
[esjolund@otto ~]$ cat /tmp/a.sh
#!/bin/sh
for i in `/usr/bin/vos listvldb | egrep "(^|\.)$USER[0-9]*[[:blank:]\.]"`;
  do /usr/bin/vos examine $i | awk '{print $4 " " $1; exit}' ;
done | sort -n
[esjolund@otto ~]$ sh /tmp/a.sh 
276138 H.esjolund
2742928 prj.sbc.esjolund01
4617796 prj.sbc.esjolund00

The used space is printed in kilobytes.

Example 6. The sum of your AFS quotas

You could sum up the quotas of all your volumes by using a script like this

#!/bin/sh
for i in `/usr/bin/vos listvldb | egrep "(^|\.)$USER[0-9]*[[:blank:]\.]"`;
  do /usr/bin/vos examine $i; 
done | awk 'BEGIN {sum=0} $1 == "MaxQuota" {sum +=$2} END {print sum}'

The sum is printed in kilobytes.

Thanks Daniel for the nice scripts!

Example 7. Freeing up disk space by compressing files

If your data files are not already compressed you can save a lot of disk space by compressing them with the command gzip.

[esjolund@otto ~]$ ls -lh file.txt
-rw-r--r-- 1 esjolund users 369K Jun 11 14:16 file.txt
[esjolund@otto ~]$ gzip file.txt 
[esjolund@otto ~]$ ls -lh file.txt.gz 
-rw-r--r-- 1 esjolund users 40K Jun 11 14:16 file.txt.gz

14.2.5. Backup

PDC backs up AFS, but as there is no contract with PDC defining the service level of the backup service, no guarantees can be made here about what type and how often backups are made. Most often, though, backups are taken each night. Some AFS volumes are excluded from the list of backed up AFS volumes but the owners of those AFS volumes have been informed about this when those AFS volumes were created. The last backup of each AFS volume is available online as a read-only AFS volume. The read-only backup volume has the same name as the original but with ".backup" appended to it. For your convenience your home directory volume has its backup volume already mounted at ~/.OldFiles. Note that read-only backup volumes of your extra volumes are not available through ~/.OldFiles, you need to mount them explicitly as seen in Example 8, “Restore an AFS file from the nightly backup”. If you need to get hold of backups that are older than one day, manual operation is required from PDC to retrieve those files ( just use that service if you really need it ). Older backups are distributed more sparse in time than younger backups.

Example 8. Restore an AFS file from the nightly backup

If the file /afs/pdc.kth.se/home/e/esjolund/project/data/my_file.txt was accidently deleted

[esjolund@oxygen esjolund]$ rm /afs/pdc.kth.se/home/e/esjolund/project/data/my_file.txt

we can find yesterdays version of the same file in the directory /afs/pdc.kth.se/home/e/esjolund/OldFiles/project/data. Lets copy that file back to its original place.

[esjolund@oxygen esjolund]$ cd /afs/pdc.kth.se/home/e/esjolund
[esjolund@oxygen esjolund]$ cp OldFiles/project/data/my_file.txt project/data/my_file.txt

If the copy command failed, the reason is probably that the file is located in one of your afs extra volumes.

[esjolund@oxygen esjolund]$ ls OldFiles/project/data/my_file.txt 
fs: File '/afs/pdc.kth.se/home/e/esjolund/OldFiles/project/data/my_file.txt ' doesn't exist

Let us see if any of the underlying directories is a mount point for an afs volume.

[esjolund@oxygen esjolund]$ fs lsmount OldFiles/project/data
'OldFiles/project/data' is not a mount point.

Ok, this directory was just a normal directory.

[esjolund@oxygen esjolund]$ fs lsmount OldFiles/project/
'OldFiles/project/data' is a mount point for volume '#prj.sbc.esjolund00'

Ok, OldFiles/project/data is a mount point for volume #prj.sbc.esjolund00. we need to create a mount point for the backup of this volume.

[esjolund@oxygen esjolund]$ fs mkmount tmp_mount -vol prj.sbc.esjolund00.backup -cell PDC.KTH.SE
[esjolund@oxygen esjolund]$ fs lsmount tmp_mount
'tmp_mount' is a mount point for volume '#prj.sbc.esjolund00.backup'

[esjolund@oxygen esjolund]$ cp tmp_mount/data/my_file.txt project/data/my_file.txt 

The file is restored! Now we can remove the mount point

[esjolund@oxygen esjolund]$ fs rmmount tmp_mount

14.2.6. Limits

The maximum number of files in a directory is 64435. If you try to create one more file than that, you will get the error File too large

dah@s10n42:~/afstest/dah.test.manyfiles/1/0$ touch foo
touch: creating `foo': File too large

openafs has a very slow algorithm for accessing files in a directory with many files. So it's not practical having more than a few thousands of files in a directory. Recommended is instead to group the filenames in different directories. For instances PDC has grouped together all home directories with usernames starting with the same letter. E.g. notice the directory e in the directory path /afs/pdc.kth.se/home/e/esjolund.

14.2.7. fs sysname

When a filename is looked up in AFS the path is searched for directories named "@sys". If such a directory is found, AFS will first try to replace "@sys" with the first string in the list of strings output by the command fs sysname.

esjolund@otto:~$ fs sysname
Current sysname list is 'i386_co5' 'i386_co4' 'i386_fc3' 'i386_rh9'

If the resulting path exists that file will be returned to the user. If the resulting path doesn't exist, AFS will continue trying the other strings in the string list. If no file was found AFS will try to lookup the original file name ( i.e. with the "@sys" ).

The string list from fs sysname is set by root. On our machines the string list is set here:

root@otto:~# grep /root/sbc-setsysname.sh /etc/openafs/afs.conf
AFS_POST_INIT=/root/sbc-setsysname.sh

The string list can be set arbitrarily. We use @sys mainly inside the MODULEPATH environment variable. See also Section 40.1, “Module usage”

14.2.8. More AFS documentation

To learn more about these file permissions and more about afs in general, read the AFS user guide. PDC also has AFS guided tour.

14.2.9. Current status of the AFS file servers

[Tip]Tip

Read the flash news from PDC. Here temporary AFS problems will be listed.

There is a way to find out if an AFS file server is overloaded. First find out on what file server your directory is located.

esjolund@kantarell:~$ fs whereis ~
File /afs/pdc.kth.se/home/e/esjolund is on host pompano.pdc.kth.se 

We can now get some interesting metrics

esjolund@kantarell:~$ /usr/bin/rxdebug pompano.pdc.kth.se | head -5 | tail -2
0 calls waiting for a thread
122 threads are idle

Those values corresponds to the normal healthy condition of an AFS file server with not so high load. But if you on the other hand would see

esjolund@kantarell:~$ /usr/bin/rxdebug pompano.pdc.kth.se | head -5 | tail -2
500 calls waiting for a thread
2 threads are idle

then the AFS server is on a high load which will make everything go very slow. See also Section 42.6.1, “Very slow AFS”

14.3. AFS at SU.SE

Those of you that are employees at Stockholm University have a SUKAT account ( see Section 25, “Sukat account” ). The SUKAT account has its home directory in the AFS service from Stockholm university. The SUKAT account has 50 Mb quota per default, but you can increase this quota to 500 Mb by logging in to the web interface Mitt universitet and changing it.

The web interface also lets you upload and download files to your SUKAT home directory.

To access your SUKAT home directory from your Linux desktop computer, first create a new PAG

[esjolund@oxygen ~]$ pagsh

get Kerberos tickets for your SUKAT account. Note that your username is most probably not the same as your username at SBC.

[esjolund@oxygen ~]$ kinit ersj@SU.SE
ersj@SU.SE's Password:
[esjolund@oxygen ~]$ 

get afs tokens

[esjolund@oxygen ~]$ afslog -c su.se

Can we read and write in the SUKAT home directory?

[esjolund@oxygen ~]$ touch /afs/su.se/home/e/r/ersj/just_a_test
[esjolund@oxygen ~]$ rm /afs/su.se/home/e/r/ersj/just_a_test

Yes!

To exit the PAG, type exit

[esjolund@oxygen ~]$ exit

14.4. HSM at PDC

If you have some directories that take up a lot of disk space and that you use infrequently, you might want to use the HSM facility at PDC. HSM is a file system where files are automatically moved to and from tape depending on how often they are accessed. Read more about how to use HSM in the HSM howto at PDC.

14.5. Local hard drive

Your computing jobs will run faster if they write temporary files to the local hard drive instead of to a network file system.

14.5.1. /scratch

[Important]Important

Do not store anything of value in /scratch . It may be erased anytime without notice.

The idea of /scratch is to have a working area to save unimportant temporary files and a place to save big genome databases that are downloadble from the Internet.

/scratch is available both on the desktop computers and at the cluster nodes. The cluster nodes have their /scratch erased after each job has run.

15. Chromium web browser

The web browser chromium is for most usage better than firefox. If it is not already installed, you can install it by running

root@otto:~# apt-get install chromium-browser

15.1. Run chromium with the profile on the local harddrive

If you have your home directory in AFS (as most users)

esjolund@kantarell:~$ echo $HOME
/afs/pdc.kth.se/home/e/esjolund

you will experience much faster browsing if you start the web browser chromium with the option flag --user-data-dir

esjolund@kantarell:~$ mkdir /scratch/esjolund_chromium_profile
esjolund@kantarell:~$ chmod 700 /scratch/esjolund_chromium_profile
esjolund@kantarell:~$ chromium-browser --user-data-dir=/scratch/esjolund_chromium_profile

But one disadvantage comes with this. If you have the profile under /scratch it will not be backed up. See also Section 14.5.1, “/scratch”

16. Subversion

16.1. Subversion book

Online documentation about Subversion can be found in the book Version Control with Subversion.

16.2. Repositories at svn.sbc.su.se

16.2.1. Group repositories at svn.sbc.su.se

Table 6. Group repositories at SBC Subversion server

repository URLgroup
https://svn.sbc.su.se/repos/sonnhErik Sonnhammer group
https://svn.sbc.su.se/repos/cbrArne Elofsson group
https://svn.sbc.su.se/repos/compbioJens Lagergren and Lars Arvestad groups

Only group members of the corresponding group have read and write access to the group repository.

Example 9. Creating a new project dir in an SVN group repository

If you for instance are a member of Erik Sonnhammers group and want to start a new project called "biosequencing" run the following commands

esjolund@kantarell:~$ svn mkdir -m "creating the new project dir biosequencing" https://svn.sbc.su.se/repos/sonnh/biosequencing
esjolund@kantarell:~$ svn mkdir -m "" https://svn.sbc.su.se/repos/sonnh/biosequencing/trunk
esjolund@kantarell:~$ svn mkdir -m "" https://svn.sbc.su.se/repos/sonnh/biosequencing/branches
esjolund@kantarell:~$ svn mkdir -m "" https://svn.sbc.su.se/repos/sonnh/biosequencing/tags

Now you can check out the project dir

esjolund@kantarell:~$ svn co https://svn.sbc.su.se/repos/sonnh/biosequencing

The first time you connect to the SBC subversion server you will be asked for your SBC subversion password (see Section 10.2.6, “Password for subversion”).

16.2.2. Project specific repositories at svn.sbc.su.se

Project specific repositories are not recommended. Please use the group repositories instead. Only under rare circumstances can it be justified to have a project specific repository. If you think you have such situation and need a new project specific repository send an email to with this information: the name of the repository, the name of the users with read access, the name of the users with write access and some argument why you can't use a group repository.

16.3. Repositories and access rights

See the chapter Path-Based Authorization in the Subversion book. It is for instance possible to give away anonymous read access. If you want to change the access rights please send an email to because root rights are needed for this. Please send this information: the name of the repository, the name of the sub directory inside the repository, the name of the users with read access, the name of the users with write access.

16.4. Some advice on usage

  • Avoid version control of binary files. They will take up a lot of space.

  • Decide for an indentation standard of your source code before putting it under version control. It will then be easier to follow the history of changes.

  • Just version control the sources, not anything that is generated.

17. Printing

17.1. Printing from Linux desktop computers

17.1.1. printing from the command line with lpr

lpr is the command to send something to the printers. More detailed info is available by typing man lpr. Invoked without any flags lpr uses the default printing queue.

[esjolund@oxygen esjolund]$ lpr file.ps

prints the file file.ps to the default printer. To print to another queue, type lpr -P queuename myfile.ps.

[esjolund@oxygen esjolund]$ lpr -P xe file.ps

prints the file file.ps to the xe printer queue

To print out the file file.ps in landscape orientation

[esjolund@oxygen esjolund]$ lpr -o landscape file.ps

To print out the file file.pdf one-sided

[esjolund@oxygen esjolund]$ lpr -o sides=one-sided file.pdf

To print out the first four pages of the file file.pdf

[esjolund@oxygen esjolund]$ lpr -o page-ranges=1-4 file.pdf 

To print out the file file.pdf where each printed page contains 2 pages of the original pdf. With this option you can save paper, but it will be harder to read the small text.

[esjolund@oxygen esjolund]$ lpr -o number-up=2 file.pdf

[Note]Note

The man page for lpr is lacking information. The available -o options are found in the CUPS Software Users Manual

The lpr command understands among others these file types

[esjolund@oxygen esjolund]$ lpr file.pdf
[esjolund@oxygen esjolund]$ lpr file.gif
[esjolund@oxygen esjolund]$ lpr file.png
[esjolund@oxygen esjolund]$ lpr file.jpeg
[esjolund@oxygen esjolund]$ lpr file.tiff
[esjolund@oxygen esjolund]$ lpr file.ps
[esjolund@oxygen esjolund]$ lpr file.txt
[esjolund@oxygen esjolund]$ lpr file.pbm
[esjolund@oxygen esjolund]$ lpr file.pnm
[esjolund@oxygen esjolund]$ lpr file.ppm

See also Section 17.3, “Printing queues”

17.1.2. lpstat

lpstat is the command to get status information about the printing system. For instance, type lpstat -a to list available printing queues and printing instances.

[esjolund@dirac ~]$ lpstat -a
HPColorF3Quad2 accepting requests since 2011-10-12T10:49:03 CEST
HPF1 accepting requests since 2011-10-11T16:09:39 CEST
HPF1Color accepting requests since 2011-10-12T10:33:10 CEST
HPF2ColorQuad3 accepting requests since 2011-10-11T17:32:11 CEST
HPF2Quad2 accepting requests since 2011-10-04T14:47:24 CEST
HPF2Quad3 accepting requests since 2011-10-12T11:15:28 CEST
HPF3ColorQuad3 accepting requests since 2011-10-12T07:44:01 CEST
HPF3Quad2 accepting requests since 2011-10-12T13:18:24 CEST
HPF3Quad3 accepting requests since 2011-10-11T17:48:01 CEST
Ricoh-MP-c4000 accepting requests since 2011-06-22T18:28:15 CEST
RicohF2 accepting requests since 2011-09-28T17:30:06 CEST

17.2. Printers

17.2.1. Printers at SBC (Roslagstullsbacken 35)

See the user guide Printers at SBC

17.3. Printing queues

Table 7. Printer queues

printer queueprinter modeltypeformatdouble-sidedcharacteristics
hpHP Color LaserJet 9500MFPcolor lasera4, a3yesdefault printing queue.
bwHP LaserJet 4250DTNblack & white lasera4yesExpensive, avoid if possible
xeXerox Phaser 6250DPcolor lasera4yesExpensive, avoid if possible

17.4. Transparencies

[Important]Important

Transparencies are no longer allowed as print media in the printers at SBC ( Roslagstullsbacken 35 ).

17.5. Printing syntax highlighted source code

There are some options here: xemacs, a2ps, enscript and using the cups own highlighting. xemacs produces the nicest result and is capable of handling utf-8 encoded files. a2ps and enscript are having problems with utf-8 encoded files. The cups variant ( lpr -P xe/pretty ) supports utf-8 but could produce better syntax highlighting of the source code.

18. Digital camera

We have a digital camera of model Canon PowerShot A400™. The Camera user guide ( PDF )

To connect the camera to a computer you need this type of usb cable

19. Memory card reader

We have a memory card reader of model LaCie 8-in-1 Reader™.

The reader connects to the computer with a USB cable. It is capable of reading these formats ( hopefully also in Linux )

  • CompactFlash Type I

  • CompactFlash Type II

  • Microdrive

  • Memory Stick

  • Memory Stick Pro

  • SD Memory Card

  • MultiMediaCard

20. Scanners

20.1. Ricoh scanners

There are two Ricoh scanners, one located near the entrance at floor 2 and one near the entrance at floor 3.

The Ricoh scanner at floor 2

First open the lid

Now press the button labeled "SCANNING" (marked by an arrow in the photo).

Now press the button labeled "Homer" (marked by an arrow in the photo).

The "Homer" icon on the display is now orange.

Put your paper like this

Close the lid and press the Start key (a green button marked by an arrow in the photo)

On the display you can now see a time counter counting down with the text:

"Place next original within 59 sec., then press the Start key. If none press #"

If you want to have multiple scanned papers in the same PDF file you swap papers and press the Start key. If not press the button "#" that is shown in this photo.

The PDF file containing the scanned paper(s) has now been copied to the file server homer.scilifelab.se. To access the PDF file go to PlacesConnect to Server.... In Ubuntu 11.04 it is a bit harder to find "Connect to Server ..". There you need to start the program nautilus and then go to FileConnect to Server.... Fill in the form like this

as username you should use the beginning of your scilifelab email address (i.e. firstname.lastname). In the next window you will be asked for a password. Please provide the password for homer.

now click the folder "Scanned images"

now click the folder "Floor2"

Please remove your PDF file after reading it. After a week it will be automatically removed.

21. Burning CDROMs and DVDs

The Linux computer asterix.sbc.su.se which is located in the "windows"-room has an extra internal DVD/CD-ROM burner installed. This burner is white and is therefore easily distinguishable from the computers DVD reader which is black. The burner is capable of writing in both of the media formats DVD-R and DVD+R. If you need blank CDROMs or DVDs ask Erik Sjölund.

Example 10. Burning the content of a directory to a CDROM

We want to burn the directory /home/others/esjolund/data to a CDROM. The procedure to write a DVD is exactly the same ( i.e. the same commands are used ).

[esjolund@asterix esjolund]$ ls -l /home/others/esjolund/data
total 176
-rw-r--r--  1 esjolund others  7072 Apr  4 16:14 file1
-rw-r--r--  1 esjolund others 51272 Apr  4 16:13 file2
-rw-r--r--  1 esjolund others 95472 Apr  4 16:14 file3

First we need to create an iso file somewhere on the local hard drive, for instance by naming it /scratch/cdimage.iso.

[esjolund@asterix esjolund]$ mkisofs -J -r -o /scratch/cdimage.iso /home/others/esjolund/data
INFO:   UTF-8 character encoding detected by locale settings.
        Assuming UTF-8 encoded filenames on source filesystem,
        use -input-charset to override.
Total translation table size: 0
Total rockridge attributes bytes: 400
Total directory bytes: 0
Path table size(bytes): 10
Max brk space used 0
258 extents written (0 MB)

let's burn the CDROM

[esjolund@asterix esjolund]$ cdrecord -dao /scratch/cdimage.iso
Cdrecord-Clone 2.01-dvd (i686-pc-linux-gnu) Copyright (C) 1995-2004 Jörg Schilling
Note: This version is an unofficial (modified) version with DVD support
Note: and therefore may have bugs that are not present in the original.
Note: Please send bug reports or support requests to http://bugzilla.redhat.com/bugzilla
Note: The author of cdrecord should not be bothered with problems in this version.
cdrecord: Cannot allocate memory. WARNING: Cannot do mlockall(2).
cdrecord: WARNING: This causes a high risk for buffer underruns.
cdrecord: Operation not permitted. WARNING: Cannot set RR-scheduler
cdrecord: Permission denied. WARNING: Cannot set priority using setpriority().
cdrecord: WARNING: This causes a high risk for buffer underruns.
scsidev: '/dev/hdb'
devname: '/dev/hdb'
scsibus: -2 target: -2 lun: -2
Linux sg driver version: 3.5.27
Using libscg version 'schily-0.8'.
cdrecord: Warning: using inofficial libscg transport code version (schily - Red Hat-scsi-linux-sg.c-1.83-RH '@(#)scsi-linux-sg.c        1.83 04/05/20 Copyright 1997 J. Schilling').
Device type    : Removable CD-ROM
Version        : 0
Response Format: 2
Capabilities   :
Vendor_info    : '_NEC    '
Identifikation : 'DVD_RW ND-2510A '
Revision       : '2.15'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).
Driver flags   : MMC-3 SWABAUDIO BURNFREE
Supported modes: TAO PACKET SAO SAO/R96R RAW/R96R
cdrecord: Operation not permitted. WARNING: Cannot set RR-scheduler
cdrecord: Permission denied. WARNING: Cannot set priority using setpriority().
cdrecord: WARNING: This causes a high risk for buffer underruns.
Speed set to 5645 KB/s
Starting to write CD/DVD at speed  32.0 in real SAO mode for single session.
Last chance to quit, starting real write    0 seconds. Operation starts.
trackno=0
Turning BURN-Free off
cdrecord: WARNING: Drive returns wrong startsec (0) using -150
Track 01: Total bytes read/written: 528384/614400 (300 sectors).

We might want to check that the CDROM looks alright

[esjolund@asterix esjolund]$ ls /media/cdrecorder
[esjolund@asterix esjolund]$ mount /media/cdrecorder
mount: block device /dev/hdb is write-protected, mounting read-only
[esjolund@asterix esjolund]$ ls -l /media/cdrecorder
total 151
-r--r--r--  1 root root  7072 Apr  4 16:14 file1
-r--r--r--  1 root root 51272 Apr  4 16:13 file2
-r--r--r--  1 root root 95472 Apr  4 16:14 file3
[esjolund@asterix esjolund]$ umount /media/cdrecorder

don't forget to remove the file /scratch/cdimage.iso

[esjolund@asterix esjolund]$ rm /scratch/cdimage.iso

22. static and dynamic web content

22.1. Publishing static web content at www.nada.kth.se

You can publish static web content by placing a file index.html in a directory called public_html in your AFS home directory ( see Section 14.2.3, “Your AFS home directory” ). The directory public_html needs to have the right afs permission set ( system:anyuser rl ).

[esjolund@oxygen afs]$ cd
[esjolund@oxygen esjolund]$ pwd
/afs/pdc.kth.se/home/e/esjolund
[esjolund@oxygen esjolund]$ ls
OldFiles  Private  Public
[esjolund@oxygen esjolund]$ mkdir public_html
[esjolund@oxygen esjolund]$ fs la public_html
Access list for public_html is
Normal rights:
  esjolund:remote-users rlidwka
  system:administrators rlidwka
  system:anyuser l
  esjolund rlidwka
[esjolund@oxygen esjolund]$ fs sa -dir public_html -acl system:anyuser rl
[esjolund@oxygen esjolund]$ fs la public_html
Access list for public_html is
Normal rights:
  esjolund:remote-users rlidwka
  system:administrators rlidwka
  system:anyuser rl
  esjolund rlidwka

It is also possible to use a symbolic link to point out another directory that contains the public_html.

[esjolund@oxygen esjolund]$ ln -s /afs/pdc.kth.se/home/e/esjolund/some/subdirectory/my_public_html ~/public_html

To test if you are using a symbolic link type you can do

[esjolund@oxygen esjolund]$ readlink ~/public_html
/afs/pdc.kth.se/home/e/esjolund/some/subdirectory/my_public_html

You need to make sure that system:anyuser has "l" permissions on the directories it need to traverse. On the directory containing the html files (in this case: ~/some/subdirectory/my_public_html ) you need to give system:anyuser "rl" permissions.

[esjolund@oxygen esjolund]$ fs sa -dir ~/some -acl system:anyuser l 
[esjolund@oxygen esjolund]$ fs sa -dir ~/some/subdirectory -acl system:anyuser l 
[esjolund@oxygen esjolund]$ fs sa -dir ~/some/subdirectory/my_public_html -acl system:anyuser rl

To create the index.html file you might use Mozilla Composer. To do that first start mozilla and choose WindowComposer. When you have created the index.html it will be accessible at http://www.nada.kth.se/~esjolund/ ( replace esjolund with your user name ).

22.2. publishing dynamic web content at www.nada.kth.se

First follow the instructions in Section 22.1, “Publishing static web content at www.nada.kth.se” on how to set the AFS directory permissions on the directory ~/public_html. Here is a html file that contains a PHP script

[esjolund@oxygen esjolund]$ emacs -nw ~/public_html/php_print_current_date.php
[esjolund@oxygen esjolund]$ cat ~/public_html/php_print_current_date.php
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"   "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <title>Hellow world php test</title>
  </head>
  <body>Testing php. The current date should be printed here:
    <?php echo date("g:i A l, F j Y.") ; ?>   
  </body>
</html>

That web page is now available at http://www.nada.kth.se/~esjolund/php_print_current_date.php

22.3. web server on www.sbc.su.se

22.3.1. WebDAV at www.sbc.su.se

If you need that other people should be able to upload data files to you, you could use WebDAV. First make sure you have a valid password for www.sbc.su.se ( see Section 10.2.3, “Password for www.sbc.su.se” ). Then send a request to that you want to have WebDAV activated for your account on www.sbc.su.se.

[esjolund@oxygen esjolund]$ ssh -p 50011 www.sbc.su.se
esjolund@www.sbc.su.se's password:
[esjolund@tyrone esjolund]$ mkdir -p ~/public_html/webdav
[esjolund@tyrone esjolund]$ echo testing > ~/public_html/webdav/test.txt

You now need to create a htpasswd file with user account names and passwords. The path is given to you in an email. You create the htpasswd file with the command htpasswd. Your test file test.txt will be accessible at the URL https://www.sbc.su.se/~yourusername/public_html/webdav directory ( replace "yourusername" with your user name ). When you access the URL you will asked for a valid username and password.

22.3.2. creating web content on www.sbc.su.se

You can publish web content ( both static and dynamic ) on the computer www.sbc.su.se. First make sure you have a valid password for www.sbc.su.se ( see Section 10.2.3, “Password for www.sbc.su.se” ). Then create a directory public_html in your home directory on www.sbc.su.se and make sure it is readable by everyone.

[esjolund@oxygen esjolund]$ ssh -p 50011 www.sbc.su.se
esjolund@www.sbc.su.se's password:
[esjolund@tyrone esjolund]$ ls -ld ~
drwxr-xr-x  10 esjolund others 4096 Aug 24 12:59 /home/others/esjolund
[esjolund@tyrone esjolund]$ mkdir ~/public_html
[esjolund@tyrone esjolund]$ ls -ld ~/public_html
drwxr-xr-x  4 esjolund others 4096 Jul 13 11:49 /home/others/esjolund/public_html

place your web content in the public_html directory. It will be accessible at http://www.sbc.su.se/~esjolund/ ( replace esjolund with your user name ).

The directory ~/public_html/download is configured to allow directory listings. If there is no index.html in that directory, the web server will generate a listing in html format of the filenames found in the directory. Here is an example of this: http://www.sbc.su.se/~esjolund/download/

If you need to have CGI scripts you should place them in the directory ~/public_html/cgi-bin. First you need to create the directory

[esjolund@oxygen esjolund]$ ssh -p 50011 www.sbc.su.se
esjolund@www.sbc.su.se's password:
[esjolund@tyrone esjolund]$ mkdir -p ~/public_html/cgi-bin

create a script ~/public_html/cgi-bin/script.cgi with the execution bit set

[esjolund@oxygen esjolund]$ emacs ~/public_html/cgi-bin/script.cgi
[esjolund@oxygen esjolund]$ chmod 755 ~/public_html/cgi-bin/script.cgi

It will be available under the URL http://www.sbc.su.se/~esjolund/cgi-bin/script.cgi

[Caution]Caution

CGI-scripts are potential security risks if they contain security holes, so please be careful when writing them. If you download them from the Internet, please stay up to date with security patches for bugs found in those CGI-scripts.

You have the possibility to password protect your web content on www.sbc.su.se.

Example 11. Restricting access for a web directory

If you only want to allow the web surfers Chaplin and Bogart to access a certain web directory on www.sbc.su.se, do as follows,

We create a file ~/htpasswords containing the passwords Chaplin and Bogart needs to know. The filename ~/htpasswords was chosen arbitrarily. But please place it directly under your home directory. That way you know you haven't published it on the web.

[esjolund@tyrone esjolund]$ htpasswd -c ~/htpasswords chaplin
New password:
Re-type new password:
Adding password for user chaplin
[esjolund@tyrone esjolund]$ htpasswd ~/htpasswords bogart
New password:
Re-type new password:
Adding password for user bogart

we need to create a file .htaccess in the web directory that we want to protect.

[esjolund@tyrone esjolund]$ emacs ~/public_html/secret_directory/.htaccess
[esjolund@tyrone esjolund]$ cat ~/public_html/secret_directory/.htaccess

 AuthName "restricted stuff"
 AuthType Basic
 AuthUserFile /home/others/esjolund/htpasswords
 require valid-user
[esjolund@tyrone esjolund]$ chmod 644 /home/others/esjolund/public_html/secret_directory/.htaccess

Now web surfers are prompted for a valid username and password when trying to access http://www.sbc.su.se/~esjolund/secret_directory/

22.4. Writing secure CGI

This section has been moved out into a separate document.

22.5. Testing your CGI scripts on your local Linux desktop with Konqueror

Normally the web server apache is used to run CGI scripts. Although it is possible to start apache as a normal user (non-root user) you then need to have it listening on a port number higher than 1024. You would also need to pass a configuration to apache so that it write its log files to some directory where the user has write permissions.

But there is a much simpler way:

Example 12. Use Konqueror to execute the CGI script /scratch/my_dir/test.cgi

The web browser konqueror can execute local CGI scripts directly.

esjolund@ubuntu:~$ kcmshell4 kcmcgi

A dialog window is opened with the text "Paths to local CGI programs". In this dialog we add the directory /scratch/my_dir/.

esjolund@ubuntu:~$ cd /scratch/my_dir
esjolund@ubuntu:my_dir$ konqueror cgi:/test.cgi

Now, you see that konqueror has executed the CGI script /scratch/my_dir/test.cgi and shows the output.

23. Servers running as KVM

SBC has migrated most of its physical servers so that they are now running as virtual machines (KVMs) on a powerfull rack server. If you are interested in the technical details you can read a bit about some of the installation problems here, here, here and here.

The sysadmin administers an HTTP reverse proxy server on each twin server. It's configuration is updated for redirecting the http traffic to the corresponding KVM.

The sysadmin configures the firewall on the twin servers for special arrangements like sending special TCP ports to specific KVMs.

23.1. List of KVMs

Here is a list of the KVMs, ssh port numbers, apache_vhosts. The two KVMs running the httpd reverse proxies (both ssh port number 50001) have been excluded from the list.


KVMs on twin1.scilifelab.se

  hostname virt-othello.sbc.su.se port 50022
   apache_vhost funcoup2.scilifelab.se


KVMs on twin2.scilifelab.se

  hostname virt-tyrol.sbc.su.se port 50004
   apache_vhost sfixem.cgb.ki.se
   apache_vhost sfinx.cgb.ki.se
   apache_vhost sfinx.sbc.su.se
   apache_vhost sfixem.sbc.su.se
  hostname virt-gauss.sbc.su.se port 50005
   apache_vhost svn.sbc.su.se
  hostname virt-zinc.sbc.su.se port 50011
   apache_vhost prime.sbc.su.se
   apache_vhost www.compasbio.se
   apache_vhost bioinfo.se
   apache_vhost www.sbc.su.se
   apache_vhost www.orthoxml.org
   apache_vhost socbin.org
   apache_vhost sonnhammer.cgb.ki.se
   apache_vhost sonnhammer.sbc.su.se
   apache_vhost sonnhammer.org
  hostname virt-helium.sbc.su.se port 50012
   apache_vhost phobius.cgb.ki.se
   apache_vhost gpcrhmm.cgb.ki.se
   apache_vhost humanoid.cgb.ki.se
   apache_vhost msa.cgb.ki.se
   apache_vhost orthodisease.cgb.ki.se
   apache_vhost chromowheel.cgb.ki.se
   apache_vhost orthostrapper.cgb.ki.se
   apache_vhost pfam.cgb.ki.se
   apache_vhost funshift.cgb.ki.se
   apache_vhost multiparanoid.cgb.ki.se
   apache_vhost inparanoid.cgb.ki.se
   apache_vhost sirna.cgb.ki.se
   apache_vhost sirnadb.cgb.ki.se
   apache_vhost sisearch.cgb.ki.se
   apache_vhost chromowheel.sbc.su.se
   apache_vhost dasher.sbc.su.se
   apache_vhost funshift.sbc.su.se
   apache_vhost gpcrhmm.sbc.su.se
   apache_vhost humanoid.sbc.su.se
   apache_vhost inparanoid-ac.sbc.su.se
   apache_vhost inparanoid51.sbc.su.se
   apache_vhost inparanoid6.sbc.su.se
   apache_vhost jsquid.sbc.su.se
   apache_vhost metatm.sbc.su.se
   apache_vhost msa.sbc.su.se
   apache_vhost multiparanoid.sbc.su.se
   apache_vhost orthodisease.sbc.su.se
   apache_vhost pfamki.sbc.su.se
   apache_vhost sirna.sbc.su.se
  hostname virt-neon.sbc.su.se port 50013
   apache_vhost avdist.sbc.su.se
   apache_vhost msa2.sbc.su.se
   apache_vhost dgpred.cbr.su.se
   apache_vhost elude.sbc.su.se
   apache_vhost excap.sbc.su.se
   apache_vhost funcoup.sbc.su.se
   apache_vhost inparanoid.sbc.su.se
   apache_vhost kalignp.cbr.su.se
   apache_vhost kaell.org
   apache_vhost maxlink.sbc.su.se
   apache_vhost maxlink-beta.sbc.su.se
   apache_vhost mprap.cbr.su.se
   apache_vhost phobius.sbc.su.se
   apache_vhost refsense.sbc.su.se
   apache_vhost repeatalign.sbc.su.se
   apache_vhost software.sbc.su.se
   apache_vhost zpred.cbr.su.se
  hostname virt-magenta.sbc.su.se port 50014
   apache_vhost pcons.net
  hostname virt-aqua.sbc.su.se port 50015
   apache_vhost topcons.net
   apache_vhost single.topcons.net
   apache_vhost octopus.cbr.su.se
   apache_vhost scampi.cbr.su.se
  hostname virt-movitz.sbc.su.se port 50016
   apache_vhost www.edict-project.eu
   apache_vhost www2.dbb.su.se
   apache_vhost www.cbr.su.se
   apache_vhost www.compprotsci.org
   apache_vhost syrah.cbr.su.se
   apache_vhost booking.cbr.su.se
  hostname virt-rally.sbc.su.se port 50017
  hostname virt-tennis.sbc.su.se port 50018
  hostname virt-messi.sbc.su.se port 50019
   apache_vhost boctopus.cbr.su.se
   apache_vhost bzpred.cbr.su.se
   apache_vhost tmbmodel.cbr.su.se
   apache_vhost tobmodel.cbr.su.se
  hostname virt-cricket.sbc.su.se port 50020
   apache_vhost biosql.scilifelab.se
  hostname virt-melody.sbc.su.se port 50021
   apache_vhost rnrdb.pfitmap.org
  hostname virt-volt.sbc.su.se port 50023
   apache_vhost envcommunity.scilifelab.se
   apache_vhost metaannot.scilifelab.se
  hostname virt-stone.sbc.su.se port 50024
   apache_vhost bilstest.borg.hk
  hostname virt-pyramid.sbc.su.se port 50025
   apache_vhost datisca-nodule-transcriptome.scilifelab.se
  hostname virt-cello.sbc.su.se port 50026
   apache_vhost pfam.sbc.su.se
  hostname virt-sierra.sbc.su.se port 50027
   apache_vhost pfamdev.sbc.su.se



KVM nr 4 (port 50004) is running the DAS server. It is listening on port 9000.

23.2. Log in with SSH to a KVM

Each KVM can be accessed by logging in with ssh to the KVM host server on port number 50000 + KVM number. The KVM virt-helium.sbc.su.se has the KVM number 12. Its ssh server is running on port 50012 and it hosts the apache vhost "msa.sbc.su.se". To log in with ssh run

esjolund@ubuntu:~$ ssh -p 50012 msa@msa.sbc.su.se

To copy a file

esjolund@ubuntu:~$ scp -P 50012 /tmp/file.txt msa@msa.sbc.su.se:/tmp/

To rsync a directory /home/msa/dir from the local computer to the rack server. (Be careful as it may delete files).

esjolund@ubuntu:~$ rsync -ae "ssh -p 50012" --delete /home/msa/dir/ msa@msa.sbc.su.se:/home/msa/dir

See also Section 23.1, “List of KVMs”.

23.3. Accessing port 80 and port 443 of a KVM

If the KVM is running a webserver (tcp port 80), you can directly connect to this port by connecting to the port number that is the sum of 51000 and the KVM nr (5100 + KVM_nr). You could use this port number in the URL if you need to directly connect to the KVM. In other words the HTTP reverse proxy is then bypassed. The same thing goes for port number 443 (https). That port number is mapped to the sum of 52000 and the KVM nr (5200 + KVM_nr).

If you want the KVM host server to answer on port 80 for your domain name, we need to configure the HTTP reverse proxy. See also Section 23.4, “HTTP reverse proxy”.

23.4. HTTP reverse proxy

All traffic to port 80 on the KVM host is redirected to one KVM that is acting as HTTP reverse proxy. This HTTP reverse proxy has a mapping between different domain names and internal IP addresses for the KVMs. For instance the domain name "www.inparanoid.sbc.su.se" is mapped to the internal IP address 10.0.1.13. If you want to add a domain name to your KVM, please send an email to sbc-sys@sbc.su.se. If you want to bypass the HTTP reverse proxy, see Section 23.3, “Accessing port 80 and port 443 of a KVM”.

23.5. KVM administrator

Every KVM is owned by an SBC group (except for the sysadmin administrated KVMs). The group leader delegates the maintenance of the KVM to a group member of his/her group. This person is called the KVM administrator. This could also be an ordered list of persons to better be prepaired for situations when someone is away on parental leave or vacation.

The KVM administrator provides a list of paths inside the KVM that the sysadmin should take backups of.

As the KVM administrator has root permissions he/she can perform all kinds of administration on the KVM, like for instance installing packages (yum install packagename or apt-get update && apt-get install packagename ). The KVM adminstrator can also reboot the KVM (see Section 23.7, “rebooting a KVM”), but for some things like rebooting a KVM that is hanging (see Section 23.8, “rebooting a KVM that is hanging”) the help of sysadmin is needed.

23.6. Requesting installation of a new KVM

When an SBC group needs a new KVM, they send an email to sbc-sys@sbc.su.se and provide the following information

  • operating system (CentOS, Ubuntu or Debian). Default choice should be CentOS as it provides security updates with the longest Life time cycle. If the KVM need to have a lot of non standard packages installed (like obscure perl packages) Debian or Ubuntu might be the better choice.

  • number of CPU cores

  • 32 bit CPU or 64 bit CPU. Default choice should be 64 bit CPU.

  • RAM memory size

  • hard disk size

  • name of KVM administrator (see Section 23.5, “KVM administrator”)

  • DNS domain names (see Section 23.4, “HTTP reverse proxy”).

  • If HTTPS is needed for the KVM, public and private SSL keys need to be provided.

Sysadmin then installs the KVM and provides root login to the KVM administrator.

23.7. rebooting a KVM

The KVM administrator (see Section 23.5, “KVM administrator”) has root permissions on the KVM so it is possible for him/her to run the command reboot when the KVM needs to be rebooted.

23.8. rebooting a KVM that is hanging

In the case that the whole KVM is hanging the KVM administrator (see Section 23.5, “KVM administrator”) needs to request a KVM reboot by the sysadmin. First a "virsh reboot kvm_name" is tried. If that doesn't work a virsh destroy kvm_name && virsh start kvm_name is run. The last command corresponds to "pulling out the power cord" of the KVM. It is then switched off with no warning and no chance to sync the disks for the KVM.

23.9. Security updates on the KVM

The sysadmin regularly logs in with ssh to the KVMs and install security updates (yum -y update and apt-get update && apt-get dist-upgrade).

24. Commercial software

If you belong to a group at DBB and you want to install Microsoft Office or some other commercial software you need to contact Peter Nyberg at DBB. One thing Peter wants to know is whom to charge the software license cost. Normally your group leader is charged the license cost, so please check with your group leader first.

IT&Media has the web page, Programbiblioteket, for commercial software. Most of the prices are found if you follow the link Uppsalaservern ( access to this web page might be limited ).

25. Sukat account

All employees of Stockholm University can get a SUKAT account. Normally you will get an account automatically. To check if you already have an SUKAT account, see if you can find yourself by entering your name in the search box "Namn:" at Sök bland anställda vid Stockholms universitet. If you find yourself in the result of the search you should click on your name. At the next page you will see your SUKAT id listed next to the text "SUKAT användar-ID:"

If you are a employee of Stockholm university and don't have a SUKAT account you can apply for one by sending an email to .

If you need a password for your SUKAT account you should send an email to . Please specify your SUKAT id in that mail also. The password will be sent to your mail slot ( see Section 6.3.1, “Mail slots” ).

26. Reading e-journals

There are a number of e-journals available online. To be able to read e-journals from your home or work computer you need a sukat account ( see Section 25, “Sukat account” ). More information about accessing e-journals.

27. Doing presentations

27.1. Presentation software

On the Linux desktops at SBC, you might want to use

Most people create their presentations by using Microsoft Powerpoint, either on their own laptops or at our windows computer "milou". If you want to use one of the Linux desktops for the actual presentation you can print to a postscript file from Microsoft Powerpoint and move the resulting file to a linux computer. Then use ps2pdf to convert it to pdf and then show the result with xpdf. You won't get the fancy animations though.

[esjolund@oxygen tmp]$ ps2pdf presentation.ps presentation.pdf
[esjolund@oxygen tmp]$ xpdf -fullscreen presentation.pdf

27.2. Video projectors

27.2.1. Video projector in RB35

In the ceiling in room RB35 we have a video projector of model BENQ SP831™. User manual (pdf-format).

27.2.2. Portable video projector

Figure 3. Video projector

Video projector

We have a video projector of model PLUS U3-1100Z™. User's manual (pdf-format). There should also be a laser pointer kept with the video projector. The projector is most easily attached via the video cable, you may have to use the Fn (function) key on your laptop to turn on the external monitor function.

You may borrow the video projector for holding presentations. It is located in room 162:002, but you need to book it first on the calendar outside of room 162:002

27.3. Computer for the seminar room

You may bring your own private laptop computer or try to find someone that you could borrow of. Another possibility is to temporarily move one of the stationary Linux desktop computers. Type w on the their command line to find out who is currently logged in. Try to find a computer where no one is logged in. Then log out and make a shutdown of the computer. Move the computer into the seminar room and connect an ethernet cable from the computer to the ethernet slot number 2 in the wall.

28. KTH network secret

Your KTH network secret is needed to get eduroam wireless access (see Section 29, “Eduroam”) or a VPN connection to KTH. You need a kth.se account and password (see Section 10.2.5, “kth.se password”) to get your KTH network secret. You can download your KTH network secret from here.

29. Eduroam

Eduroam (Wikipedia description) is a secure international roaming service for users at Universities. You can use it to get wireless access at great number of universities all around Europe. The Arrhenius Laboratory, SciLifeLab and Albanova are just some of the places in Stockholm where you have wireless access with Eduroam. You can get access Eduroam if you have a Kth.se account, a Sukat account or a KI email account. You could also access Eduroam if you have access to Eduroam from another University in the world.

29.1. Configure Eduroam for a kth.se account

29.1.1. Configure Eduroam for a kth.se account for Ubuntu Linux

This instruction is for Ubuntu Linux 10.10 but it may work for other Ubuntu versions too. To get access to Eduroam you first need to get your KTH network secret Section 28, “KTH network secret”.

First download the CA certificate to your home directory

esjolund@ubuntu:~$ cd
esjolund@ubuntu:~$ wget \-\-quiet http://www.lan.kth.se/eduroam/AddTrust_External_CA_Root.pem
esjolund@ubuntu:~$ ls -l AddTrust_External_CA_Root.pem 
-rw-r\-\-r\-\- 1 esjolund users 1521 2010-07-05 16:00 AddTrust_External_CA_Root.pem

In the right upper corner click left mouse button

you will see there is a network available called "eduroam". Now click left mouse button on that entry.

After a while you will see this window

Fill in the values according to the following table

Table 8. Settings for eduroam

entryvalue
AuthenticationProtected EAP (PEAP)
CA certificateChoose the file AddTrust_External_CA_Root.pem that you downloaded to your home directory
Usernameusername@kth.se
PasswordYour KTH network secret Section 28, “KTH network secret”

Click Connect

29.1.2. Configure Eduroam for a kth.se account for Mac Os

Follow the instructions at http://www.lan.kth.se/eduroam/

29.1.3. Configure Eduroam for a kth.se account for Windows

Follow the instructions at http://www.lan.kth.se/eduroam/

29.2. Configure Eduroam for a KI email account

If you have a KI email account you can get access to Eduroam through Karolinska Insitute. Follow the instructions at http://ki.se/ki/jsp/polopoly.jsp?l=en&d=30152.

29.3. Configure Eduroam for a Sukat account

If you have a Sukat account (Section 25, “Sukat account”) you can get access to Eduroam through Stockholm university. Follow the instructions at https://confluence.it.su.se/confluence/display/Support/Eduroam+och+802.1x. Or search for "Eduroam" on their start page.

30. Connecting laptops to the local network

30.1. Internet access for your personal laptop

SciLifeLab has a wired ethernet, that for instance all Linux desktops are connected to. The available IP addresses in the wired ethernet is a scarce resource, so using Eduroam (see Section 29, “Eduroam” ) for connnecting to internet is the preferred solution.

30.1.1. Wireless ethernet

At SciLifeLab, you can use EduRoam (see Section 29, “Eduroam” ).

30.1.2. Wired ethernet

To be able to use the wired ethernet at SciLifeLab you need to provide your laptop's MAC address (see Section 30.5, “Finding your MAC-addresses”) in a support request to the SciLifeLab IT helpdesk.

30.2. Security

All laptops that connect to the SBC network should be up to date with the latest security patches. On windows you check that by running Windows update. You should also sign up for getting emails from Microsoft about new security updates. You can sign up at http://www.microsoft.com/technet/security/bulletin/notify.mspx. Follow the link "E-mail: Security Notification Service" under "Basic Alerts". Probably you also want to configure you windows computer to automatically do "Windows update".

Security updates on Linux is handled differently on different Linux distributions. It often involves running one of the following commands:

  • up2date

  • apt-get update ; apt-get dist-upgrade;

  • yum

. Read the documentation of your Linux distribution for more details.

[Warning]Warning

Before you connect a laptop to the network make sure you have updated all security holes.

30.3. Setup

Your laptop should be configured to have a "dynamic ip address" which will be given to the laptop by the DHCP server at SBC when the laptop connects to the network. The DHCP server also sends information about default gateway and about available DNS servers.

30.4. Wireless lan

The Albanova building has a common wireless network. You can connect to it with your PDC Kerberos password. Note, that you will get an ip number outside of our internal network. Therefore, you won't be able to print directly to our printers.

Click Connect

Open a web browser. No matter what home page you go to, you will be redirected to the login page.

You need to accept the ssl certificate.

Click on the link "KTH - Royal Institute of Technology"

As username type "username@nada.kth.se" ( but replace username with your username ) and as password use your Kerberos password

You are now logged in and can use the wireless network.

30.5. Finding your MAC-addresses

Each network card, be it wireless or ethernet, has a unique hardware address. That address is called a MAC-address.

On Linux you can see your MAC-addresses by typing /sbin/ifconfig -a on the command line. The value listed next to "HWaddr" is what you are looking for.

MacOS and Windows users read Finding Your Machine's MAC Address: Windows and Macs

30.6. Laptop printing settings

The cups server cups.sbc.su.se handles the printing at SBC. That computer is running the software cups that implements the new standard Internet Printing Protocol.

30.6.1. Linux laptop printing settings

All modern Linux distributions ( from year 2003 or newer ) use cups by default so you just have to add the line

ServerName cups.sbc.su.se

to the file /etc/cups/client.conf. Another option is to set the environment variable CUPS_SERVER

[esjolund@eriks_laptop esjolund]$ export CUPS_SERVER=cups.sbc.su.se

30.6.2. MacOS laptop printing settings

The setup for MacOS should actually be the same as for Linux.

30.6.3. Windows laptop printing settings

On Windows XP. To add the printer "bw".Press "Add printer". Choose "Local printer attached to this computer" but leave the box "Automatically detect and install my Plug and Play printer" unchecked. Press "next". Choose "Create new port". Specify "Type of port: Standard TCP/IP Port". Specify ip number "130.237.93.9". Choose driver " HP Laserjet 4250 Series PCL".

For the "xe" printer you can borrow a install CD ROM from Erik Sjölund.

31. b6.biotech.kth.se 72 Gb RAM computer

The linux computer b6.biotech.kth.se has 72 Gb RAM. To get access to it you need to fill out a support request at the SciLifeLab helpdesk web form. To log in to b6.biotech.kth.se use the Scilifelab password to homer (Section 10.2.8, “Password for homer.scilifelab.se”).

esjolund@otto:~$ ssh erik.sjolund@b6.biotech.kth.se

32. Compute cluster resources

32.1. Getting cluster compute time

The Ferlin cluster has been a great resource for SBC but we need to be aware that the official end date for the Ferlin cluster is 2012-06-30. It may not be available after that date.

The ways to get cluster compute time in the future are:

32.1.1. Large scale application

If you are a senior scientist, you could apply for a Large scale application at SNIC.

32.1.2. Medium scale application

If you are a senior scientist in Swedish academia, at least at the level of assistant professor (forskarassistent), you could apply for a Medium scale application at SNIC.

32.1.3. Small local allocation

If you are at least a PhD you could apply for a "Small local allocation". At least PDC would prefer that master students have their supervisor applying. The supervisor could then share her/his cluster time with the master student.

Small local allocations have these characteristics:

  • Max 5000 core hours/month/resource

  • Applications are handled locally at the SNIC centres.

Here follows a list with links to different SNIC centers:

33. UPPMAX

Uppsala Multidisciplinary Center for Advanced Computational Science (UPPMAX) is Uppsala University's resource of high-performance computers, large-scale storage, and know-how of high-performance computing.

33.1. applying for a computer account at UPPMAX

Fill in the User Account Application webform to apply for a computer account at UPPMAX. One of the web form fields is "Choose the project for which this account will be used". Please ask your group leader which project to choose.

33.2. Tintin cluster

Read more about the Tintin cluster at UPPMAX in the Tintin user guide.

33.3. Kalkyl cluster

Read more about the Kalkyl cluster at UPPMAX in the Kalkyl user guide.

34. Ferlin cluster

34.1. General

[Note]Note

The official end date for the Ferlin cluster is 2012-06-30. It may not be available after that date.

The Center for Parallel Computers at KTH is hosting the Ferlin supercomputer. The Ferlin hardware consists of 672 compute nodes, eight nodes for management, scheduling and login services, for a total of 5440 cores (57.88 TF theoretical peak performance) and 5.44 TB of main memory ( as of 2009-03-16 ).

34.2. Log in to the Ferlin cluster

PDC has written the guide SSH with Kerberos/GSSAPI on for example Ubuntu for how you log in to PDC. In short what you have to do is make sure you have a file ~/.ssh/config with the content specified in Section 2.3.2, “Adjust your ~/.ssh/config” To use the cluster you first need to have Kerberos tickets ( see Section 14.2.1, “Getting tickets” ) and then you log in to ferlin.pdc.kth.se by typing ssh ferlin.pdc.kth.se. If ferlin.pdc.kth.se is not available, you can try the second log in node at the Ferlin cluster: ferlin2.pdc.kth.se.

esjolund@otto:~$ ssh ferlin.pdc.kth.se
Last login: Thu Mar  3 10:18:53 2011 from otto.sbc.su.se
CentOS 5 at PDC installed Fri Sep 17 16:06:35 CEST 2010

You will notice that all software is not available by default.

a07c01n08$ fs lq
bash: fs: command not found

We see that the openafs client program fs is not present in the PATH, so we have to add it with module add afsws

a07c01n08$ fs lq
Volume Name                    Quota       Used %Used   Partition
H.esjolund                    500000     476884   53%       60%

To be able to submit cluster jobs, we need to add the module easy with module add easy

a07c01n08$ esubmit
bash: esubmit: command not found
a07c01n08$ module add easy
a07c01n08$ esubmit
Usage: esubmit [-c CAC][-C jid][-T time][-F jid][-[-h][-m][-n nodes][-p cpus][-v][-t minutes] [program [args]].

This means that a normal login to ferlin.pdc.kth.se would look like this

esjolund@otto:~$ ssh ferlin.pdc.kth.se 
Last login: Thu Mar  3 10:35:40 2011 from otto.sbc.su.se
CentOS 5 at PDC installed Fri Sep 17 16:06:35 CEST 2010
a07c01n08$ module add easy afsws

We are now ready to use the cluster commands. The cluster is using the queuing system EASY SP Scheduler. PDC has documentation for it. The most common commands are listed briefly here beneath.

34.3. Commands

Before using the cluster commands you need to follow the instructions in Section 34.2, “Log in to the Ferlin cluster”.

34.3.1. esubmit

The command esubmit is used to submit jobs to the queue. To be able to use esubmit you first need to follow the instructions in Section 34.2, “Log in to the Ferlin cluster”. You need to have forwardable tickets on the computer where you execute the esubmit. Also make sure the validity time of the ticket spans over the time the job is in the waiting queue and over the time the job is running ( see Section 14.2.2, “Verify validity of tickets” ).

The availabe options are listed by typing esubmit -h.

s07n01$ esubmit -h
Usage: esubmit [-c CAC][-C jid][-T time][-F jid][-[-h][-m][-n nodes][-p cpus][-v][-t minutes] [program [args]].
  -c CAC        : choose CAC, charge account category.
  -h            : help, use -v to get more.
  -m            : do not send mail.
  -n nodes      : number of nodes.
  -p cpus       : choose number of cpus, reserved for future use.
  -t minutes    : for amount of minutes.
  -T TIME       : start some time after TIME.
  -C JID        : do not start before JID started.
  -F JID        : start some time after JID finished.
                  use only one out of T C or F.

  program       : executable.
                  omitting executable reserves nodes only.
  args          : arguments for executable.

If you start a job requiring multiple nodes ( option -n with a value greater than 1 ), the job will be started on one of them. That process will then take look in the file whose filename is given in the environment variable SP_HOSTFILE. There it finds a list of the allocated nodes. Alternatively the process can find the same hostnames as a list in the environment variable SP_NODES.

Jobs requiring multiple nodes are not that common at SBC. They are needed when you use a parallel programing libraries such as, MPI or PVM. Usually the cluster users at SBC executes esubmit many times instead.

Example 13. Submitting a job

Let us submit a job to the queue that will run on one nodes and there execute the command echo Hi there!. We know the commands will finish off very fast so we specify a run time of 1 minute.

s07n01$ esubmit -n 1 -t 1 echo Hi there!

If we are impatient we can check the status of our job with the command spq. With some minutes interval we repeatedly type spq -u $USER.

s07n01$ spq -u $USER
  Q          JID  USER     STATE    CAC          RESOURCE TIME
 12 082414020908  esjolund wait     sbc.esjolund       2S 0h01
s07n01$ spq -u $USER
  Q          JID  USER     STATE    CAC          RESOURCE TIME
s07n01$ spq -u $USER
  Q          JID  USER     STATE    CAC          RESOURCE TIME
 12 082414020908  esjolund wait     sbc.esjolund       2S 0h01
s07n01$ spq -u $USER
  Q          JID  USER     STATE    CAC          RESOURCE TIME
  8 082414020908  esjolund wait     sbc.esjolund       2S 0h01
s07n01$ spq -u $USER
  Q          JID  USER     STATE    CAC          RESOURCE TIME
  7 082414020908  esjolund wait     sbc.esjolund       2S 0h01
s07n01$ spq -u $USER
  Q          JID  USER     STATE    CAC          RESOURCE TIME
  6 082414020908  esjolund wait     sbc.esjolund       2S 0h01
s07n01$ spq -u $USER
  Q          JID  USER     STATE    CAC          RESOURCE TIME
  - 082414020908  esjolund run      -                  2U 2004-08-24 16:09:00
s07n01$ spq -u $USER
  Q          JID  USER     STATE    CAC          RESOURCE TIME
  - 082414020908  esjolund run      -                  2U 2004-08-24 16:09:00

We see how the job gets further in the job queue. It starts running when we see the "run" state.

an email arrives notifying us about which computer nodes got allocated for the submitted jobs.

From: easy <easy@pdc.kth.se>
To: esjolund@pdc.kth.se
Subject: 082414020908 node allocation
Date: Tue, 24 Aug 2004 16:08:45 +0200 (CEST)
It is 2004-08-24 16:04:04 and your job 082414020908
is running on the resources you requested.
You now have access to the following node:

s07n31.pdc.kth.se

Another email arrives with the output of the submitted jobs

From: Erik Sjölund <esjolund@pdc.kth.se>
To: esjolund@pdc.kth.se
Subject: 082414020908 job output
Date: Tue, 24 Aug 2004 16:08:46 +0200 (CEST)
INFO: /usr/heimdal/bin/klist -Tf for job 082414020908 gives:

Credentials cache: FILE:/tmp/krb5cc_4495
        Principal: esjolund@NADA.KTH.SE

  Issued           Expires        Flags      Principal
Aug 24 16:08:45  Sep 23 15:20:32  Ff     krbtgt/NADA.KTH.SE@NADA.KTH.SE
Aug 24 16:08:45  Sep 23 15:20:32  f      afs/pdc.kth.se@NADA.KTH.SE
Aug 24 16:08:45  Sep 23 15:20:32  f      afs@NADA.KTH.SE

   V4-ticket file: /tmp/tkt4495

Aug 24 16:08:45  Sep 23 15:20:32  User's (AFS ID 4495) tokens for nada.kth.se
Aug 24 16:08:45  Sep 23 15:20:32  User's (AFS ID 4495) tokens for pdc.kth.se

STDOUT and STDERR for job 082414020908 of user esjolund is:
Hi there!

Success! We see that the string "Hi there!" was printed out on standard output.

Example 14. Submitting 10 separate jobs

We have a shell script that we want to run on 10 cluster nodes. The separate jobs don't need to interact with each other. The script creates an empty file with a filename identical to the hostname.

s07n01$ cat script.sh
#!/bin/sh
touch $HOSTNAME

Let the file have execute permission

s07n01$ chmod 755 script.sh

The "x" shown in the file permissions by ls indicates execute permission

s07n01$ ls -l
total 1
-rwxr-xr-x  1 esjolund 995 23 Oct 19 16:37 script.sh

To submit 10 jobs we have another script consisting of a for loop around the esubmit command

s07n01$ cat submit_script.sh
#!/bin/sh
for i in `seq 1 10`; do
  esubmit -m -n 1 -t 1 ./script.sh
done

submit the jobs by running the script submit_script.sh

s07n01$ ./submit_script.sh

When the jobs have run, 10 files should have been created

s07n01$ ls -l
total 2
-rw-r--r--  1 esjolund gopher  0 Oct 20 09:34 s05n03.pdc.kth.se
-rw-r--r--  1 esjolund gopher  0 Oct 20 09:34 s05n04.pdc.kth.se
-rw-r--r--  1 esjolund gopher  0 Oct 20 09:34 s05n09.pdc.kth.se
-rw-r--r--  1 esjolund gopher  0 Oct 20 09:34 s05n10.pdc.kth.se
-rw-r--r--  1 esjolund gopher  0 Oct 20 09:43 s05n12.pdc.kth.se
-rw-r--r--  1 esjolund gopher  0 Oct 20 09:43 s05n13.pdc.kth.se
-rw-r--r--  1 esjolund gopher  0 Oct 20 09:34 s05n14.pdc.kth.se
-rw-r--r--  1 esjolund gopher  0 Oct 20 09:34 s05n15.pdc.kth.se
-rw-r--r--  1 esjolund gopher  0 Oct 20 09:34 s05n19.pdc.kth.se
-rw-r--r--  1 esjolund gopher  0 Oct 20 09:34 s05n21.pdc.kth.se
-rwxr-xr-x  1 esjolund gopher 27 Oct 19 16:57 script.sh
-rwxr-xr-x  1 esjolund gopher 71 Oct 20 09:22 submit_script.sh

Looks good.

34.3.2. spq

The command spq displays the scheduler job queue. The available options are listed by typing spq -h.

s07n01$ spq -h
Usage: spq [-a][-c cac][-h][-l][-L][-q][-r][-u user][-v][-w]
 -a      : show all users.
 -c cac  : show jobs of cac.
 -h      : show this help.
 -l      : show current job limits.
 -L      : show limit definitions.
 -q      : omit headers.
 -r      : show running jobs.
 -u user : show jobs of user.
 -v      : verbose, combine with help.
 -w      : wide output - show more.

If we have submitted jobs we can see their placement in the queue like this.

s07n01$ spq -u $USER
  Q          JID  USER     STATE    CAC          RESOURCE TIME
  3 082413232738  esjolund wait     sbc.esjolund       2S 0h01

The digit in the Q column stands for the placement in the queue. To see how a job proceeds in the queue, see Example 13, “Submitting a job”. The Q-value might also be "inf", which means the job is waiting to get a queue number. This happens if you have too many jobs in the queue already.

34.3.3. sprelease

The command sprelease removes jobs from the queue or from the machine where it is running. The available options are listed by typing sprelease -h.

s07n01$ sprelease -h
Usage: sprelease [-h][-v] [JobID]
       sprelease -S [-h][-v][-m] JobID

    -v verbose mode.
    -h prints this message.
    -m sends mail to user.
    -S use staff enforcement strategy.

       Without Job ID it releases only the node it's run from.
       With a Job ID it releases all nodes running that job,
       or removes it from the queue if it hasn't started yet.

[Note]Note

It may take some minutes before the job vanishes after an sprelease

Example 15. Releasing jobs

We already submitted two jobs and they are now in the queue.

s07n01$ spq -q -u $USER
 13 082507595429  esjolund wait     sbc.esjolund       1S 0h04
 14 082507595951  esjolund wait     sbc.esjolund       1S 0h04

We don't want them to run so we cancel them by doing

s07n01$ spq -q -u $USER  | awk '{print $2}' | xargs -i sprelease {}
sprelease: dequeue request issued for job 082507595429 user esjolund.
sprelease: dequeue request issued for job 082507595951 user esjolund.

It takes a while for the request to take action ...

s07n01$ spq  -u $USER
  Q          JID  USER     STATE    CAC          RESOURCE TIME
 13 082507595429  esjolund wait     sbc.esjolund       1S 0h04
 14 082507595951  esjolund wait     sbc.esjolund       1S 0h04
s07n01$ spq  -u $USER
  Q          JID  USER     STATE    CAC          RESOURCE TIME
 10 082507595429  esjolund wait     sbc.esjolund       1S 0h04
 11 082507595951  esjolund wait     sbc.esjolund       1S 0h04
s07n01$ spq  -u $USER
  Q          JID  USER     STATE    CAC          RESOURCE TIME
  9 082507595429  esjolund wait     sbc.esjolund       1S 0h04
 10 082507595951  esjolund wait     sbc.esjolund       1S 0h04
s07n01$ spq  -u $USER
  Q          JID  USER     STATE    CAC          RESOURCE TIME

Ok, now they're gone.

34.3.4. spusage

The command spusage shows who is using the nodes. The available options are listed by typing spusage -h.

s07n01$ spusage -h
usage: spusage [-h][-r]
spusage displays the current resource file.

To list your currently used nodes type spusage | grep $USER

s07n01$ spusage | grep $USER
s05n36.pdc.kth.se     U   1 esjolund 082507452729 2004-08-25 09:56:00
s05n37.pdc.kth.se     U   1 esjolund 082507453972 2004-08-25 09:56:00

34.3.5. spwhen

spwhen gives an estimate of when a job might start. spwhen itself does a lot of computations and may take some minutes to run. The available options are listed by typing spwhen -h.

s07n01$ spwhen -h
usage: /pdc/vol/easy/1.6/bin/spwhen [-w][-h]
-h     get help.
-w     wide output.

34.4. Interactive and non interactive

Most users just submit jobs and then patiently waits for the jobs to finish. But as soon as the nodes got allocated you are authorized to log in to them. There you can start working interactively. You might for instance want to check how your executed command is proceeding. If your sole purpose of allocating a node is to work interactively you can leave out the command argument to the esubmit command altogether.

Example 16. Working interactively on a node

We'd like to work interactively on a cluster node for 30 minutes. To allocate it we use the esubmit command but we leave out the command argument.

s07n01$ esubmit -n 1 -t 30

The hostname of the allocated node is listed in an email that we receive after a few minutes.

From: easy <easy@pdc.kth.se>
To: esjolund@pdc.kth.se
Subject: 082508204842 release request
Date: Wed, 25 Aug 2004 10:26:07 +0200 (CEST)
It is 2004-08-25 10:26:07 and a request to release
your job 082508204842 has just been issued.
The request involves following resources:

s09n03.pdc.kth.se

we can log into that node and start working

esjolund@otto:~$ ssh s09n03.pdc.kth.se 
Last login: Thu Mar  3 12:35:40 2011 from otto.sbc.su.se
CentOS 5 at PDC installed Fri Sep 17 16:06:35 CEST 2010
s09n03$ echo Now I am working interactively at my allocated node
Now I am working interactively at my allocated node

34.5. Freely available untrustworthy nodes ( also called interactive nodes )

There are some nodes that have been taken out of the queuing system and are now instead freely available for everyone to log into. The reason they are no longer in the normal cluster is that they had hardware problems. They are not so reliable as the other nodes. You can use them but you should know that:

  • They may be rebooted anytime without any previous warning

  • There may be many users logged in sharing the computer with you.

  • These computer nodes prime purpose is to give users a quick way to test programs.

By typing spusage | grep interactive | awk '{print $1}' you get a list of all such "untrustworthy" nodes.

esjolund@otto:~$ ssh ferlin.pdc.kth.se "module add easy; spusage | grep interactive | awk '{print \$1}'"
a04c21n11.pdc.kth.se
a06c21n06.pdc.kth.se
a11c11n13.pdc.kth.se
a11c31n14.pdc.kth.se

Let us log in to a11c31n14.pdc.kth.se and see which users are currently logged in there.

esjolund@otto:~$ ssh a11c31n14.pdc.kth.se
Last login: Thu Mar  3 12:28:23 2011 from otto.sbc.su.se
CentOS 5 at PDC installed Fri Sep 17 16:06:35 CEST 2010
a11c31n14$ w
 14:59:32  up 7 days, 21:36,  3 users,  load average: 0.00, 0.22, 0.56
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU  WHAT
esjolund pts/2    193.10.156.225    2:59pm  0.00s  0.05s  0.02s  w
erikgr   pts/0    130.237.93.36    18Aug04  6days  0.57s  0.42s  bash
bjornw   pts/1    130.237.93.21    Mon 9am  1:16m  0.78s  0.78s  -bash
a11c31n14$

34.6. Advice on usage

34.6.1. don't write to the same AFS file from many nodes at the same time

The most common reason for AFS being slow is that many cluster nodes write to the same file at the same time. Sometimes programs write a log in a dot file in the users home directory. Please watch out for this.

[Warning]Warning

Please watch out for the command formatdb from the bioinformatics package blast. If you use that program, make sure it doesn't write the log file to AFS. Use the command line option -l to specify another path, e.g. /scratch/$USER/formatdb.log.

34.6.2. Use the local file system as much as possible

It is much faster to store temporary files on the local hard drive on the cluster node than on AFS. Excessive usage of AFS tends to slow down AFS for everyone. If your job requires heavy file access, make sure your compute job first copies all your data to the local /scratch directory. Also let the compute job write its result files into the local /scratch directory. As a final step the compute job can copy the result files into AFS.

If every node needs to read the same big indata file, you might want to place a copy of that big file in /scratch on some of the untrustworthy nodes ( see Section 34.5, “Freely available untrustworthy nodes ( also called interactive nodes )” ). The reason would be to avoid using AFS. You could then copy that file to the compute nodes with scp. Don't forget to remove the file from the untrustworthy nodes afterwards.

Thanks Hossein, for sharing this tip. Note, as this tip includes using the untrustworthy nodes, you should not file bug reports about failures to PDC.

34.6.3. 4-hour jobs are preferred

If you have the choice between submitting a single long job taking a week or doing the same by splitting it up in multiple smaller jobs taking about 4 hours, it's preferred that you choose the smaller jobs alternative. It makes the administration of the cluster easier and it makes your jobs less vulnerable to hardware failures. The cluster is optimized for 4 hours jobs ( quite some number of nodes are reserved for such jobs ).

Before a new job can be started on a cluster node, the queuing system needs to clean and prepare the node. Due to this administration overhead ( up to 5 minutes ), using a lot of short jobs will be somewhat uneconomic. The cluster nodes will then be waisting relatively seen more time in preparation mode. Jobs running some hours seem to be a good compromise.

34.6.4. Don't fill the queuing system with too many jobs

If you submit 10.000 jobs in advance, they will, although just being in a pending state, slow down the queuing system for everyone. Try to submit more frequently instead. For instance once a day, if possible. Normally the cluster should be able to handle a submission of 1000-2000 4-hour jobs, but this all depends on how many jobs are already in the queue. To see how long the cluster queue is, run these commands

s07n01$ module add easy
s07n01$ spq | wc -l
209

Under normal conditions this number lies below 10000. If you see higher numbers, the queuing system is probably already running slow and you should try to avoid submitting large number of new jobs.

34.6.5. Checkpointing

It might be hard to know in advance how long time your job will take. If the time specified in the -t option to esubmit is too small the queuing system will kill your job before it has finished. But your running process has the possibility to save an intermediate result to AFS right before the process gets killed. About 30 seconds before the queuing system definitely kills your job it sends the signal SIGTERM to your job. You can write your program to catch this signal and do neccesary actions to save an intermediate result. You only got 30 seconds time to do the savings, though.

Example 17. Catching the SIGTERM in the job

We prepare a script /afs/pdc.kth.se/home/e/esjolund/Public/checkpointtest.sh that should catch the SIGTERM signal.

#!/bin/sh

file=/afs/pdc.kth.se/home/e/esjolund/Private/output.txt
echo "The script starts here" > $file

trap "echo received signal SIGTERM - I should save my stuff now >> $file" SIGTERM 

while /bin/true
do
       sleep 4
       date >> $file
done

A one minute job is submitted

s07n01$ esubmit -n 1 -t 1 /afs/pdc.kth.se/home/e/esjolund/Public/checkpointtest.sh

After the queuing system killed the job the file /afs/pdc.kth.se/home/e/esjolund/Private/output.txt has the content

The script starts here
Wed Aug 25 13:55:32 CEST 2004
Wed Aug 25 13:55:36 CEST 2004
Wed Aug 25 13:55:40 CEST 2004
Wed Aug 25 13:55:44 CEST 2004
Wed Aug 25 13:55:48 CEST 2004
Wed Aug 25 13:55:52 CEST 2004
Wed Aug 25 13:55:56 CEST 2004
Wed Aug 25 13:56:00 CEST 2004
Wed Aug 25 13:56:04 CEST 2004
Wed Aug 25 13:56:08 CEST 2004
Wed Aug 25 13:56:12 CEST 2004
Wed Aug 25 13:56:16 CEST 2004
Wed Aug 25 13:56:20 CEST 2004
Wed Aug 25 13:56:24 CEST 2004
Wed Aug 25 13:56:28 CEST 2004
Wed Aug 25 13:56:32 CEST 2004
Wed Aug 25 13:56:36 CEST 2004
Wed Aug 25 13:56:40 CEST 2004
Wed Aug 25 13:56:44 CEST 2004
Wed Aug 25 13:56:48 CEST 2004
Wed Aug 25 13:56:52 CEST 2004
Wed Aug 25 13:56:56 CEST 2004
Wed Aug 25 13:57:00 CEST 2004
Wed Aug 25 13:57:04 CEST 2004
Wed Aug 25 13:57:08 CEST 2004
Wed Aug 25 13:57:12 CEST 2004
Wed Aug 25 13:57:16 CEST 2004
Wed Aug 25 13:57:20 CEST 2004
Wed Aug 25 13:57:24 CEST 2004
Wed Aug 25 13:57:28 CEST 2004
Wed Aug 25 13:57:32 CEST 2004
Wed Aug 25 13:57:36 CEST 2004
received signal SIGTERM - I should save my stuff now
Wed Aug 25 13:57:40 CEST 2004
Wed Aug 25 13:57:44 CEST 2004
Wed Aug 25 13:57:48 CEST 2004
Wed Aug 25 13:57:52 CEST 2004
Wed Aug 25 13:58:00 CEST 2004
Wed Aug 25 13:58:04 CEST 2004

We see that it took about 30 seconds from the echoing of "received signal SIGTERM - I should save my stuff now" til the job was killed.

34.7. Scheduler

When users submit jobs to the cluster their jobs will be put in a queue. The scheduler decides which jobs should be served first. But how does it work more in detail?

s07n01$ spq -L
        INTERVAL  NICKNAME                           NJOB WALLTIME
  - ]960h,8760h]  no_no_no -        -                   - -
  -  ]240h,960h]  month    -        -                   - 256h
  -   ]60h,240h]  week     -        -                   - 256h
  -    ]15h,60h]  weekend  -        -                   - 64h
  -     ]4h,15h]  night    -        -                   - 64h
  -      ]1h,4h]  day      -        -                   - 64h
  -    ]1h,960h]  nodetime -        -                   - -
  -   ]0m01s,1h]  short    -        -                   - 3h
  -   ]0m01s,1h]  Nshort   -        -                   8 -

Each line in the output from the command spq -L represents a separate queue. These queues are totally separate. They don't influence each other. They also don't take into account jobs that are already running on the cluster. Each queue handles jobs with certain run times. For instance, the queue "weekend" handles jobs that have a requested run time of 15 to 60 hours. A user will be able to submit jobs into that queue as long as the sum of the requested run times of his jobs already present in this queue are less than WALLTIME ( here 64 hours ). The last queue Nshort, has instead a limit of the number of jobs in the queue ( NJOB = 8 ).

Jobs that didn't make it directly into the queues go into a wait stage ( Inf ) .

s07n01$ spq | grep Inf
Inf 071922471056  lama     wait     free.lama          1S 0h05

When the queue limit permits it again they will be put into the queue.

35. Databases

35.1. mysql

At SBC postgresql is the preferred database server because postgresql has Kerberos support and therefore better integrates with the cluster and our systems. But you might still have a strong need for using mysql so here are some instructions how you can use it.

35.1.1. mysql at www.sbc.su.se

If you want to use mysql for a dynamic web page at www.sbc.su.se you could try the solution described here. But you should be aware that the CGI script won't be able to submit to the cluster.

First create the mysql configuration file ( but replace /home/esjolund with your own home directory path )

[esjolund@otto ~]$ ssh -p 50011 www
esjolund@www's password: 
[esjolund@tumba ~]$ emacs ~/.my.cnf
[esjolund@tumba ~]$ cat ~/.my.cnf
[mysqld]
datadir=/home/esjolund/mysql/datadir
socket=/home/esjolund/mysql/mysql.sock
user=esjolund
old_passwords=1
tmpdir=/home/esjolund/mysql/tmp
log=/home/esjolund/mysql/mysqld.log
skip-networking

[mysql.server]
user=esjolund
basedir=/var/lib
skip-networking

[mysqld_safe]
err-log=/home/esjolund/mysql/mysqld.log
pid-file=/home/esjolund/mysql/mysqld.pid
skip-networking

[mysql]
socket=/home/esjolund/mysql/mysql.sock

[client]
socket=/home/esjolund/mysql/mysql.sock

create some directories

[esjolund@tumba ~]$ mkdir -p  ~/mysql ~/mysql/datadir ~/mysql/tmp

initialize the database

[esjolund@tumba ~]$ mysql_install_db --defaults-file=~/.my.cnf
Installing all prepared tables
Fill help tables

To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h tumba password 'new-password'
See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com

[esjolund@www ~]$ mysqld_safe --defaults-file=~/.my.cnf &

Now log into the database as the root user. ( It has nothing to do with the system root user, it is the mysql root user )

[esjolund@www ~]$ mysql -u root -S ~/mysql/mysql.sock 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.20

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> 

Right now the root password is empty so you need to set it to something else ( see Securing the Initial MySQL Accounts ).

Probably you want to do the same with the anonymous account. After that you could create a new user account for your username and then create database tables ( see GRANT Syntax ). ( If you have some nice examples here please tell me / Erik Sj )

Sometimes the web server will be rebooted and after that your database server won't be running anymore. One possible solution is to have a crontab script running every 5 minutes that will restart your database. Sorry, about the lack of details here.

[esjolund@www ~]$ man crontab
[esjolund@www ~]$ man 5 crontab

( exit reading the man page by pressing the key "q" )

35.1.2. mysql at your local desktop computer

One problem with using mysql on your local desktop computer is where to place the datadir directory. Preferably it should be placed on a local hard drive but on the desktop computers all such directories could be erased anytime ( see Section 14.5, “Local hard drive” ). Placing the datadir on AFS, might or might not work. ( If you can fill in with more information here please tell sbc-sys@sbc.su.se ). But the socket file need for sure be placed on the local hard drive, it can't be placed on AFS. Just use mysql on your local desktop computer if you are aware of these caveats. You could then follow the same method as described in Section 35.1.1, “mysql at www.sbc.su.se”.

36. Firewalls

The desktop computers each run their own firewall that blocks listening sockets ( except ssh ).

Some ports are also blocked by the main routers at the university.

37. Working from home

If you would like to work from home and have a Linux box available, simply use the command ssh by typing ssh -XC youraccount@yourmachine.scilifelab.se. You should now be able to open graphical applications too. They will appear to run slowly because of the delay of the network. If you need to copy files use the command scp.

Example 18. Logging in to your SciLifeLab Linux desktop from home

The SciLifeLab Linux desktops have IP addresses outside of the VPN protected network so you can log in directly with ssh

esjolund@kantarell:~$ ssh esjolund@harry.scilifelab.se
esjolund@harry.scilifelab.se's password: 

If you want to be able to start programs that open X-windows (e.g. Firefox) you should pass the -XC options to ssh.

esjolund@kantarell:~$ ssh -XC esjolund@harry.scilifelab.se
esjolund@harry.scilifelab.se's password: 

37.1. Knoppix

If you don't have any Linux box you still might be able to run ssh. You could run a Knoppix Linux live CD directly from a CD-rom. You need a minimum of 96 Mb of RAM memory for this though.

[Caution]Caution

If you run Knoppix, try to use a fairly recent Knoppix version to avoid security holes that might have been discovered since the CD was burned.

37.2. xlivecd

Another option is to run the software xlivecd in Windows. From their homepage: "XLiveCD allows users of Microsoft Windows to connect to remote Unix computers, run graphical applications and have the graphics displayed on their desktops. The software runs from the CD without being installed."

37.3. Cygwin

Section 37.2, “xlivecd” is actually just a nicely packaged Section 38.1, “Cygwin” with an additional X server. If you install them yourself you have the option to install more Unix software tools from the cygwin package.

38. The Windows computer

SBC owns a Dell laptop ( model: Latitude 110L ) running Windows XP Professional. The laptop is normally in Erik Sonnhammers room. Please ask him if you want to borrow the laptop.

You don't need any user account or password to use it.

[Important]Important

Do not store anything of value at the Windows computer. It may be reinstalled anytime without notice.

Do not install any software at the Windows computer.

Just use it for research and job related stuff. We want to avoid viruses as much as possible.

The computer is installed with

38.1. Cygwin

Cygwin is a Linux-like environment for Windows. It is convenient for those of you that feel more comfortable with unix commands than navigating through the windows graphical user interface. Cygwin gives you a bash shell where you can find commands like ssh, scp, emacs, df, find and ls. One tip though, C:\ is mapped to /cygdrive/c.

Example 19. Using cygwin to copy a file to a Linux computer and logging in

39. Customizing your desktop

39.1. Hardware beep signal

Not related to the external speakers is an internal sound generator inside of the computer. Some people find the beeps it produce annoying and want to turn it off.

39.1.1. Command line beep signal

On a standard redhat installation an error beep is heard when you for instance press backspace on an empty command line. We have chosen to turn that beep off by default. You can still get the beep back if you create the file ~/.inputrc with the contents

$include /etc/inputrc
set bell-style audible

39.1.2. Emacs beep signal

The emacs hardware beep signal is now turned on per default. To turn off beeps in emacs, put this in your ~/.emacs file.

(setq ring-bell-function '(lambda ()))

To turn off the hardware beep in xemacs add the line

(setq bell-volume 0)

to your file ~/.emacs

39.1.3. Turning off beep altogether

If you don't want any application to be allowed to produce the hardware beep signal, put this in your ~/.bashrc file.

if [ -n "$DISPLAY" ]; then
  xset b off
fi

40. Module sub system

We use the software modules to facilitate the running of extra software installed to our Linux computers. The extra software packages get installed in non-standard places in the file system so they are so to say "hidden" under normal usage. The module command sets up the proper environment variables to let the user access and run these software packages.

40.1. Module usage

Which set of commands that are available to you on the command line are dependent of the two environment variables PATH and LD_LIBRARY_PATH. The value of PATH is a colon-separated string of directory names that specifies the places where the operating system will look for the executable. The value of LD_LIBRARY_PATH is a colon-separated string of directory names that specifies the places where the operating system will look for shared libraries that an executable might be dependent of. The directory entries are scanned in the order left to right.

When you need to execute commands that are not installed in any of the normal places ( e.g. /bin, /usr/bin ) you will have to adjust the environment variables PATH and LD_LIBRARY_PATH. Either you could do it explicitly with the help of the command export or even easier with the module add. The module command also takes care of setting up other environment variables that might be needed, e.g. PERL5LIB and MANPATH.

To get a list of all available command options, type module help

[esjolund@oxygen esjolund]$ module help

                ModulesTcl 0.101/$Revision: 1.47 $:
                Available Commands and Usage:

list         |  add|load            modulefile [modulefile ...]
purge        |  rm|unload           modulefile [modulefile ...]
reload       |  switch|swap        [oldmodulefile] newmodulefile
             |  display|show        modulefile [modulefile ...]
             |  avail              [modulefile [modulefile ...]]
             |  whatis             [modulefile [modulefile ...]]
             |  help               [modulefile [modulefile ...]]
             |  path                modulefile
             |  paths               modulefile
             |  use                 dir [dir ...]
             |  unuse               dir [dir ...]
             |  source              scriptfile
             |  apropos|keyword     string
             |
initlist     |  initadd             modulefile
initclear    |  initprepend         modulefile
             |  initrm              modulefile

To get a list of all available modules, type module avail

[esjolund@oxygen esjolund]$ module avail

----------------- /afs/pdc.kth.se/home/a/arnee/modules/noarch ------------------
bioperl/0.0       bioperl/1.0       genbank_genomes/0 ptkdb/1.1074
bioperl/0.7       bioperl/1.2       pdb_mirror/0      ptkdb/1.108
bioperl/0.7.1     ensembl/14        psh/0             webedit/1.0

( Not all output shown above ). module avail finds the available modules by searching all directories in the MODULEPATH environment variable ( a colon separated list ).

Now let us take a look at the current values of the environment variables PATH and LD_LIBRARY_PATH

[esjolund@oxygen esjolund]$ echo $LD_LIBRARY_PATH
[esjolund@oxygen esjolund]$ echo $PATH
/usr/heimdal/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin

If we want to run psh/0 you will have to first add it through the module command.

[esjolund@oxygen esjolund]$ module add psh/0

Let us look at the values of the environment variables PATH and LD_LIBRARY_PATH again.

[esjolund@oxygen esjolund]$ echo $LD_LIBRARY_PATH
[esjolund@oxygen esjolund]$ echo $PATH
/afs/pdc.kth.se/home/m/maccallr/data/modules/psh/bin:/usr/heimdal/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin

In this case LD_LIBRARY_PATH didn't change. It was empty both before and after. But PATH had /afs/pdc.kth.se/home/m/maccallr/data/modules/psh/bin prepended to it.

We can now start the psh command just by tying psh on the command line. See also Section 14.2.7, “fs sysname”

41. Installing software

41.1. Installing software with apt-get install

If you want to install additional software use the command apt-get install.

Example 20. Install flashplugin with apt-get

If you for instance want to install "flash"

esjolund@oxygen:~$ apt-cache search flash

In the output from the command you see the package name "flashplugin-installer"

esjolund@oxygen:~$ sudo su -
[sudo] password for esjolund: 
id: cannot find name for group ID 1105205133
root@otto:~# apt-get update
root@otto:~# apt-get install flashplugin-installer
root@otto:~# exit
esjolund@oxygen:~$

If you don't find the software you are looking for with the command apt-cache search you might be able to install the software from source code. Follow the instructions in the the sources that you download. Important is that you don't run any of the build commands as root ( that also includes things like sudo make install ). You should always build software from your normal user account. Running build commands as root might install files into the system directories ( e.g. /usr/lib ) but those directories should be used only by the package system ( apt-get ).

Example 21. Install missing include file with apt-get

If you try to install some software from source code you might get an error that an include file is missing

esjolund@oxygen:builddir $ make
esjolund@oxygen:builddir $ error: could not find libxml/parser.h

If your Ubuntu system lacks a certain include file you could search for the file in the Ubuntu Packages Search. When you know the package name you install it with apt-get install.

esjolund@oxygen:~$ sudo su -
[sudo] password for esjolund: 
id: cannot find name for group ID 1105205133
root@otto:~# apt-get update
root@otto:~# apt-get install libxml2-dev
root@otto:~# exit
esjolund@oxygen:~$

See also Section 41.2.1, “Installing c/c++ software as a module from source code”.

41.2. Install your own software as a module from source code

41.2.1. Installing c/c++ software as a module from source code

Most open source projects written in C or C++ are released as sources together with Makefiles and configure scripts generated by the Auto tools (Autoconf, Automake, Libtool). If you see a script called "configure" in the root directory of the source package, chances are good that it was generated with Autotools. The script configure let you specify where to install the software with the --prefix option. You need to choose a directory where you have write permissions. A suggestion is to install the software in your public area of your afs directory, if you want others to be able to use the software. Installing it on afs also gives you the benefit that the software (hopefully) will be runnable on both our internal desktop machines and on the cluster nodes.

Example 22. Installing TreeView as module from source code

We want to install TreeView from source code. Tree view is dependent on the widget library wxGTX, so we first have to install wxGTX.

Set the shell variable dir to an absolute path to some empty public readable directory in your afs directory. ( The variable name "dir" was abritrarily chosen ). Try to use an absolute path starting with /afs/pdc.kth.se.

dir=/afs/pdc.kth.se/home/b/bens/Public/treeview-0.4 

Create the directory if it doesn't already exist.

mkdir $dir

Create a sub directory where we want to install the resulting software.

mkdir $dir/install

Unpack the sources.

cd $dir
tar xvfz /tmp/tv-0.4.tar.gz
tar xvfj /tmp/wxGTK-2.4.2.tar.bz2

Change directory into the untarred sources.

cd $dir/wxGTK-2.4.2

In this directory you may find the files README and INSTALL. Take a quick look in those files if they are available.

less README
less INSTALL

If the software package is using the autotools install method, you also find a script named configure. To see what options the script takes, type ./configure --help

./configure --help

The options specify how the software package should be compiled ( e.g. --with-gtk ). For sure we want to use the option --prefix=$dir/install to relocate the install directory to a non-standard place.

./configure --prefix=$dir/install --with-gtk --enable-gtk2 && make && make install

the required library wxGTK has been installed

export PATH=$dir/install/bin:$PATH
export LD_LIBRARY_PATH=$dir/install/lib:$LD_LIBRARY_PATH

cd $dir/tv-0.4
./configure --prefix=$dir/install && make && make install

What remains to do is to create a module script so that other people also will be able to use TreeView. When the module script is created, TreeView will be listed when a user types module avail. The script file should be created underneath one of the directory entries in the environment variable MODULEPATH. You of course need write permission to do it. You could ask Erik Sjölund to place it there for you.

[esjolund@oxygen esjolund]$ cd /afs/pdc.kth.se/home/a/arnee/modules/i686
[esjolund@oxygen i686]$ ls
acrobat   darwin   ghmm     modeller   netlab   rasmol  subversion  tmhmm    xmgr
beta      diction  grace    molscript  palign   sap     targetp     toppred
blast     dssp     hmmer    mysql      phylip   spdbv   tcoffee     whatif
clustalw  fasta    lgscore  naccess    psipred  stride  tinker      xgvis
[esjolund@oxygen i686]$ mkdir treeview
[esjolund@oxygen i686]$ cd treeview
[esjolund@oxygen treeview]$ echo '
#%Module2.5b
#
#
set installdir /afs/pdc.kth.se/home/b/bens/Public/treeview-0.4 

prepend-path PATH               $installdir/bin
prepend-path LD_LIBRARY_PATH    $installdir/lib
' > 0.4

The script file has the filename 0.4 which should be the version number of the software. That file resides in a directory which name is the name of the software (in this case "treeview").

See also Example 21, “Install missing include file with apt-get”

41.2.2. Installing perl software from cpan

[Note]Note

The word module is used in two different contexts in this section. Module in the sense of Perl module and also in the sense of module from modules.

CPAN a large archive of software written in Perl. To install perl software from CPAN, first choose a directory where you have a lot of space

[esjolund@otto ~]$ fs lq ~/space/Private/
Volume Name                   Quota      Used %Used   Partition
prj.sbc.esjolund00          5000000   1247   1%       34%    

create directories for CPAN configuration and the installation of CPAN perl modules

[esjolund@otto ~]$ bigdir=~/space/Private
[esjolund@otto ~]$ mkdir $bigdir/cpan  $bigdir/perl-from-cpan

create symlinks

[esjolund@otto ~]$ ln -s $bigdir/cpan ~/.cpan
[esjolund@otto ~]$ ln -s $bigdir/perl-from-cpan ~/perl-from-cpan

create some directories

[esjolund@otto ~]$ mkdir ~/.cpan/CPAN  ~/.cpan/sources

download configuration files for CPAN

[esjolund@otto ~]$ wget --no-check-certificate  -O  ~/.cpan/sources/MIRRORED.BY https://www.sbc.su.se/intra/user-guide/files/MIRRORED.BY 
[esjolund@otto ~]$ wget --no-check-certificate  -O  ~/.cpan/CPAN/MyConfig.pm https://www.sbc.su.se/intra/user-guide/files/MyConfig.pm

set up CPAN

[esjolund@otto ~]$ perl -MCPAN -e shell;
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.7601)
ReadLine support available (try 'install Bundle::CPAN')

cpan> 

type install Bundle::CPAN

cpan> install Bundle::CPAN
CPAN: Storable loaded ok
LWP not available
CPAN: Net::FTP loaded ok
Fetching with Net::FTP:
  ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/01mailrc.txt.gz

Try to answer the questions. Then run reload cpan

cpan> reload cpan

If you want to install a perl module, just type install modulename. For instance

cpan> install Compress::Zlib

quit the CPAN setup

cpan> quit
Lockfile removed.

Before running your Perl program you need to set the PERL5LIB environment variable

[esjolund@otto ~]$ export PERL5LIB=~/perl-from-cpan/lib/perl5/

Your perl program now has access to the perl modules installed in ~/perl-from-cpan/lib/perl5/. You might need to experiment with the colon separated list of directories that are set in the environment variable PERL5LIB. Maybe you need to have:

[esjolund@otto ~]$ export PERL5LIB=~/perl-from-cpan/lib/perl5/:~/perl-from-cpan/lib/perl5/x86_64-linux-gnu-thread-multi

Probably you want to put the export line in your ~/.bashrc. Another possibility is to create a module for your installed perl software. To do this create a subdirectory under one of the directories listed in the environment variable MODULEPATH. If you want to have your own module directory you need to append a directory name to that variable.

[esjolund@oxygen esjolund]$ export MODULEPATH=$MODULEPATH:~/my_modules
[esjolund@oxygen esjolund]$ mkdir -p ~/my_modules/my_cpanperl

create a file

esjolund@oxygen:~$ echo '
#%Module2.5b
#
#
set dir $HOME/perl-from-cpan

prepend-path PATH               $dir/bin
prepend-path PERL5LIB    $dir/lib/perl5
' > ~/my_modules/my_cpanperl/5.8.5

the module is now available

esjolund@oxygen:~$ module avail 2>&1 | grep my_cpanperl
my_cpanperl/5.8.5

to add it, type

esjolund@oxygen:~$ module add my_cpanperl

41.2.3. Installing perl software as a module from source code

You are probably better off by using the installation method described in Section 41.2.2, “Installing perl software from cpan”. But if the perl software is not in CPAN you need to install in a fashion described here.

A lot of software written in perl are released as sources together with a Makefile.pl file. The file Makefile.pl let you specify where to install the software with the PREFIX option. You need to choose a directory where you have write permissions. A suggestion is to install the software in your public area of your afs directory, if you want others to be able to use the software. Installing it on afs also gives you the benefit that the software (hopefully) will be runnable on both our internal desktop machines and on the cluster nodes.

Example 23. Installing bioperl from source code

After packaging up the bioperl sources in a directory we do:

[esjolund@oxygen tmp]$ cd bioperl-1.4/
[esjolund@oxygen bioperl-1.4]$ ls
AUTHORS           biodesign.pod  bioscripts.pod  Changes     examples  INSTALL.WIN  Makefile.old  MANIFEST.SKIP  README
Bio               bioperl.lisp   bptutorial.pl   DEPRECATED  FAQ       LICENSE      Makefile.PL   models         scripts
biodatabases.pod  bioperl.pod    BUGS            doc         INSTALL   maintenance  MANIFEST      PLATFORMS      t
[esjolund@oxygen bioperl-1.4]$ mkdir /afs/pdc.kth.se/home/e/esjolund/Public/bioperl-1.4 
[esjolund@oxygen bioperl-1.4]$ perl Makefile.PL PREFIX=/afs/pdc.kth.se/home/e/esjolund/Public/bioperl-1.4
[esjolund@oxygen bioperl-1.4]$ make
[esjolund@oxygen bioperl-1.4]$ make install

We probably also have to set the environment variable PERL5LIB to be able to run it. What now remains to do is creating the module script. Do it in a similar way as in Section 41.2.1, “Installing c/c++ software as a module from source code”.

41.3. Installing python modules on the cluster

This is a short guide on how to install local modules on the cluster. It is useful when a module you need is not available or, you need to use a newer version of an existing module. Since you do not have root access on the cluster you will have to install the modules locally for your own user.

Setting up a module directory

The first step is to set up a directory where your Python modules will reside. For instance, you could create the directory python in your home directory.

[esjolund@oxygen ~]$ mkdir ~/python

Once you have your python module directory we need to instruct Python to where your local python modules are. In bash this can be accomplished by setting the PYTHONPATH environment variable in your ~/.bashrc. Add this line to your ~/.bashrc

export PYTHONPATH=~/python/lib/python2.6/site-packages/:$PYTHONPATH

The first part of the path, ~/python/, is the module base directory. The second part of the path, lib/python2.6/site-packages/, is where the executable part of a module resides, this is what Python needs to know about in order to load your modules. You might wonder why they are placed in this sub directory, the reason is that in addition to the executable part, Python modules can contain other things like documentation and examples. When you enter the above line your ~/.bashrc remember to change the version number of Python to the version that you have installed. You can find out which version is installed by running the command below and taking out the first two numbers.

[esjolund@oxygen ~]$ python --version
Python 2.6.5

On my computer the major Python version is 2.6. Once you have updated your ~/.bashrc you can refresh your shell by:

[esjolund@oxygen ~]$ exec bash

Finally verify that PYTHONPATH is set and that Python finds your path by

[esjolund@oxygen ~]$ echo $PYTHONPATH
/afs/nada.kth.se/home/h/u1czx8bh/python/
> python -import sys; print(sys.
['', '/afs/nada.kth.se/home/h/u1czx8bh/python', '/usr/lib/python2.6', ...]

Make sure that your PYTHONPATH looks correct, then make sure that your path is listed as the second element in the sys.path array.

Example 24. Installing the Python module networkx from source code

Let us now install a module the networkx module as an example. First change to a suitable directory where you can put your temporary source files. Then perform the commands below, the prefix should be equal to your module base directory described in the previous section.

[esjolund@oxygen ~]$ wget --quiet http://networkx.lanl.gov/download/networkx/networkx-1.5.tar.gz
[esjolund@oxygen ~]$ mkdir /tmp/eriktmp
[esjolund@oxygen ~]$ cd /tmp/eriktmp
[esjolund@oxygen eriktmp]$ tar xfz networkx-1.5.tar.gz
[esjolund@oxygen eriktmp]$ cd networkx-1.5
[esjolund@oxygen networkx-1.5]$ python setup.py install --prefix=~/python/

Verify the installation by

[esjolund@oxygen ~]$ python -c "import networkx; print networkx.__version__"
1.5

42. Troubleshooting

42.1. General advice

42.1.1. Find the answer with Google

If you have some computer problem, first try to see if you find the answer in this User guide. If you can't find it here you should try to see if the solution to the problem could be easily be found on Google. For instance, cut and paste the error message as a quoted search string to google.

If you don't find any relevant answer under the "Web" tab, click the "Groups" tab to see news group postings.

42.1.2. Find the answer on superuser.com or some other Stackexchange web site

You might find the solution to your problem by searching these sites. For instance the site http://superuser.com is for general computer user questions.

Table 9. Interesting stackexchange.com web sites

web sitedescription
http://superuser.coma Q&A site for computer enthusiasts
http://stackoverflow.coma programming Q&A site
http://scicomp.stackexchange.coma collaboratively edited question and answer site for scientists using computers to solve scientific problems
http://serverfault.coma Q&A site for system administrators and desktop support professionals
http://codereview.stackexchange.comQ&A for peer programmer code reviews
http://www.biostars.orgbioinformatics, computational genomics and biological data analysis
http://stats.stackexchange.comQ&A for statisticians, data analysts, data miners and data visualization experts
http://tex.stackexchange.comQ&A for users of TeX, LaTeX, ConTeXt, and related typesetting systems
http://cs.stackexchange.comQ&A for students, researchers and practitioners of computer science
http://cstheory.stackexchange.comQ&A site for theoretical computer scientists and researchers in related fields.

42.2. Printing

42.2.1. The print job is not printed

If you see that your print job can be seen in the print queue lpq -P printerqueue, but it is not printed on the printer. Please check that the printer queue has been disabled.

esjolund@pluto:~$ lpstat -a -p | grep disable
printer hpcolorlaserjetcp3525 disabled since 2011-04-13T14:55:01 CEST -
printer HPF2ColorQuad3 disabled since 2011-06-15T12:01:14 CEST -
printer HPF2Quad3 disabled since 2011-06-10T13:52:18 CEST -

Now we need to run this command on the cups server as root

root@cupsserver:~# cupsenable HPF2Quad3  HPF2ColorQuad3  hpcolorlaserjetcp3525

42.3. Subversion

42.3.1. Password for '(null)' GNOME keyring:

You can get rid of this message "Password for 'login' GNOME keyring:"

lukask@kall:~$ svn list https://svn.sbc.su.se/repos/cbr/rtpredictor
Password for 'login' GNOME keyring:

by removing the file ~/.gnome2/keyrings/login.keyring

lukask@kall:~$ rm ~/.gnome2/keyrings/login.keyring

This seems to be a known bug.

42.4. Can't log in

42.4.1. Can't log in to text terminal

You try to log in to log in to a text terminal ( Section 42.10, “how to log in to text terminal” ) but it doesn't work. Here is a list of requirements that need to be fulfilled to be able to log in to a text terminal at any of the SBC/CBR Linux desktop computers:

  • There need to be an entry for your Kerberos username in /etc/passwd and /etc/shadow. The specified shell should be /bin/bash. These files are autogenerated so they should normally be fine, but for users that have quit we specify the shell to be /sbin/nologin.

    esjolund@giga:~$ grep $USER /etc/passwd
    esjolund:x:4495:100:Erik Sjölund:/afs/pdc.kth.se/home/e/esjolund:/bin/bash
    

  • Your Kerberos account (principal) should not have been expired. ( PDC expires Kerberos accounts after some years ).You could test this by letting someone else sitting at a Linux desktop computer at SBC/CBR do something like:

    $ pagsh
    $ kinit erikgr
    erikgr@NADA.KTH.SE's Password:
    kinit: Password incorrect
    $ kinit eriksan
    eriksan@NADA.KTH.SE's Password:
    kinit: krb5_get_init_creds: Client (eriksan@NADA.KTH.SE) expired 
    $ exit
    

    Here we just provided some arbitrary non-valid password. Note the difference between the two usernames erikgr and eriksan. The Kerberos account eriksan has expired but not the Kerberos account erikgr.

    According to PDC's documentation about common kinit error messages, the error No ENC-TS found also indicates that it is "likely that your Kerberos principal has expired".

    $ pagsh
    $ kinit lumi
    lumi@NADA.KTH.SE's Password:
    kinit: krb5_get_init_creds: No ENC-TS found
    $ exit
    

    Read more here: Section 42.6.2, “Kerberos principal expiration date”.

  • When you log in you need to provide your correct Kerberos password. At another users SBC/CBR Linux desktop computer you might want to test your Kerberos password:

    $ pagsh
    $ kinit esjolund
    esjolund@NADA.KTH.SE's Password:
    kinit: Password incorrect
    $ kinit esjolund
    $ kdestroy
    $ exit
    

    First attempted password for username esjolund was not correct. The second attempted password succeeded. Note, that the kerberos password can also be expired if you haven't changed it in a long time. See also Section 44.2.12.1, “Forgetting the KTH kerberos password” and Section 42.6.3, “Kerberos password expiration date”..

42.4.2. Can't log in to desktop computer with ssh

If you can't log in to a Linux desktop computer, first make sure you can log in to a text terminal ( see Section 42.4.1, “Can't log in to text terminal” ). In addition to the requirements for logging in to a text terminal, for ssh this requirement must also be fulfilled:

  • Your username must be listed in /etc/sbc-ssh-users ( one username per line ).

    root@giga:~# grep esjolund /etc/sbc-ssh-users
    esjolund
    

An expired password could also be the cause of the problem. Let someone else type kinit your_username and then type a random password. If you see this

[esjolund@otto ~]$ kinit andale 
andale@NADA.KTH.SE's Password: 
kinit: krb5_get_init_creds: Password has expired

you could try to run the same command again but this time type in your correct password. You will then hopefully be asked to change your password to something new. See also Section 42.6.3, “Kerberos password expiration date”.

42.4.3. Can't log in to my Gnome desktop

If you can't log in to a Linux desktop computer, first make sure you can log in to a text terminal ( see Section 42.4.1, “Can't log in to text terminal” ). Now check that you haven't overused your quota.

[esjolund@otto ~]$ fs lq ~
Volume Name                   Quota      Used %Used   Partition
H.esjolund                   500000    176875   35%         28%

Please avoid being too close to 100%. It would be nice if you had at least 100-200 Mb free space available. To make space available you could move big directories to extra afs volumes and then create symlinks with ln -s if you want the old filename to still be functionable.

If it still doesn't work. Try to log in graphical mode with the session type "fail-safe". In the xterm window shown on the screen type

[esjolund@otto ~]$ strace -o gnome-session-log.txt -f gnome-session

You might see some interesting error messages written on the terminal. Also of interest is the file gnome-session-log.txt where all system calls have been logged. For instance all attempts to open files have been logged there.

42.4.4. Can't log in to the Ferlin cluster

If you get this error message:

esjolund@otto:~$ ssh ferlin.pdc.kth.se
Unable to negotiate a key exchange method

you need to follow the instructions in Section 2.3.2, “Adjust your ~/.ssh/config”

42.5. Gnome

42.5.1. Could not update ICEauthority file

Sometimes when users log in a popup window is shown with the text "Could not update ICEauthority file". It seems to be related to the fact that we are using AFS for our home directories. You can ignore that error message. If you know how we can get rid of that error message please contact erik.sjolund@sbc.su.se

42.5.2. Gnome desktop configuration disappeared

Sometimes when users have logged in their desktop configuration disappeared. A sign for this is also that the mail client evolution asks you to create a new mail account. To solve the problem try the solutions proposed in Section 42.4.3, “Can't log in to my Gnome desktop”.

42.5.3. Resetting the desktop configuration

Programs store their configuration in your home directory. Usually the configuration files and directories have names that start with a dot.

[esjolund@oxygen ~]$ ls -lda ~/.[^.]*
drwx------   2 esjolund others   4096 Dec 29  2003 /home/others/esjolund/.AbiSuite
-rw-------   1 esjolund others  10019 Feb  7 16:27 /home/others/esjolund/.bash_history
-rw-r--r--   1 esjolund others     24 Aug  4  2003 /home/others/esjolund/.bash_logout
-rw-r--r--   1 esjolund others    173 Dec  8 14:33 /home/others/esjolund/.bash_profile
-rw-r--r--   1 esjolund others    665 Dec  3 11:10 /home/others/esjolund/.bashrc
drwxr-xr-x   2 esjolund others   4096 Jan 10 16:10 /home/others/esjolund/.bluefish
drwxr-xr-x   3 esjolund others   4096 Jun 29  2004 /home/others/esjolund/.config
-rw-r--r--   1 esjolund others      0 Jan 27  2004 /home/others/esjolund/.desktop_printing_filetypes
-rw-r--r--   1 esjolund others     37 Nov 11  2003 /home/others/esjolund/.dmrc
drwxr-x---   2 esjolund others   4096 Feb  2 13:48 /home/others/esjolund/.eggcups
drwx------   2 esjolund others   4096 Feb  3 17:11 /home/others/esjolund/.elinks
-rw-r--r--   1 esjolund others    276 Sep  3  2003 /home/others/esjolund/.emacs
drwxr-xr-x   3 esjolund others   4096 Aug  6  2003 /home/others/esjolund/.emacs.d
-rw-rw-r--   1 esjolund web         5 Mar 22  2004 /home/others/esjolund/.emacs-places
-rw-------   1 esjolund others     16 Aug  4  2003 /home/others/esjolund/.esd_auth
drwxr-xr-x   7 esjolund others   4096 Feb  7 17:56 /home/others/esjolund/.evolution
-rw-r--r--   1 esjolund others  60973 Feb  8 11:54 /home/others/esjolund/.fonts.cache-1
drwxr-xr-x   6 esjolund others   4096 Nov 17 13:52 /home/others/esjolund/.fullcircle
drwxr-xr-x   2 esjolund others   4096 Nov 28  2003 /home/others/esjolund/.fvwm
drwx------   6 esjolund others   4096 Oct  8  2003 /home/others/esjolund/.galeon
drwx------   5 esjolund others   4096 Feb  3 15:49 /home/others/esjolund/.gconf
drwx------   2 esjolund others   4096 Feb  8 09:01 /home/others/esjolund/.gconfd
drwx------   3 esjolund others   4096 Aug  8  2003 /home/others/esjolund/.gconfd.old
drwx------   5 esjolund others   4096 Aug  8  2003 /home/others/esjolund/.gconf.old
drwxr-xr-x  17 esjolund others   4096 Jan 17 09:52 /home/others/esjolund/.gimp-1.2
drwx------   6 esjolund others   4096 Jan 24 15:09 /home/others/esjolund/.gnome
drwxr-xr-x   9 esjolund others   4096 Feb  3 15:49 /home/others/esjolund/.gnome2
drwx------   2 esjolund others   4096 Feb  2 14:15 /home/others/esjolund/.gnome2_private
drwxr-xr-x   2 esjolund others   4096 Jun 29  2004 /home/others/esjolund/.gnome-desktop
drwx------   2 esjolund others   4096 Aug  4  2003 /home/others/esjolund/.gnome_private
drwxr-xr-x   2 esjolund others   4096 Feb  2 13:49 /home/others/esjolund/.gstreamer-0.8
-rw-r--r--   1 esjolund others    146 Feb  2 13:48 /home/others/esjolund/.gtkrc-1.2-gnome2
-rw-r--r--   1 esjolund others   1118 Jan  7 11:01 /home/others/esjolund/.gtkrc-kde
-rw-------   1 esjolund others    376 Feb  3 15:48 /home/others/esjolund/.ICEauthority
drwxr-xr-x   2 esjolund others   4096 Aug  6  2003 /home/others/esjolund/.icons
drwxr-xr-x   3 esjolund others   4096 Oct 28  2003 /home/others/esjolund/.java
drwxr-xr-x   4 esjolund others   4096 Feb  2 14:06 /home/others/esjolund/.kde
-rw-------   1 esjolund others    265 Sep  6 14:08 /home/others/esjolund/.kderc
drwxr-xr-x  15 esjolund others   4096 Feb  2 16:47 /home/others/esjolund/.lyx
-rw-r--r--   1 esjolund others  26456 Feb  7 16:49 /home/others/esjolund/.mailcap
drwxr-xr-x   2 esjolund others   4096 Jun  9  2004 /home/others/esjolund/.mc
drwxr-xr-x   3 esjolund others   4096 Aug  6  2003 /home/others/esjolund/.mcop
-rw-------   1 esjolund others     31 Feb  3 15:48 /home/others/esjolund/.mcoprc
drwx------   3 esjolund others   4096 Aug  4  2003 /home/others/esjolund/.metacity
-rw-r--r--   1 esjolund others   2540 Feb  7 16:49 /home/others/esjolund/.mime.types
-rw-r--r--   1 esjolund others   2420 Feb  2 16:25 /home/others/esjolund/.modulesbeginenv
drwx------   5 esjolund others   4096 Sep 17 08:44 /home/others/esjolund/.mozilla
drwxr-xr-x   3 esjolund others   4096 Aug  4  2003 /home/others/esjolund/.nautilus
drwxr-xr-x   2 esjolund others   4096 Jan  7 12:38 /home/others/esjolund/.ncftp
-rw-r--r--   1 esjolund others    238 May 11  2004 /home/others/esjolund/.padminrc
drwxr-xr-x   2 esjolund others   4096 Feb  3 15:48 /home/others/esjolund/.qt
-rw-------   1 esjolund others   2725 Nov  2 16:29 /home/others/esjolund/.recently-used
drwx------   2 esjolund others   4096 Feb  2 13:48 /home/others/esjolund/.rhn-applet
drwxr-xr-x   5 esjolund others   4096 Feb  7 16:50 /home/others/esjolund/.rhopenoffice1.1
drwx------   2 esjolund others   4096 Feb  2 16:04 /home/others/esjolund/.spamassassin
drwx------   2 esjolund others   4096 Feb  7 15:18 /home/others/esjolund/.ssh
drwxr-xr-x   3 esjolund others   4096 Apr 20  2004 /home/others/esjolund/.subversion
-rwxr-xr-x   1 esjolund others     79 Feb  7 16:49 /home/others/esjolund/.sversionrc
drwxr-xr-x   2 esjolund others   4096 Aug  6  2003 /home/others/esjolund/.themes
drwx------   3 esjolund others   4096 Jun 29  2004 /home/others/esjolund/.thumbnails
drwx------   2 esjolund others   4096 Feb  3 17:09 /home/others/esjolund/.w3m
-rw-r--r--   1 esjolund others      7 Nov 21  2003 /home/others/esjolund/.wm_style
-rwxr-xr-x   1 esjolund others    189 Feb  2 13:58 /home/others/esjolund/.Xclients
-rwxr-xr-x   1 esjolund others    189 Feb  2 13:58 /home/others/esjolund/.Xclients-default
drwxr-xr-x   2 esjolund others   4096 Mar 22  2004 /home/others/esjolund/.xemacs
-rw-r--r--   1 esjolund others   9024 Apr  2  2004 /home/others/esjolund/.xscreensaver
-rw-------   1 esjolund others 684603 Feb  2 10:43 /home/others/esjolund/.xsession-errors

Example 25. Resetting your kde and gnome configurations

Some people have had problems that the gnome and kde configurations are not properly migrated when they start using a newer Linux distribution ( for instance by going from RedHat 9 to Fedora Core 3 ). Sometimes no start menu is shown in gnome for instance. I think many of you will have a more pleasant experience running Fedora Core 3 if you first set the gnome and kde configurations back to default values. These default values is a good starting point to start customize your desktop from ( preferred fonts, background image, ... ).

First log out from your graphical session if you are already logged in. Switch to a text terminal by typing Ctrl+Alt+F1

Log in and make sure that the only process running as your user is your current bash shell.

[esjolund@oxygen ~]$ pgrep -l -u $USER
1901 ssh-agent
12475 ssh-agent
12839 gconfd-2
12844 bonobo-activati
12848 gnome-settings-
12889 eggcups
16990 bash

There are other processes running. We try to kill those extra processes.

[esjolund@oxygen ~]$ pkill -u $USER
[esjolund@oxygen ~]$ pgrep -l -u $USER
12929 bonobo-activati
12990 bash

We try once more ( now with -9 )

[esjolund@oxygen ~]$ pkill -9 -u $USER
[esjolund@oxygen ~]$ pgrep -l -u $USER
12990 bash

move your old configuration files to a backup directory

[esjolund@oxygen ~]$ cd
[esjolund@oxygen ~]$ mkdir configbackup
[esjolund@oxygen ~]$ mv .gnome* configbackup
[esjolund@oxygen ~]$ mv .gconf* configbackup
[esjolund@oxygen ~]$ mv .metacity configbackup
[esjolund@oxygen ~]$ mv .nautilus configbackup
[esjolund@oxygen ~]$ mv .gtk* configbackup
[esjolund@oxygen ~]$ mv .kde* configbackup
[esjolund@oxygen ~]$ mv .config configbackup

log out from this text terminal session

[esjolund@oxygen ~]$ exit

and switch back to the graphical login window by typing Ctrl+Alt+F7

Log in again

When programs are now started without configuration files they will create default configuration files instead.

42.6. AFS

42.6.1. Very slow AFS

When your desktop is very unresponsive and every action takes forever, then probably your desktop programs are reading and writing to AFS volume that is located on an overloaded AFS file server. This overload is most often caused by someone starting a lot of cluster jobs that all try to write to the same file. See also Section 14.2.9, “Current status of the AFS file servers” and Section 34.6.1, “don't write to the same AFS file from many nodes at the same time”

Example 26. how to detect which users access your afs file server a lot

Note, that your different afs volumes might located at different afs file servers. If you notice that a certain directory is very slow (for instance ~/some_slow_directory), you could first find out the name of that afs file server by running

esjolund@kantarell:~$ fs whereis ~/some_slow_directory
File /afs/pdc.kth.se/home/e/esjolund/some_slow_directory is on host grinner.pdc.kth.se 

[Warning]Warning

Please use the following script with care. It is quite demanding for the AFS servers.

esjolund@kantarell:~$ /usr/bin/vos listvol grinner.pdc.kth.se -quiet -format -extended | awk '$1 == "BEGIN_OF_ENTRY" {involume = 1} involume && $1 == "name" {name
= $2} involume && $1 == "dayUse" {dayUse=$2} involume && $1 == "END_OF_ENTRY" {involume = 0; print dayUse " " name}' | sort -n
100217 prj.sbc.vgr.2
107137 prj.pdc.brandenb.11
715265 prj.sbc.shayat.4
1001473 prj.pdc.onofrios.0
1148417 prj.pdc.hmeier.0
1667713 prj.pdc.stefanc.0
28449537 prj.pdc.brandenb.10
esjolund@kantarell:~$ 

Here we see that the user brandenb access this AFS file server a lot.

See also Section 15.1, “Run chromium with the profile on the local harddrive”

42.6.2. Kerberos principal expiration date

Every Kerberos account has an expiration date. Unfortunately there is no command to see what date that is, so you may be surprised when you some day start getting warning messages.

s07n01 101% kinit
maccallr@NADA.KTH.SE's Password:
Your account will expire at Thu Jan 29 23:59:00 2004

After the warning period you won't be able to get any tickets.

-bash-2.05b$ kinit -l 1month -f melen
melen@NADA.KTH.SE's Password:
kinit: krb5_get_init_creds: Client (melen@NADA.KTH.SE) expired
-bash-2.05b$

When you start getting these messages, send an email to and ask them to extend the life time of your account.

42.6.3. Kerberos password expiration date

For most kerberos accounts (principals) the kerberos password has an expiration date. Unfortunately there is no command to see what date that is. Here is shell session from an Apple computer:

$ kinit -f -l720hours joelgs@NADA.KTH.SE
Your password has expired, would you like to change it? (yes/no): yes
Please enter the old password for joelgs@NADA.KTH.SE: 
Please enter the new password for joelgs@NADA.KTH.SE: 
Verifying, please re-enter the new password for joelgs@NADA.KTH.SE again: 
Authentication error
Bad request

Maybe it is a bug but Joel solved it by running:

$ kpasswd joelgs@NADA.KTH.SE
Please enter the old password for joelgs@NADA.KTH.SE: 
Please enter the new password for joelgs@NADA.KTH.SE: 
Verifying, please re-enter the new password for joelgs@NADA.KTH.SE again: 

$

42.6.4. Non valid tickets

Sometimes you get "Permission denied" when you try to access afs files, even though klist tells you that you have valid tickets . Sometimes the problem is solved by first deleting your tickets with kdestroy and then getting new tickets with kinit.

42.6.5. Lost afs tickets after logging out with ssh

If you want to log into a computer with ssh and start a script, you should after login open up a new PAG ( i.e. a credential cache sandbox ).

[esjolund@otto ~]$ ssh fegnar.sbc.su.se
esjolund@fegnar.sbc.su.se's password:
Last login: Thu Jan 19 10:32:23 2006 from otto.sbc.su.se
[esjolund@fegnar ~]$ pagsh
[esjolund@fegnar ~]$ kinit -f -l1week
esjolund@NADA.KTH.SE's Password:
[esjolund@fegnar ~]$ ./my_script.sh &
[1] 4510
[esjolund@fegnar ~]$ exit
exit
[esjolund@fegnar ~]$ exit
logout
Connection to fegnar closed.
[esjolund@otto ~]$ 

If you don't run pagsh and kinit your script won't have any afs tokens after you log out from the computer.

42.6.6. connection timed out

If there is a temporary AFS problem

[esjolund@otto ~]$ ls
ls: cannot open directory .: Connection timed out

You will not be able to work with your desktop as normal. If you are impatient and want to work by just using the local hard drive, there is a work around:

Log in to a text terminal by typing Ctrl+Alt+F2 . Then log in and type the commands

[esjolund@otto ~]$ mkdir /tmp/tmpdir
[esjolund@otto ~]$ export HOME=/tmp/tmpdir

Instead of /tmp/tmpdir choose some arbitrary directory name.

[esjolund@otto ~]$ startx /usr/bin/startkde -- :1

You have now started a second X server, that will be accessible by typing Ctrl+Alt+F8 or Ctrl+Alt+F9 ( I have seen both ). For web browsing the web browser konqueror is now the recommended alternative because it seems to have less problems when the home dir has been relocated to a subdirectory of /tmp.

When AFS is working as normal again, don't forget logging out of all your extra sessions. Go through Ctrl+Alt+F1 to Ctrl+Alt+F9 and log out the extra sessions. See also Section 14.2.9, “Current status of the AFS file servers” for more info about the current health status of AFS.

42.7. module: command not found

If you get

esjolund@otto:~$ module add matlab        
bash: module: command not found

take a look in Section 2.3.1, “Adjust your ~/.bashrc and ~/.bash_profile”. You need to modify your ~/.bashrc.

42.8. Problems with keyboard and mouse

If you experience problems with your keyboard or mouse, you might fix the problem by turning off and then turning on your monitor. The monitor is acting as a USB hub and sometimes gets confused when the computer gets rebooted.

42.9. firefox

The web browser chromium is for most usage better than firefox. You can avoid a lot of problems by installing it

root@otto:~# apt-get install chromium-browser

42.9.1. firefox is slow

You can make firefox much faster by not storing cached data on AFS. Type "about:config" in the URL bar. Either you might want to entirely disable disk caching by setting "browser.cache.disk.enable" to false or you might want to add the variable "browser.cache.disk.parent_directory" and let it have the value "/scratch/yourusername/cache". Make sure you create the directory too.

[esjolund@oxygen esjolund]$ mkdir /scratch/esjolund/cache

42.9.2. killing all firefox processes

A lot of strange problems regarding firefox can be solved by restarting firefox. You first have to make sure there are no firefox processes left around.

[esjolund@oxygen esjolund]$ pgrep -fl firefox
3981 /bin/sh /usr/lib/firefox-1.0.7/firefox -UILocale en-US
4000 /bin/sh /usr/lib/firefox-1.0.7/run-mozilla.sh /usr/lib/firefox-1.0.7/firefox-bin -UILocale en-US
4005 /usr/lib/firefox-1.0.7/firefox-bin -UILocale en-US

If the pgrep found any firefox processes you should kill them with the pkill command

[esjolund@oxygen esjolund]$ pkill -f firefox

Do another check with the pgrep command and if there still are firefox processes alive you should add the -9 flag to the pkill to be certain the firefox processes go away

[esjolund@oxygen esjolund]$ pkill -9 -f firefox

We should check that there are no lock files laying aruond.

[esjolund@otto ~]$ find ~/.mozilla/ -name lock -o -name .parentlock
/afs/pdc.kth.se/home/e/esjolund/.mozilla/firefox/lirpvjkl.default/.parentlock
/afs/pdc.kth.se/home/e/esjolund/.mozilla/firefox/lirpvjkl.default/lock

We have to remove them

[esjolund@oxygen esjolund]$ rm /afs/pdc.kth.se/home/e/esjolund/.mozilla/firefox/lirpvjkl.default/.parentlock
[esjolund@oxygen esjolund]$ rm /afs/pdc.kth.se/home/e/esjolund/.mozilla/firefox/lirpvjkl.default/lock

Now you can start firefox again. If it doesn't work, you might want to consider to follow the instructions in Section 42.9.5, “resetting firefox configuration”

42.9.3. firefox asks about user profile

When firefox already is running on another host or if firefox crashed the last time it was run, you might be surprised to see this window when you start firefox

This indicates that there is a lock file somewhere in your ~/.mozilla/ directory and firefox believes that your default profile is already in use. To fix this follow the instructions in Section 42.9.2, “killing all firefox processes”.

42.9.4. parentlock files are not removed when firefox is shut down

Right now parent lock files are not always removed when firefox is shut down. This is a bug that seems to have a fix in openafs 1.5.1 ( development branch ). We'll have to wait till the next openafs version gets released. Until then try to follow the instructions in Section 42.9.2, “killing all firefox processes”.

42.9.5. resetting firefox configuration

Ok, if you have already tried Section 42.9.2, “killing all firefox processes”, and it doesn't work, this is a bulletproof way to solve firefox problems. The solution is to reset the firefox configuration.

First make sure there are no other firefox processes running by following the instructions in Section 42.9.2, “killing all firefox processes”. To reset the firefox configuration move the firefox configuration, ~/.mozilla to a new directory name so that firefox won't find it when started.

[esjolund@oxygen esjolund]$ mv ~/.mozilla ~/.mozilla.old

( A note 2006-10-10: Here you may have to take a look at Section 42.9.6, “how to circumvent an AFS bug that stops firefox”. I hope this problem will be history soon /Erik ). Start firefox again. Firefox can now not find its configuration so it will create a new default configuration directory. Now close firefox. No firefox process should run when you continue from this point.

[esjolund@oxygen esjolund]$ cd
[esjolund@oxygen esjolund]$ find .mozilla .mozilla.old -name bookmarks.html -follow | grep -v US
.mozilla/firefox/wzvrk4sg.default/bookmarks.html
.mozilla.old/firefox/lirpvjkl.default/bookmarks.html

copy your old bookmarks file to your new bookmarks file

[esjolund@oxygen esjolund]$ cp .mozilla.old/firefox/lirpvjkl.default/bookmarks.html .mozilla/firefox/wzvrk4sg.default/bookmarks.html

Now start firefox again. Your settings and plugins were lost but your bookmarks should be there.

42.9.6. how to circumvent an AFS bug that stops firefox

This section was written 2006-10-10. I really hope this is temporary problem that soon will go away. Right now firefox won't start if the home directory is in AFS and ~/.mozilla is empty. Try this to circumvent the problem:

[esjolund@oxygen esjolund]$ mkdir /scratch/my_temp
[esjolund@oxygen esjolund]$ export HOME=/scratch/my_temp
[esjolund@oxygen esjolund]$ firefox

Now quit firefox and after that move the newly created $HOME/.mozilla to your home directory.

[esjolund@oxygen esjolund]$ mv $HOME/.mozilla /afs/pdc.kth.se/home/e/esjolund

During the move you may see SELINUX error messages but don't worry.

42.10. how to log in to text terminal

In addition to the normal graphical log in screen there are also 6 text terminal log in screens available on your Linux desktop computer. You switch between the different log in screens by pressing ctrl and alt and one of the F1,F2,F3 .... keys. The layout is normally like this:

  • Ctrl+Alt+F1 text terminal

  • Ctrl+Alt+F2 text terminal

  • Ctrl+Alt+F3 text terminal

  • Ctrl+Alt+F4 text terminal

  • Ctrl+Alt+F5 text terminal

  • Ctrl+Alt+F6 text terminal

  • Ctrl+Alt+F7 graphical terminal

42.11. Proxy Error: The proxy server received an invalid response from an upstream server

If you have submitted a web form (for instance a bioinformatics query) on one of the SBC web sites, and after waiting for quite a while you get this kind of message in your web browser:

Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request POST /run_elude.php.

Reason: Error reading from remote server

Apache/2.2.15 (CentOS) Server at elude.sbc.su.se Port 80

This means that the cgi script didn't return any output for quite a while and that the http reverse proxy server therefore canceled the connection. This timeout is configurable by the apache directives ProxyTimeout and Timeout. Send an email to if you want to change these values. For more information about these timeouts see for instance this stackoverflow.com question .

42.12. You've left SBC but you are in need of an old file in your AFS home directory

If you have left SBC but you forgot to make a personal copy of the files in your AFS home directory, it might be difficult (or even impossible) to get hold of them later on. PDC doesn't keep the AFS home directories forever for users that have left.

That being said, here is the way to go. Access to SBC is no longer needed as you can access computers at PDC directly. If you're lucky, your PDC kerberos account is still active, so try to see if you still can log in to PDC (e.g. ferlin.pdc.kth.se) from your personal linux computer (see also Section 34.2, “Log in to the Ferlin cluster”). If you don't run linux but another operating system on your personal computer, please follow the instructions on the PDC home page. If you have trouble logging in, please contact support@pdc.kth.se ( support requests ).

43. Reboot policy

  • Reboots of the desktop computers are announced at least 36 hours in advance. But if the reboot is due to an important security update, it may be less than 36 hours in advance.

Note, the recommended place to run long jobs is at the cluster.

43.1. Please don't reboot, could you make an exception just for me

Unfortunately no. We need to keep the system up to date with the latest security updates and having to individually schedule reboots increases the amount of work for doing the reboots.

The right way to solve the issue is instead to not use your desktop computer for long running compute jobs. If you do it anyway, a good idea is to regularly save intermediate results so that a reboot is not a problem. The recommended place to run long compute jobs is at the compute clusters.

If you need to run a long running shell script that only submits compute jobs to a compute cluster you could probably run it on the login node to the computer cluster. But there might different policies for this on different compute clusters.

See also Section 34.6.5, “Checkpointing”

44. Support

The system administrators time is not an unlimited resource. Therefore there is a need to have a policy regarding requesting support from the system administrator.

44.1. How to request support

Please, take a look at the advices for requesting support ( see Section 44.2, “Advices for requesting support” ). Following them will help us to answer your support email. When you have written your computer support email request, send it to the mailing list . Here is an example support email

Example 27. example of a well written computer support request email

I am unable to open graphical applications on a remote machine. I can log in to the machine with ssh

[esjolund@geriatrix ~]$ ssh -X esjolund@oxygen.cbr.su.se
esjolund@oxygen.cbr.su.se's password:
Last login: Tue Aug 19 11:34:50 2008 from csbm08.cbr.su.se
/usr/bin/xauth:  error in locking authority file /afs/pdc.kth.se/home/e/esjolund/.Xauthority
[esjolund@geriatrix ~]$ 

but when I try to start xclock ( a graphical clock ), I get this error:

[esjolund@oxygen ~]$ xclock 
No protocol specified
Error: Can't open display: :0.0

Does anyone have an idea what is going wrong?

Please use a concise subject describing the support question. In this example you could have used "error in locking authority file" or "Error: Can't open display: :0.0" or "can't open graphical applications on a remote machine".

44.2. Advices for requesting support

44.2.1. Don't request support for private things

Please, don't send support requests for private things ( e.g. about your home computers ).

44.2.2. Reboot your local desktop computer to see if it solves your computer problem

Surprisingly many computer problems can be solved by rebooting your desktop computer. Please, try to see if a reboot of your desktop computer solves the problem.

44.2.3. Check that you don't overuse your AFS file system quota

Verify that you don't overuse your AFS file system quota. All kind of strange errors start to occur as soon as software can't write to the file system anymore.

44.2.4. Keep it work related

The support request should be related to your work. Please, don't ask questions about how to configure your desktop to show your vacation photos on your desktop. Please, don't ask questions about how to use your desktop computer at work for listening to music. This is a feature that is not supported. If you are lucky and succeed listening to music with your desktop computer, you can of course use this feature as long as you don't disturb your colleagues sitting in the same room.

44.2.5. Try to accept small inconveniences

Please, accept some inconveniences as it is unrealistic to believe that we will be able to create the perfect computer environment. There are too many software/hardware components that might fail. If you think that you are forced to click the mouse buttons too many times to solve a task or you think that you need to type an unnecessary command once a week, please consider if this is really worth starting a new support request for.

44.2.6. Don't do a reply to an unrelated email message

Please, don't do a reply to an unrelated email message. Changing the subject line will not help because the email threading shown in email clients will then show your message in another email thread.

In other words, make sure you create a new message ( in the email client Thunderbird you find it under the menu MessageNew Message ).

44.2.7. One support request per email

If you have multiple unrelated support requests, split them up in different emails.

44.2.8. Specify the hostname of the problematic computer

If it is a problem with your desktop computer, please specify the name ( i.e. the hostname ) of your desktop computer. Of course if you cut and paste from your shell session ( Section 44.2.11, “Cut and paste from your shell session” ) the hostname can also be seen there.

44.2.9. Search the user guide before sending a computer support request

A lot of the answers to computer support requests can be found in this user guide. Please, take the time to search the user guide before sending your computer support request. If your support question concerns a specific software, please search the user guide (with Ctrl-f in firefox) for the name of that specific software. In addition to that, please take a look at Section 42, “Troubleshooting”.

44.2.10. Subject line should describe your support request with a few words

Examples with too little information in the subject line

  • help

  • svn

  • svn problem

  • netbeans

  • sudo

  • exjobbare

  • goofy

  • student

  • csh

  • bifhp5.dbb.su.se

  • Fwd: Re: problem

Try to be a bit more specific than just a single substantive. If you have some sort of unique error message it is a good idea to include some of it in the subject line. Here is a list of better and more descriptive subject lines:

  • subversion authentication problem -- unexpected return value (403 Forbidden)

  • bjorklund.cbr.su.se hangs mysteriously from time to time

  • www.compprotsci.org not responding to http requests

  • htttpd on www.sbc.su.se is not running

  • converting credentials: Unknown error 18446744073709551615

  • SMART warnings on helium.sbc.su.se

  • geriatrix.sbc.su.se not booting. It hangs in file system check

  • can't open graphical applications on a remote machine

  • error in locking authority file

  • Error: Can't open display: :0.0

44.2.11. Cut and paste from your shell session

If your computer problem is occurring on the command line, please cut and paste as much as possible from your shell session, not just the error message but also the command and the surrounding commands.

Don't write

I get the error message "No such file or directory" when I try to add the program "gnuplot" with the "module" command

instead you should copy and paste like this

alewa@geriatrix:~$ module add gnuplot
bash: /usr/modulecmd/modulecmd.tcl: No such file or directory

As email clients often wrap long lines you might consider saving your shell session to a file, naming it to something like "shellsession.txt" and then attach it to your support email.

44.2.12. If you have forgotten your password

Normally you have your passwords written down at home ( see Section 10.1.3, “You are required to write down all your passwords at SBC on a paper and store it at home” ), but if you misplaced your paper note, take a look in the following sub sections.

44.2.12.1. Forgetting the KTH kerberos password

If you have forgotten your KTH kerberos password ( Section 10.2.4, “KTH kerberos password” ) please contact . Note that a false password is just one possible reason why you can't log in. Read about other reasons here: Section 42.4, “Can't log in”.

44.2.12.2. Forgetting the kth.se password

If you have forgotten your kth.se password ( Section 10.2.5, “kth.se password” ) please send a support request to the SciLifeLab helpdesk.

44.2.12.3. Forgetting the Subversion password

It might be possible to find your subversion password ( Section 10.2.6, “Password for subversion” ) in your home directory under ~/.subversion/auth/ if you have used subversion before. If you have forgotten your Subversion password please contact .

44.2.12.4. Forgetting the Mail password

If you have forgotten your mail password ( Section 10.2.2, “Password for mail.sbc.su.se” ) please contact .

44.2.12.5. Forgetting the Web password

If you have forgotten your web password ( Section 10.2.3, “Password for www.sbc.su.se” ) please contact .

44.2.13. If you solve your computer support request by yourself

If after sending a support request email to sbc-sys@sbc.su.se you somehow solve the support request by yourself, please tell sbc-sys@sbc.su.se about it, so no unnecessary work is spent on an issue that has already been resolved.

45. Fitness training

45.1. The gym at Albanova

People working at Albanova are free to use the gym in room C2:3075 ( in the main Albanova building ).

It's located at floor 2 near the main stair case.

and looks like this

Your key to the doors at SBC should fit to the gym too.

The women's changing room is located at floor 1 in room G1:0015. The men's changing room is located at floor 1 in room G1:0014.

45.2. Fitness training at Stockholm University

Search for the word "friskvård" at the SU homepage.

46. Links to more information

46.1. Albanova

Albanova home page

Albanova fabben It has information about the Albanova building like,

  • How to handle garbage

  • Parking space

  • Dressing rooms and showers

46.2. Stockholm university

Stockholm university home page

Department of Biochemistry and Biophysics

Information från Personalbyrån ( information for employees at Stockholm university in Swedish ).