CHPC Use Policies
Please make sure you have read and signed the CHPC_Use_policy and returned it. You may download the CHPC Use Policy by clicking HERE. Chances are you have already done so to get to this point.
Logging in via Secure Shell
CHPC systems use the UNIX opreating system.
Most systems have an SSH client that may be used to log in to the CHPC. Linux and MacOS systems have this as standard, while PuTTY is a free downloadable client for MS-Windows.
Login using your ssh client to the system (e1350 or Sun system) and optionally set the command line argument -X to enable X-windows display forwarding back to your local host. For example:
| To login into e1350 from the internet, ssh username@ssh.chpc.ac.za AND From UCT, ssh username@196.13.250.10 AND From CSIR, ssh username@chpcln.csir.co.za. |
AND
| To login into Sun system from the internet, ssh username@sun.chpc.ac.za AND From UCT ssh username@10.128.15.16. |
This will connect you to a shell on the login node of the cluster. From here you will be able to conduct almost all of your activities. Please note that in the e1350 cluster, the password can only be changed in the management server (chpcms) while in the Sun, the password can be changed on the login node (login01 or login02)
Directories
The root directory in unix / (forward slash) is the base of the file system. Other disk systems may be mounted on mount points on the root directory. The other directories are normally on separate disk subsystems from the system directories containing the libraries and programs.
The directory in which a user's login session starts, is the home directory.
In commands, it may also be referred by a short form, using the tilde symbol, ~.
The tilde is expanded by the shell to refer to the full directory path of the home directory, typically /home/username (e1350) or /export/home/username (Sun). This directory is owned by the user and contains files enabling correct startup of the user's session such as setting shell variables.
The current working directory may be referred to by its full pathname or . (dot), while the parent directory which is one level up is referred to by .. (double dot).
You may change to your home directory by typing cd on its own. Or, you may refer to files in your home directory by using the tilde shortcut symbol when in a different working directory, eg.:
to display the contents of the file in /home/username/myfile.text (e1350) OR /export/home/username/myfile.text (Sun) on the console.
Tip: to change your working directory to the previous directory, type cd -
File permissions
In unix, file permissions for reading, writing and executing may be specified for the classes owner, group and world. In this way access may be controlled. The chown and chmod commands are used to change a file or directory's permissions.
Disk space
The unix disk free command df shows the filesystem free space and mount points. The '-h' command line switch causes the output to be in a format more easily read by a human.
For example, to show all free space in e1350 cluster:
% df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 68G 26G 42G 39% /
tmpfs 8.4G 8.0K 8.4G 1% /dev/shm
/dev/home 2.8T 987G 1.8T 36% /CHPC/home
/dev/local 310G 14G 297G 5% /CHPC/usr/local
/dev/work 91T 51T 40T 56% /CHPC/work |
For example, to show all free space in Sun cluster:
% df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 119G 45G 68G 40% /
udev 7.9G 188K 7.9G 1% /dev
/dev/sda1 130M 25M 98M 21% /boot
172.17.203.15:/mnt/gridware 1.6T 680G 865G 45% /opt/gridware
172.17.203.15:/mnt/home 1.9T 717G 1.1T 41% /export/home
172.17.203.50:/scratch/work 3.6T 1.8T 1.9T 50% /scratch/work
|
To show disk usage, use the unix command du :
Show usage in all subdirectories of a specified directory
Changing your password on e1350 OR Sun cluster
To change your password, login to ssh.chpc.ac.za (e1350) OR sun.chpc.ac.za (Sun).
To change your password type passwd and follow the prompts, first to enter your existing password, and then the new password. You will be prompted twice for the new password to ensure correctness.
Please note that on the e1350, you will have to perform this task on management node (chpcms).
For example:
passwd
Please enter old (i.e. current) password:
Please enter new password:
Please re-enter new password: |
Choose a "strong" password, with mixed case alphabetic characters and digits. As per the CHPC agreements, please keep your password private and change it immediately if you suspect it has become known to anyone else.
If you have forgotten the password or otherwise cannot log in, you will have to request that your password be reset by the CHPC system admin.
Changing your login shell
To change your shell type 'chsh' and follow the prompts. A list of valid shells is available in the text file /etc/shells although the bash shell will suffice for most operations. Current shells include csh, ksh, tcsh, zsh.
For example, to change your shell to bash:
Changing bash command line editing mode
By default, the bash shell is set up to use VI-style editing keys. To change, run the following, or add the following to your .bashrc file to execute on login:
Useful keys in this mode:
- ^a Start of line
- ^e End of line
- ^w Delete previous word
- Up/Down arrow access command history
To revert to VI mode
Bash shell aliases
You can make abbreviations for commands, that can also be put in the .bashrc file, eg.:
alias lq='llq -X BGP'
alias sub='llsubmit -X BGP' |
Shell variables
A number of shell environment variables are preset and control many aspects of the shell's operation. They can be viewed by using the unix commands env or set. To change a shell variable's value, use export in Bash.
Some importants shell variables are:
- PATH -- the search path used for commands and programs
- EDITOR -- which editor is used
- PS1 -- The Bash shell command line prompt, e.g.:
This will generate a prompt of the form username@Host WorkingDir $, where WorkingDir is the current working directory.
To add a new directory to the end of your search path, re-use the variable
| export PATH=$PATH:/my/new/location |
To run a program in the current directory without adding it to the PATH, invoke it as follows:
Command-line completion
Pressing Tab will perform automatic filename completion, both for commands that are available on the shell's PATH, a variable that determines which directories are searched for programs, and for file and directory name completion.
|