CSRU 3595 Operating Systems Dept. of Computer & Info Sciences
Fall 2008 C. Schweikert
Lab Assignment #4 (Unix Assignment)
Due: Friday, November 7
- Briefly state what each of the following Unix commands does: cat, chmod, cd, date, echo, ftp, grep, mkdir, pwd, rm, setenv, sort, ls, wc, man, ping, ps, df, top.
- Using basic commands, find the largest file in the /usr/bin directory.
Who is the owner of the largest file?
What are the file permissions on this file?
Who is allowed to read, write, or execute the file?- Use the ps command to view a list of processes that root is currently running. Run the ps command again, only this time, redirect the output to a third file called: root_processes.txt
Use the df command with the -k option to see how much disk space is free on each partition. Re-direct this output to a file called "disk_space.txt" and provide a description of each column in the output of the df command.- Use the ping command to ping storm.cis.fordham.edu.
ping storm.cis.fordham.edu
Let about 10 pings transpire before you terminate the ping command by pressing Control+C.
What are the min/avg/max round trip times? and if there are any packets lost.
Repeat the command by pinging www.gmail.com and note the same statistics.
Are all of the round trip times of the 2 hosts the same? Which took longer? Was there any packet loss?- Write and execute a Perl language program. Create a file called "test.pl".
Add the following lines of Perl language code to this file:#!/usr/bin/perl
print "Test Perl Program \n";
my @files = glob "*";
print "My files are: ";
print join(" ", @files);
print "\n";
Use the chmod command to make this file executable:
chmod 755 test.pl
Execute the script by typing: ./test.pl
6. Use the top command to see what processes are running. Note the total amount of RAM and total amount of swap space (vritual memory) as well as how much of each is presently free. See which process is currently taking up the most CPU time (it should appear as the first process in the screen) and note its process id (PID), who is the process owner, how much memory it is consuming (SIZE), and how much of that is currently resident in RAM (RES) (the balance being swapped to virtual memory on disk).
With top running, launch the web browser (must be in Linux desktop environment). Note how much CPU time (percentage) and memory it consumes as it is launching.
Once your browser has opened, visit a web site to see what happens to CPU time and memory of the browser process while a web site it loading.
How much RAM does the browser consume and how much remains resident? What happens when you visit a web site? Is more RAM consumed? What is the CPU utilization while this happens? Is more RAM and CPU consumed when you visit a site with Java applications?