CS 635 ADVANCED SYSTEMS PROGRAMMING SPRING 2003 EXERCISE: Writing a '/proc' module 1. Investigate the 'uname' command: (a) Execute the 'uname' command (b) Read the 'man' page for 'uname' (c) Use the 'uname' command to print your station's nodename 2. Investigate the kernel's 'system_utsname' variable: (a) Verify that 'system_utsname' is a public kernel-variable (b) Locate the kernel header in which 'system_utsname' is defined (c) Determine how much information is provided by 'system_utsname' 3. Write a Linux module (named 'uts.c') which creates a pseudo-file in the '/proc' directory that can be used to display all of the information stored in 'system_utsname' in a format that would be understood by a experienced computer science graduate student why types the command: $ cat /proc/uts 4. Report the results of your lab-exercise: (a) Use the bash shell's i/o-redirection capability to print the output from your module's /proc file to an ordinary textfile (named 'uts.out'): $ cat /proc/uts > uts.out (b) Print out a hardcopy of your 'uts.out' file. (c) Write your name(s) on your printout and submit it to the Instructor (Dr. Cruse) or Course Assistant (Mr. Adhikari). ___________________________________________________________________________ 27 FEB 2003