Useful Scripts for Computer Science TAs
Generic Stop
Takes in a pattern to be grep'ed for in the processes list and tries to kill the processes involved
Author: Shirshanka Das
Email: shanky@cs.ucla.edu
Download: generic-stop.pl.
Server Checker
This script can be modified to monitor a set of processes that you may be running.
It checks for whether the processes are still running goes to sleep for 5 minutes, comes back up.
Each of the processes can be associated with a number which specifies the number of processes
each of which will have the same name e.g. when the process forks a number of other processes.
In this example simpleserver forks two processes and therefore appears thrice in the process list
Thus the number associated with simpleserver is 3.
With the restart option the script with shut down the process and then restart them.
Useful if you're running a set of servers and modify their code and want to restart them.
Author: Shirshanka Das
Email: shanky@cs.ucla.edu
Download:server-checker.pl.
Makelist
creates a list of SIDs from a list of files whose name is the SID
(useful for CS3X grading with Professor Smallberg)
Author: Gary Underwood
Email: fmarshal@cs.ucla.edu
Download:makelist.
CS131 scripts
For the following scripts, the system is based on a grades file in comma separated (plain text with
commas for columns) format.
These scripts were specifically designed for
CS131 and have been revised, but never rewritten so the coding isn't that
great. Perl version 5 or later required.
These scripts can be generalized to be used for other classes.
Author: Gary Underwood
Email: fmarshal@cs.ucla.edu
These should be in instructor only account:
add-midterm: puts midterm grades into grades.csv from plain text file, shows
histogram.
add-scores: like above but for homework, input file is output from ??????.
avg-col: averages a column in the gradebook, updates averages inside of
grades.csv, shows histogram
column_names: which columns contain which grades and file locking for
grades.csv, used by all the others.
classavg: overall average of each student in class and class as a whole,
creates output file of letter grades suitable for upload to CourseWeb,
displays histogram of averages
create-col-csv: for multi-section classes, creates separate .csv files for
upload to courseweb for each section for a particular assignment
editgrade: edits command line tool for safely editing grades.csv
email: sends grades to students
get-role creates grades.csv gradebook from role file downloaded from
CourseWeb
make-seas-list: creates list of seas accounts from grades.csv, useful so
that make-dirs can create student directories on the instructor account so
that instructor is owner (otherwise there is a 24 hour delay before
directory is owned/changable by instructor)
sg2: pretty print of particular students grades
These are on account where 'submit' command sends student assignments:
avg: looks at output file of grading scripts to compute average and
histogram
ch: uses environmental strings to find students assignments for stats on
who submitted
compile: compiles student assignments
Glogin: shell script with environmental variables for use in other
scripts
killbad.pl: used by wrap to kill student's code that has hung
make-dirs: used with outut of make-seas-list
make-scores-list: looks at output file of grading scripts, creates file of
seas_account score pairs for use with add-scores
noncompiles: list of those whose code didn't compile
non-graded: submitted but not yet graded
no-submit: list of students who didn't submit
teststats: statistics on test cases for assignment
wraptest: compiles (as needed) and executes test cases for all students,
creates output file of results and grade for a student