User Tools

Site Tools


opus:spring2014:klockwo1:journal

C/C++ Programming Journal

January 23, 2014

Today we had our first C Lab and I got to experience the amazing welcome that Matt gives to the new students.

  • Today we wrote our first two C programs of the class, which I was very happy about.
  • This is very significant because talking about doing something forever is not as good as actually doing it.
  • I'm still not very good at programming, but I am very sure that I will get better my using a more…suitable language.
  • The biggest challenge I faced was that I wasn't able to commit to Joe's Bitbucket repo from Lab46, which I figured out how to do and added a little guide on my Opus.

<charter> title = Scrubbed Traffic size = 700×230 align = center type = bar legendEntries = Scrubber XAxisName = Hour XAxisFormat = Time YAxisName = Traffic Mbps shadow = on dots = 3 palette = tropical titleColor = #efefef scaleColor = #efefef shadowColor = #000 bggradient = #333@50 graphGradient = #666@50 fontLegend = VeraMono.ttf@8 graphLabels = 1|5|6Gbps DDoS

0,0,0,1,0,6,0,0,0,0,0,0 </charter>

MONTH Day, YEAR

This is a sample format for a dated entry. Please substitute the actual date for “Month Day, Year”, and duplicate the level 4 heading to make additional entries.

As an aid, feel free to use the following questions to help you generate content for your entries:

  • What action or concept of significance, as related to the course, did you experience on this date?
  • Why was this significant?
  • What concepts are you dealing with that may not make perfect sense?
  • What challenges are you facing with respect to the course?

Can you answer the following questions?:

Does this code have any preprocessor directives? What line(s)? What does the preprocessor directive do? What line(s) encompass the main() function? Are there any: function prototypes? local variable declarations? initializations taking place? statements performing some process (the “processing”)? de-initialization / wrapping things up steps? What does each keyword, function, or equation do? (hint, there are no equations in this program). What is that printf(), a keyword or a function? What is that return(), a keyword or a function?

MONTH Day, YEAR

This is a sample format for a dated entry. Please substitute the actual date for “Month Day, Year”, and duplicate the level 4 heading to make additional entries.

As an aid, feel free to use the following questions to help you generate content for your entries:

  • What action or concept of significance, as related to the course, did you experience on this date?
  • Why was this significant?
  • What concepts are you dealing with that may not make perfect sense?
  • What challenges are you facing with respect to the course?

Commit to Bitbucket from Lab46

First, clone your repository.

hg clone https://yourusername@bitbucket.org/yourusername/cscs1320s14

cd into your repository directory that it just made

cd cscs1320s14

Next, cd into the .hg directory directory

The .hg directory is hidden because it begins with a . run ls -a to see it

cd .hg

Now, edit the hgrc file

nano hgrc

The paths should already be there, add the following info, replacing the correct variables

[paths]
default = https://yourusername@bitbucket.org/yourusername/cscs1320s14
[auth]
bb.prefix = https://bitbucket.org/yourusername/
bb.username = yourusername
[ui]
username = Firstname Lastname <mybitbucketemailaddress@whatever.com>
verbose = True

save the the file and go back to the repo directory

cd ..

add your files you wish to push, type

hg add

this adds them to the repo, and then you can use

hg commit -m "Your commit message"

then

hg push

to push it to Bitbucket

HPC Fundamentals Journal

January 23, 2014

Today we got comfortable in the LAIR and set up our computers that we will run virtual machines on.

  • We were able to set up the computers and get Debian Wheezy installed
  • This is significant because it is the first step in setting up our virtual machine system.
  • So far, there is nothing that has stumped me.
  • I'm not facing any challenges so far, other than that I am super excited to get started doing things.

January 29, 2014

Today we set up Xen and installed our VMs

From a base Debian Wheezy system

# apt-get install xen-linux-system

Now we need to change the kernel boot order so that the Xen kernel is chosen automatically

# dpkg-divert --divert /etc/grub.d/08_linux_xen --rename /etc/grub.d/20_linux_xen

Now we need to update Grub

# update-grub

We'll have to configure the networking on the host to support the VMs, so let's edit our /etc/network/interfaces file

# nano /etc/network/interfaces

Replace this file with the following configuration. (May need to be modified for non-LAIR machines)

#The loopback network interface
auto lo
iface lo inet loopback

iface eth0 inet manual

auto xenbr0
iface xenbr0 inet dhcp
   bridge_ports eth0

#other possibly useful options in a virtualized environment
  #bridge_stp off       # disable Spanning Tree Protocol
  #bridge_waitport 0    # no delay before a port becomes available
  #bridge_fd 0          # no forwarding delay

Now we need to install the Xen configuration tools

# apt-get install xen-tools

Now we need to change a few Xen tools settings

Open up the Xen tools config file

# nano /etc/xen-tools/xen-tools.conf

Read through this file and edit as needed. In my case, I uncommented or edited the following lines.

dir = /home/xen
install-method = debootstrap
memory = 256Mb    # Memory size
dhcp = 1
passwd = 1
mirror_wheezy = http://mirror/debian #(this is my local mirror)

Now we are ready to create our first VM

# xen-create-image --hostname myfirstvm --vcpus 1 --pygrub

It should ask you to set a root password for the VM during this process

After this has finished, we can start it up and view the boot process with

# xm create -c /etc/xen/myfirstvm.cfg

You should now see the boot process and end up at the login prompt Login with root and the password you set during the create process, and get the IP of your VM

ifconfig

Now logout and disconnect from this console with Ctrl + ]

and SSH into your new VM

You can view the currently running VMs by using

xm list
  • I love VMs, but I have never set them up using solely the command line, so this was a brand new experience for me.
  • We are now able to create and destroy VMs as needed so we can play around easily.
  • Nothing is incredibly confusing so far, I'm fairly comfortable with the concept and use of VMs, just not using them without some kind of interface.
  • Documentation is always hard, but I think the Xen tutorial is good enough to put on Shellfish.

MONTH Day, YEAR

This is a sample format for a dated entry. Please substitute the actual date for “Month Day, Year”, and duplicate the level 4 heading to make additional entries.

As an aid, feel free to use the following questions to help you generate content for your entries:

  • What action or concept of significance, as related to the course, did you experience on this date?
  • Why was this significant?
  • What concepts are you dealing with that may not make perfect sense?
  • What challenges are you facing with respect to the course?
opus/spring2014/klockwo1/journal.txt · Last modified: 2014/03/26 19:54 by klockwo1