Project 1
Unix Familiarization
COSC 374
Spring 2003
Due February 10th, by e-mail, before class



This semester we will be doing several projects on a Unix system. If you have used Unix before, then some of this material will be new. Some it will not be.

For this assignment, you are to use your own Unix account on GUSUN. Other machines may not have the commands installed for you to use.
If you do not already have a GUSUN account, you can get one at:

http://www.georgetown.edu/uis/web/gusun.

If you need to access GUSUN from home, use SSH. A free SSH client (for Windows) is available at:

http://www.ssh.com/support/downloads/secureshellwks/non-commercial.html

You will quickly notice that Unix has a command line interface. You will have to type commands you want executed. This is good and bad. You have more control over what happens, but you have a lot to learn.

First Off


I would recommend using tcsh as a shell. bash is good too, but most of the tutorials cover using tcsh. To start tcsh, On GUSUN type "tcsh" first thing when you log on. You might have to type "logout" or "exit" twice to log off if you do this.

Also,  you need to know is that you can get what passes for help for any command on a Unix system by typing:

man <command>

where <command> is the command you want information about. The man pages are not always useful in a tutorial sense, but they will explain the variety of options available for each command.

Try "man man" to see what man can tell you.

Unix reference information


A number of good tutorials exist that will teach you all you need to know about Unix, and more. You should look through these tutorials as you answer the questions below.

http://www.ee.surrey.ac.uk/Teaching/Unix/
http://www.ctssn.com/
http://heather.cs.ucdavis.edu/~matloff/unix.html
http://wks.uts.ohio-state.edu/unix_course/
http://wks.uts.ohio-state.edu/sysadm_course/sysadm.html

The last two links are also available as printable books. They seem like good references to me.

Intro to Unix
http://wks.uts.ohio-state.edu/unix_course/unix_book.pdf

Intro to System Administration (more in-depth)
http://wks.uts.ohio-state.edu/sysadm_course/sysadm_book.pdf


Your assignment:

Use the man pages and the tutorials refernced above (other on-line sources are fine too, but talk to me before you talk to others about the assignment) to figure out how to do the following things on a unix system.

Process Management and Information

Commands to learn:

top, ps, nice, nohup, kill, signal

1) What command can you use to show all the processes that you are running?

2) What is the process ID of the shell you are currently using?

3) What command can you use to show all the processes that are running on the system?

4) What command can you use to see the top few most active processes on a system?

5) How could you cause a command to run with a lower priority than it otherwise would?

6) What command can you use to send signals to running processes?

Commands to learn:

Run each of these commands on the process ID of your current shell (from question 2). For each question, indicate which command you used.

pflags, pcred, pmap, pldd, psig, pstack, pfiles, pwdx, ptree

(you will need to be on a SunOS machine, such as GUSUN, to use these)

7) What is the address of the stack of your shell process?

8) What is the root of the process tree of your shell process?

9) What is the working directory of your shell process?

10) What is the user id that your shell is running with?

11) What files does your shell have open?

12) What shared libraries is your shell using?

13) What will your shell process do to process each possible signal it can receive?

14) What does the stack of your shell process look like?

Commands to learn:

apptrace, truss

(you will need to be on a SunOS machine, such as GUSUN, to use these too)

15) What shared library calls does the command ls make?

16) What system calls does the command ls make?

Machine and Architecture Information

Commands to learn:

arch, uname, pagesize, iostat, vmstat, mpstat, busstat

17) What is the kernel architecture of GUSUN?

18) How large are the memory pages on GUSUN?

19) What percentage of the time has the CPU on GUSUN been idle?

20) What type of interrupt is most common on GUSUN?


What to turn in:


You should submit a text file that contains the answers to the questions above.
Please execute these two commands, and include their output at the top with your name:

hostname
uname -a


The text file should contain answers as appropriate to each question.
Please e-mail you solutions in the body of the message (not as an attachment, and not as html) to the instructor.