cs45a: +1 # your new port number is 10023 cs45b: +2 # your new port number is 10024 cs45c: +3 # your new port number is 10025 ..Now, setup virtualbox to use your port number. Start virtualbox, click on Network:Advanced:PortForwarding then change the HostPort box to your port number.
This is the new port number you will use for ssh and scp into your VM:
ssh -p 10024 ... scp -P 10024 ...
If you have problems with your new port number, pick another one outside of the range of your classmates' and also one that is above 1024. You can see the ports that are currently in use on your machine by running the following script:
ssh into your assigned machine using your cs45 account:
ssh -X cs45X@your_assigned_machine_nameThen following along the "Kernel Debugging using kgdb" steps from the: VirtualBox guide for CS45
Here are some example functions you in which you can put breakpoints, and examples of how to trigger them:
breakpoint command to trigger it ---------- ----------------------- sys_kill kill -9 PID sys_sync sync sys_getuid sudo ls
To get an idea of what system calls are invoked when you run a program, try running strace on some applications:
# to list all strace command line options strace # (ex) summary info about system calls invoked during program's execution: strace -c ./a.out strace -c ls
The /proc file system contains information about every process in the system and information about system-wide resources. Each process has its own subdirectory in /proc/pid, and its state is accessed by reading /proc files (try 'cat status' for example). ps -A will list all processes and their ids. Try cat'ing out some of the files in one of your /proc/pid subdirectories to see what type of information is available via /proc.
System-wide information is also available via /proc files. Try cat'ing out some of these files to see what types of information you get.
See my Tools for examining system state for lots more information about finding out information about the running system and about processes on the system.