Unix and CS Info Pages and Links

  • General Unix Help
  • Specific Unix Tools
  • Language Help (C, C++, Java, Python)
  • General CS Help/Info
  • Editors
  • Shell Programming
  • Research and Writing
  • Tools for Documents & Figures
  • Linux links
  •  
  • Collaboration Tools
  • Network & Parallel Programming
  •  
  • Running Experiements
  •  

    General Unix Help

    General CS Help/Info

    Research, Writing, and Presentations

    Useful Unix Tools

    Editors

    vim (or vi) and emacs are the two editors you can use on our system. If you don't know either emacs or vim, I recommend vim over emacs.

    Tools for Creating Documents, Graphs, and Figures

    Programming Language-Specific Help

    Collaboration Tools

    Shell Programming

    Tools for Running Large Experiements and for Performance Measurement

    • Using Condor on our system
    • CS project etiquette page information about using nice, screen, and where to find disk space for huge files
    • Write and use scripts. If you have a lot of experiements to run, write a bash, or perl, or ..., script to run the set of experiements and save the results to files (possibly by using script to capture console ouput to to a file). You can also write scripts to setup your experiemental environment, and you can write scripts to process result files and create input files for xgraph, gnuplot, etc. (perl or awk are more useful than bash for file processing). By using scripts, you take the time to write the script once, but you can easily run the script over and over.

      profiling tools, measuring performance:

    • time ./a.out will measure the total runtime of the a.out program, and will give the breakdown of user and system time. For example, the following call to time ./myprog says that my program took 10.083 seconds to run, 0.000 seconds (less than 1 ms) of user-level CPU time and 0.004 seconds of system-level CPU time (my program was sleeping and not scheduled on the cpu for most of its 10 second runtime):
      % time ./myprog
      real    0m10.083s
      user    0m0.000s
      sys     0m0.004s
      
      # here is time for a cpu-bound program.  you can see almost all of its 
      # 7.931 seconds of execution time were due to user-level cpu time
      %time ./a.out
      real    0m7.931s
      user    0m7.928s
      sys     0m0.000s
      
    • /proc/: /proc is a pseudo file system that provides a file interface to the operating system. Through /proc you can get information about system-wide resource usage and about individual processes running on the system. For example, cat'ing out the /proc files meminfo, swapinfo, loadavg, will give you information about a machine's memory usage, about its swap space usage, and about its cpu load averages. See the man page for proc for more information (man 5 proc).
    • you can add timing calls to sections of code directly. In C, you can call the gettimeofday function around code you want to time. Be careful about not timing code fragments with debug output, because the debug output can distort the real time of the code fragment you are measuring.
    • gprof is a profiler for C and fortran programs. To compile, use the -p option:
      % gcc -g -p -o myprog foo.c
      
      when you run your program, a file named gmon.out is created that contains profiling information of the run of your program. You can view this file by running gprof (see the man page for gprof for more information):
      % ./myprog
      % gprof myprog gmon.out 
      
    • ntop.org a tool for network traffic measurement
    • Paradyn a performance tool for parallel programs

    Linux

    Network & Parallel Programming