Difference between revisions of "Being Member of Pedagogical Group"

From Earlham CS Department
Jump to navigation Jump to search
m (MAC & PC (Windows))
 
(21 intermediate revisions by one other user not shown)
Line 1: Line 1:
** [[Media:pedagogical-tutorial.pdf|Tutorial For Pedagogical Group Incoming Members (PDF)]]
+
*Printable Version [[Media:pedagogical-tutorial.pdf|Tutorial For Pedagogical Group Incoming Members (PDF)]]
 +
==How to access the wiki page==
 +
The Pedagogical wiki page is hosted under the [http://wiki.cs.earlham.edu/index.php/Main_Page wiki.cs.earlham.edu], and can be  reached from this page by the link “Pedagogical Tools Group” under the “Applied groups” section.
  
=Tutorials That we provide:=
+
==How to access the web page==
 +
 +
The Pedagogical Tools applied group home page is hosted under [http://cs.earlham.edu CS Department Website], and can be reached by clicking on the Pedagogical Tools icon.
  
<br>[http://www.cs.earlham.edu/~psg/tutorials/vtwm_emacs/index.html VTWM and Emacs]
+
==How to use ssh and remote connect==
<br>[http://www.cs.earlham.edu/~psg/tutorials/linux/index.html Linux]
 
<br>[http://www.cs.earlham.edu/~psg/tutorials/index.html Remote Connections from PC or Mac]
 
  
==Short GDB Under Emacs Tutorial==
+
===Xming, pUTTY===
===The GNU debugger: is a complete Documentation of debugging with GDB===
+
See the tutorial(s) under our [http://www.cs.earlham.edu/~psg/tutorials/pc_connect_orig.html pedagogical group page]
[http://sourceware.org/gdb/download/onlinedocs/gdb/index.html html Copy or Debugging with GDB]
 
  
===GDB in Short - What is GDB?===
+
===Parallels & Terminal (Linux & OS X)===
 +
See the tutorial(s) under our [http://www.cs.earlham.edu/~psg/tutorials/mac_connect.html pedagogical group page]
  
GDB is a debugger. A debugger is a tool which can help you find bugs in your code. It will allow you to follow your program as it executes to see what happens at each step. The program can be stopped on any line or at the start of any function and various types of information can be displayed, such as the values of variables and the sequence of function calls that got you where you are. If your program causes a segmentation fault, GDB will show you where it happened. Advanced users can alter the values of variables to experiment with temporary bug fixes and view the contents of the stack.
+
==How to update our  tutorials ==
 +
The tutorials are in the form of HTML docs located in the Pedagogical group folder  and have to be edited via CVS, see the section on using CVS below.
  
The greatest advantage to using GDB within Emacs is that it will work with your source code (.c file). Whenever execution of the program is stopped (by a breakpoint, a segmentation fault, or some other signal), Emacs will display your source code in a window and will mark the line on which it has stopped with an => symbol. You can also use Emacs to cut and paste commands, scan through your GDB output and save it as a text file.
+
==How to find our tutorials==
 +
 +
Our tutorials are found under the “Tutorials” Section on either cs.earlham.edu, or the [http://wiki.cs.earlham.edu/index.php/Pedagogical_Tools_Group Pedagogical tools group page].
  
===Starting GDB under Emacs===
+
==How to communicate with the group ==
 +
===Emails===
 +
# '''Lab Check Emails'''
 +
* See wiki page for a sample form  for e-mail
 +
* Subject: Lab Status + Name of Lab(s) + Date Checked
 +
* Body:
 +
**List the labs that you checked  (Building + name of lab)
 +
**Include the type of machines in the lab (Mac/PC)
 +
**Under each lab check section list any notable things encountered during the check.
 +
**For any problems you come across, document the procedure you went through that generated the problem of made you aware of it. Include the number of the machine having the problem.
 +
**If problem solved, thoroughly document the fix you implemented.
 +
**Include status of printers we check (D224, PCSLounge)
  
''To run GDB in Emacs'', first split your Emacs screen by typing `C-x 2' (C- stands for Control) and enter the window in which you want to run GDB by clicking in it with your left mouse button. Now type the command `M-x gdb' followed by `Return'. M- is read as Meta. On a Sun machine, Meta is the diamond next to the spacebar. On an SGI, it is the Alt key. M- is equivalent to ESC, except that you don't release Meta before pressing the next key, which makes it easier and faster than ESC.
+
# '''Meeting Notes emails'''
 +
* See wiki page for a sample form  for meeting notes
 +
* Subject: “Pedagogical Meeting Notes” + Date
 +
* Body: Include anything/everything relevant to the group discussed in the meeting,:plans, goals ect.
  
'''The Emacs message bar will now display the message:'''
+
===Phone + Text ===
 +
# Mobeen: (765)-977-3888
 +
# Alex: (917)-627-9250
 +
# Aditya: (317)-828-0987
  
Run gdb (like this): gdb
+
===gmail (Google Docs Sharing, use Pedagogical list for regular contact)===
 +
# AlexanderReid10
 +
# Mobeen.Ludin
 +
# akrishnan14
  
Enter the name of your executable program. This is typically `a.out' unless you have renamed it (which any self-respecting programmer should).
+
== Who/How to contact people/groups outside pedagogical group ==
 +
* Admin Group (When we need root access, to clear printer queue)
 +
# admin@cs.earlham.edu
  
===Issuing Commands===
+
* Jason Robbins (When we need to fix a problem in the labs)
 +
# robbija@earlham.edu
  
The GDB window will display a message and then present you with the prompt (gdb). Whenever your cursor is on one of these prompts you can enter a GDB command. Pressing `Return' without entering a command will cause it to execute the previous command again. This is very convenient when stepping through a program line-by-line.
+
* Content Group (for website management)
 +
# stuff@cs.earlham.edu
  
'''All GDB commands can be abbreviated''' unless doing so renders them ambiguous. Most of the commonly used commands can be abbreviated to one character. The following command descriptions are in the form: command (abbreviation) arguments. Arguments listed in brackets are optional.
+
==How to check the labs==
 +
=== Mac & PC (Windows) ===
 +
# Login to the machine using you EC username and password (The same one you use to access theHeart).
 +
# Open the folder named “Applications” on your desktop.
 +
# Open Xming and check that the Chooser script is:
 +
*Up and running.
 +
*Returning 3 machines that are available to host.
 +
*Allowing you to connect to an Acl once you have chosen it.
 +
*Not returning the multiple instances of the same acl.
 +
# If there is a problem  such as:
 +
*Chooser not running.
 +
*Connecting to any  Acl.
  
'''help (h) [class][command]'''
+
==How to how to use CVS/SVN==
 +
Access/get access to directories, etc...
  
With no arguments, this lists the command classes. If a class is specified, it will briefly describe commands in that class. If a command is specified, it will provide help on using that command.
+
==How to use Virtualization Software==
 +
===Virtualbox & Parallel ===
 +
# Log-In to Mac with you EC username and password
 +
# Start up Parallels. Decline any requests to update
 +
# Check to make sure chooser script has selected 3 ACLs
 +
# Keep track of which ACLs are chosen to make sure they are different
 +
# Choose an ACL. Log in with CS username and password
 +
# Make sure the vtwm is functioning properly
 +
# If there is a zombie vtwm follow the zombie vtwm procedures.
  
'''quit (q)'''
+
==How use bash and interactive shell==
 +
* Bash scripting
 +
For an in-depth guide view the tutorial on our page, [http://www.cs.earlham.edu/~psg/tutorials/linux_tutorial.html page]
  
Exit GDB. Type `C-x k' to kill the GDB buffer.
+
* Perl scripting
  
'''Loading and Running Programs'''
+
==List of software/tools that we maintain==
 +
* Chooser
 +
* NWD (New Wheel Daemon)
 +
* CMU Graphics (via Carnegie Mellon)
  
In order for GDB to be able to debug your program, you must compile the program with the `-g' option. Each time you recompile your program, you must reload it into GDB using the file command.
+
==Access/get access to those==
 +
==How to clear & check printers==
 +
* '''Printers should be checked every day'''
 +
* Use the script from CVS that checks the status of the printer and queue
 +
* or run the command ‘lpq name-of-the-printer’ for queue status
 +
* If ink is low or paper needed contact Bobbie
 +
* If queue is jammed/backed-up contact sys-admin group
  
'''file file'''
+
==How to deal with not having root access==
 +
* You will need root access
 +
# When something needs to be added to file system, or operating system. level. for example adding a library, or modifying low level scripts, etc...
 +
# Editing settings in already installed software.
 +
* For ACLs root access contact CS sys-admin group
 +
* For remote connect software contact Jason/ITS
 +
* Bobbie for printer needs
  
Load a new executable file.
+
==How to work with RSA keys  ==
 
+
* using keygen to generate ssh keys
cd directory
+
** This will allow you to log in to other acl machines without prompting for your password. Its useful when you will be running script for checking ACL machines.
 
 
If you start from within a directory different from the one containing your executable file, you will need to use this command to change to the proper directory.
 
 
 
'''run (r) [arglist]'''
 
 
 
This starts your program just as you would start it on the command line, except that `r' now replaces the name of your program. For example, if you normally run you program with `a.out 6 < inputfile > outputfile', you should run it under GDB with the command `r 6 < inputfile > outputfile'.
 
 
 
'''C-c'''
 
 
 
If your program is running, typing C-c twice will interrupt it and give you a GDB prompt. The program is only paused at this point and can be resumed with continue or destroyed with kill.
 
 
 
'''kill (k)'''
 
 
 
Terminate the program.
 
 
 
'''Moving Through the Program'''
 
 
 
GDB will normally run your program until completion, until you type `C-c C-c' or until the program asks for some input. In order to tell GDB to pause while running your program, you must set a breakpoint. Once the program has stopped, various commands will tell it how to proceed. More advanced users may want to experiment with watchpoints, although in general they are tricky to use and cause your program to run very slowly.
 
 
 
'''break (b) [function][line]'''
 
 
 
Set a breakpoint. If given a function name, GDB will break whenever that function is called. If given a line number, it will break whenever that line of your source code is reached.
 
 
 
'''C-x space'''
 
 
 
If you type this sequence while your cursor is in your source code, GDB will set a breakpoint at the line on which your cursor rests.
 
 
 
'''delete (d) n'''
 
 
 
Delete the breakpoint or watchpoint whose number is specified by n.
 
 
 
'''disable (dis) n'''
 
 
 
Temporarily disable the breakpoint or watchpoint whose number is specified by n.
 
 
 
'''enable (ena) n'''
 
 
 
Undo the effects of disable.
 
 
 
'''step (s)'''
 
 
 
step executes the next line of code. If the next line contains a function call, step will enter that function.
 
 
 
'''next (n)'''
 
 
 
next is similar to step except that it will step over function calls.
 
 
 
'''continue (c)'''
 
 
 
Resumes execution of the program until the next breakpoint is reached.
 
 
 
'''finish (fin)'''
 
 
 
Continue until the current function has returned.
 
 
 
'''until (u) [function][line]'''
 
 
 
Continue until the program reaches a source line greater than the current one. It can also be given an argument similar to break and will continue until the specified line or function is reached. until will also break upon returning from the current function.
 
 
 
===Getting Information===
 
 
 
'''print (p) expression'''
 
 
 
This command performs several functions. It is most commonly used to print out the value of a variable. It can be given any C expression, including casts. For example, `p (int) A->array[5]' will display the sixth element of the array specified by A->array as an integer. print will try to display its output in a nice format. If given a structure, it will show each field and value. If given a pointer to an array of characters, it will display the entire string.
 
 
 
If an assignment or function call is given to print, it will perform the operation and display the result. For example `p a = 5' will set the value of the variable a to 5. If `p f(4, a)' is then performed, it will execute the function f with the arguments 4 and 5 and will display the value returned by f.
 

Latest revision as of 11:17, 7 November 2016

How to access the wiki page

The Pedagogical wiki page is hosted under the wiki.cs.earlham.edu, and can be reached from this page by the link “Pedagogical Tools Group” under the “Applied groups” section.

How to access the web page

The Pedagogical Tools applied group home page is hosted under CS Department Website, and can be reached by clicking on the Pedagogical Tools icon.

How to use ssh and remote connect

Xming, pUTTY

See the tutorial(s) under our pedagogical group page

Parallels & Terminal (Linux & OS X)

See the tutorial(s) under our pedagogical group page

How to update our tutorials

The tutorials are in the form of HTML docs located in the Pedagogical group folder and have to be edited via CVS, see the section on using CVS below.

How to find our tutorials

Our tutorials are found under the “Tutorials” Section on either cs.earlham.edu, or the Pedagogical tools group page.

How to communicate with the group

Emails

  1. Lab Check Emails
  • See wiki page for a sample form for e-mail
  • Subject: Lab Status + Name of Lab(s) + Date Checked
  • Body:
    • List the labs that you checked (Building + name of lab)
    • Include the type of machines in the lab (Mac/PC)
    • Under each lab check section list any notable things encountered during the check.
    • For any problems you come across, document the procedure you went through that generated the problem of made you aware of it. Include the number of the machine having the problem.
    • If problem solved, thoroughly document the fix you implemented.
    • Include status of printers we check (D224, PCSLounge)
  1. Meeting Notes emails
  • See wiki page for a sample form for meeting notes
  • Subject: “Pedagogical Meeting Notes” + Date
  • Body: Include anything/everything relevant to the group discussed in the meeting,:plans, goals ect.

Phone + Text

  1. Mobeen: (765)-977-3888
  2. Alex: (917)-627-9250
  3. Aditya: (317)-828-0987

gmail (Google Docs Sharing, use Pedagogical list for regular contact)

  1. AlexanderReid10
  2. Mobeen.Ludin
  3. akrishnan14

Who/How to contact people/groups outside pedagogical group

  • Admin Group (When we need root access, to clear printer queue)
  1. admin@cs.earlham.edu
  • Jason Robbins (When we need to fix a problem in the labs)
  1. robbija@earlham.edu
  • Content Group (for website management)
  1. stuff@cs.earlham.edu

How to check the labs

Mac & PC (Windows)

  1. Login to the machine using you EC username and password (The same one you use to access theHeart).
  2. Open the folder named “Applications” on your desktop.
  3. Open Xming and check that the Chooser script is:
  • Up and running.
  • Returning 3 machines that are available to host.
  • Allowing you to connect to an Acl once you have chosen it.
  • Not returning the multiple instances of the same acl.
  1. If there is a problem such as:
  • Chooser not running.
  • Connecting to any Acl.

How to how to use CVS/SVN

Access/get access to directories, etc...

How to use Virtualization Software

Virtualbox & Parallel

  1. Log-In to Mac with you EC username and password
  2. Start up Parallels. Decline any requests to update
  3. Check to make sure chooser script has selected 3 ACLs
  4. Keep track of which ACLs are chosen to make sure they are different
  5. Choose an ACL. Log in with CS username and password
  6. Make sure the vtwm is functioning properly
  7. If there is a zombie vtwm follow the zombie vtwm procedures.

How use bash and interactive shell

  • Bash scripting

For an in-depth guide view the tutorial on our page, page

  • Perl scripting

List of software/tools that we maintain

  • Chooser
  • NWD (New Wheel Daemon)
  • CMU Graphics (via Carnegie Mellon)

Access/get access to those

How to clear & check printers

  • Printers should be checked every day
  • Use the script from CVS that checks the status of the printer and queue
  • or run the command ‘lpq name-of-the-printer’ for queue status
  • If ink is low or paper needed contact Bobbie
  • If queue is jammed/backed-up contact sys-admin group

How to deal with not having root access

  • You will need root access
  1. When something needs to be added to file system, or operating system. level. for example adding a library, or modifying low level scripts, etc...
  2. Editing settings in already installed software.
  • For ACLs root access contact CS sys-admin group
  • For remote connect software contact Jason/ITS
  • Bobbie for printer needs

How to work with RSA keys

  • using keygen to generate ssh keys
    • This will allow you to log in to other acl machines without prompting for your password. Its useful when you will be running script for checking ACL machines.