User Tools

Site Tools


faq:hpc

<html> <script language=“JavaScript”> document.title = “[Lab46][High Performance Computing FAQs]”; </script> <center> </html>

High Performance Computing FAQs

<html></center></html>

A list of Frequently asked questions and answers to them.

Virtual Machine Questions

What If
  • A VM gets taken down?
    • Command: xm create -c /xen/conf/vm09.cfg + ^] + ssh root@NameofVM.student.lab
      • Example sign in
	Godzirra
		user name: bob
		pw: ginger
	root
		pw: bob 

~Michael Short

How to
  • Sign into a VM?
    • Open a lab46 terminal
    • Command: ssh root@NameofVM.student.lab
      • Password: bob

~Michael Short

  • Access a VM remotely?
    • Open a terminal
      • Command: ssh root@vmserverNumberofServerYou'reUsing.student.lab
        • Password: bob

~Michael Short

Linux Terminal Server

Need Something?
  • How about your IP address?
    • Command: sudo dhclient eth(put the number of the ethernet card here)

~Michael Short

How do I set up a computer to Netboot?
  • In your BIOS settings, change the boot priority to Intergrated NIC w/ PXE
  • Restart your computer, and you will now be prompted to install via your network server.

-Kenneth Denson

Do I need anything in order to log in?
  • You need a user name and a password on the system that is the server in order to sign in

Matthew Taft 2010/05/17 18:18

I can't log in, what is wrong?
  • Make sure that you have a login on the server system, if you do then make sure that your ssh_known_hosts file has the IP address of the ethernet interface being used for the server is after the hostname on the beginning lines of the entries.

Matthew Taft 2010/05/17 18:18

==What is so special about using this?==

  • LTSP allows you to set up a lab or a group of networked computers while only having to install and maintain a single box. It allows for centralized management and makes updating and keeping packages up to date a lot easier than if users were spread out over multiple individual systems. Also it allows a user to no matter what box they log into (provided they are logging into the server) to always have their work at their fingertips.

Matthew Taft 2010/05/20 22:19

==How easy is this to implement?==

  • All it takes is installing a few packages and modifying a few configuration files to suit the situation for your group that you will be netbooting. Also it may require a high end machine if the system is going to be running a full graphical install on a thin client as all of the processing is done on the server system.

Matthew Taft 2010/05/20 22:19

==Is there an option that allows for a little less of a high end machine to be used as the server?==

  • Implementing a “fat” ltsp client will allow for more processing to be done on the individual systems that will be booting from the server, allowing a little leeway on the strength of the server machine. They are a little more challenging to implement but they are great if the size of the group you will be netbooting is large.

Matthew Taft 2010/05/20 22:19

Raiding Fun Facts

What is a RAID?
  • RAID stands for Redundant Array of Inexpensive Disks. A RAID makes use of multipule disks acting together to increase size, performance, or to act as backup storage.

-Kenneth Denson

What tool should I use to set up a RAID?
  • mdadm will fit all your RAIDing needs.
    • aptitude install mdadm

-Kenneth Denson

Fun Fact 0

To mount:

  • Command: mount
    • Example: mount /dev/md0 /mnt

-Kenneth Denson

Fun Fact 1

To unmount:

  • Command: umount .path .ie
    • For Example: Command: umount /dev/md0
  • To take raid offline:
    • Command: mdadm .stop insert path you figured out in the above statement
      • For Example: Command: mdadm .stop /dev/md0

~Michael Short

Fun Fact 2

To zero out drives:

  • Command: mdadm .zero -superblock /dev/xvda<Insert your number here> (repeat but replace the number in xvda# by incrementing from # to # whatever you need)

~Michael Short

Another command for zeroing out the drives:

  • dd if=/dev/zero of=disk_#.img bs=1M count=1024 - Remember to replace the # with the number of the disk image file in xen/domains/YOUR_VM

Bradley Hammond 2010/05/19 10:50

Fun Fact 3
  • To view your active disks..
    • cat /proc/mdstat

-Kenneth Denson

How do I set a share to mount when the system boots?
  • Add an entry to the /etc/fstab file for the share that you want to mount. Make sure that you use rw for the options.

Matthew Taft 2010/05/17 18:31

Automated Drawing Drivels

You may ask
  1. How do i make my script an executable? Need a reminder?
    • Command: chmod +x <Name of script>
      • OR
    • Command: chmod 700 <Name of script>
      • both of these commands accomplish the same thing

~Michael Short

  1. How do i get started? How can i make bash make my mouse move without my hand?
    1. hint *xte mousemove x y*
    2. hint *xte mousdown 1*
    3. hint *xte mouseup 1*
      1. And yes you could even loop these

~Michael Short

  1. How would I take a chunk of a script or entire script to call and use ,in others?
    1. Save the block of code, if you haven't already, into its own script
    2. In the calling script insert “. /file/path/to/script.sh” where you want to use it

Bradley Hammond 2010/05/18 12:13

If I wanted to automate a mouse's right click, how would I do this?

  • Simple. “xte mouseup 3”

Bradley Hammond 2010/05/18 12:13

Grabbing Desktop Dimensions

  • Let's say your on a system and you're unsure of the desktop dimensions. To find them you would do the following:
    • xwininfo -root | grep '\-geometry' | sed -e 's/^.*\ //g' | sed -e 's/+.*//g'
  • It isn't much different when grabbing window dimensions.
  • xwit -print -all | grep '*INSERT_WINDOW_NAME*' | sed -e 's/:.*//g'

Bradley Hammond 2010/05/18 12:39

Basic xwit Usage

  • the xwit command is also very useful for mouse cursor manipulation
    • xwit -root -warp xPosition yPosition will move to that absolute x,y position on the desktop
    • xwit -root -rwarp xPosition yPosition will move to the mouse's relative x,y position on the desktop

Bradley Hammond 2010/05/19 10:57

sleep command

  1. Another useful tidbit in doing the automated drawing is the sleep command. Lets say, for example, that you're opening Xpaint and then trying to grab the window IDs for the canvas and tool bar. However, the script tries grabbing for them before the system is finished opening Xpaint. Insert the sleep command using the syntax “sleep #s”. In most cases, a second or two will be more than sufficient for the system to catch up.

Bradley Hammond 2010/05/20 12:49

Virtual Server Questions

How do I see what VM's are running on my Virtual Server?
  • xm -list will list the current running VMs.

-Kenneth Denson

How do I shutdown a server, or VM?
  • shutdown -h now will shutdown whatever severs terminal you enter it into.
    • Be careful to use this command in the correct terminal!

-Kenneth Denson

Q: If you try to shutdown a Virtual Machine normally and it will not shutdown what command can you use to stop it?== [jbrant]
A: xm destroy domain-name [jbrant]

Q: What command can you use to move a virual machine from one vm server to another vm server with out shutting it down? [jbrant]
A: xm migration [jbrant]

Q: Can you have virtual machines using different operating system on the same vm server? [jbrant]
A: No because each guest is copy of the original Kernal. [jbrant]

Q: How would you make a virtual disk? [jbrant]

A:

  dd if=/dev/zero of=/xen/domains/vm14/vicepa.disk count=900 bs=1M
                        ^                                 ^     ^--------------------------+     
                    Name of virtual disk                  Number of blockes                |-Size of blockes   [jbrant]
                    

Q: Can you build a server cluster across multiple subnets? == [jbrant]

In Soviet Russa, Videos Wall YOU!

What tools will I need to set up a video wall?
  • xdmx and fluxbox will be very useful.
    • xdmx will allow you to run multipule screens off of one machine.
    • fluxbox is a window manager that you will need to use all screens as one.

-Kenneth Denson

what do you need to create a 12 monitor video wall
* definately 12 monitors and 6 machines will be needed along with a switch and a long mudkip video
* Jeff jansen just rules

Questions About installs

Q: How do you update source.list? == [jbrant] A: aptitude update <enter>

 aptitude upgrade <enter> [jbrant]

Q: How can you check to see what packages have been installed? == [jbrant]
A: dpkg -l will list installed packages [jbrant]

Q: What is the 'make' command used for? [jbrant]
A: To determine automatically which pieces of a large program need to be recompiled, and issue the command to recompile them.

Q: How do you uninstall an application or driver? [jbrant]
A: aptitude purge application [jbrant]

Q: What is the difference between aptitude and apt-get == [jbrant]
A: One difference is that aptitude keeps logs. The log file is located at /var/log/aptitude [jbrant]

Q: What if aptitude can't install the package I want?
A: Almost every package can also be installed from source from the site. To do this download the source archive, extract it and follow the instructions usually enclosed within. Usually this involves running a script called configure within the folder the archive extracts to. Then running make and make install. Any changes to this will normally be listed in the instructions.
Matthew Taft 2010/05/17 20:41

Q: How do I search for packages using aptitude?
A: aptitude search *Possible package name*
Bradley Hammond 2010/05/18 13:36

Q: Aptitude is installing more than I want it to, is this okay?
A: This is most likely because the package you told it to install needed some extra things that were found in those other packages, it's normal.
Matthew Taft 2010/05/20 22:17

General Questions

== What are the versions of Debian name after? == [jbrant]

== How do you mount a peripheral device? == [jbrant]

Generating a random number in a script or on the command line

  • If for some reason you need a quick simple way to generate a random number, the command line is your best friend. On the command line or in a shell script type the following:
echo $(($RANDOM%10+1))
  • This will generate a random integer between 1 and 10. If you wanted a number between 0-9, simply leave out the +1.

Bradley Hammond 2010/05/20 12:56

Unwanted Wiki Syntax

  • Also, if you're having trouble display a command line on the wiki properly, and for some oddball reason the code tag doesn't work, use the following:
<nowiki>COMMAND_LINE</nowiki>

Bradley Hammond 2010/05/20 13:14

Display array contents in a shell script

  • When displaying things to the command echo is a very useful tool. When displaying an array, it can sometimes be a bit funky. When echoing variables, simply using a plain “echo” command is the first way to go. When displaying an array it may not be the way you want to go. If you want the contents of your array to be split up, simply use
    echo ${array[$sub]}

    But if you want to see everything lumped together use the following:

    echo -n ${array[$sub]}

Bradley Hammond 2010/05/20 13:25

Jesse Short

  1. Uh ohez, I created a user I didn't want to. How do I delete this?
  • userdel -r “user name”
  1. What does this “ssh” do that people keep using?
  • Well it stands for secure shell (it uses the three way handshake) and lets two devices connect to eachother over a network. One reason for why it is “secure” is because it uses data encryption.
  1. I'm not root why wont some of my commands work?
  • Try prefixing it with sudo. It means super user do and allows for some commands that require you to be logged into root to work.
  1. What is bash?
  • Bash (Bourne again shell) is a shell scripting language (It's a simple language to understand and can also execute commands on the command line interface).
  1. How do I begin a bash script?
  • #!/bin/bash. #! = “she-bang”. The program loader takes the presence of these two characters as an indication that the file is a script, and tries to execute that script using the interpreter specified by the rest of the first line in the file. So the /bin/bash is the location of the interpreter.
  1. How do I end a bash script?
  • exit 0
  1. Why cant my bash script do decimal point math?
  • Remember its a simple language, however, also remember that it can use terminal commands and tools. Therefore, just pipe the math to bc. I suggest bc -lq. l = math libraries and q = quiet so it wont output its heading information.
  1. How do I kill a process?
  • You can either choose the appropriate kill -# “process id” (where # is 1 - 64 listing: kill -l and the process id is found in the 5th column of the ps aux command) or pkill “file name”. Example: kill -9 9104 and pkill xpaint respectively.

Tyrone Riley

Q: How do I transfer files fromlab46 account to my home Linux system?

A: Put Files that need to be transferred into Public_html

wget http://lab46.corning-cc.edu/~$USER/filename .

Q: How do i transfer files from my home system to my lab46 account?

A: got to the directory were your file is located

scp filename $USER@lab46.corning-cc.edu:~/

Q: What file permissions are needed to use wget?

A: (a+r) -rw-r–r–

Q: What file permissions are needed to view a webpage?

A: (a+r) -rw-r–r–

Q: What file permissions are needed for a web page to access the contents of a folder?

A: (a+x) drwx—–x

Q: How do i get the raw data from my wiki jornal into lab46?

A:

wget http://www/journal/spring2010/$USER/week1

Q: How do i look at log files that only pertain to me?

A: using swatch documentation:swatch

Q: how do i add a style sheet to a lab46 public_html web page?

A: place your stle.css file in the public_html directory and within the head section of your web page add

    <style type+"text/css">
        @import "style.css"
    </style>

Mr. Jeff Jansen

welcome to the section ginger the hottest club in all of asia.

so how do you remove directories you ask?

you simply do the command : rmdir (directory name here)

and jesse short your use of the ginger racist slurr is unnecessary i will find you in your sleep and kill you

how do i crate raid with he os on one of the hard drives?

you will need to set up the raid when you are installing the os such as ubuntu.

What shoud i do if i cannot get my computer to connect to the network?

one of the first steps would be to check the ethernet cable to see if it is connected at both ends.

how do i access the irc network?

well you start by opening a screen session then type irssi /server irc then join the channels you want to

Section Heading L

Michael Gough's Magical FAQ's

Q: What is MPI?
A: MPI stands for Message Passing Interface. It is a widely used protocol for passing information to be processed on a cluster of computers.
Open MPI can be found here: http://linux.softpedia.com/get/System/Clustering-and-Distributed-Networks/Open-MPI-7359.shtml

Q: What is cluster computing?
A: A computer cluster is a group of two or more homogeneous computers networked and configured to provide access to parallel processing.

Q: What is parallel processing?
A: Parallel processing breaks up the data to be processed and sends the individual sections to a computer or processor to be independently calculated or modified. The sections are then returned to the calling computer and re-assembled via MPI. This has the net effect of shortening the processing time as the work is distributed over the cluster.

Q: What is scp??
A: SCP stands for secure copy, its a quick and easy way to transfer files between computers and hosts. This can be performed as shown:

$ scp filename bob@bob.com:~/filebackup

This will copy a file from your current folder named “filename” and place it in the backup folder under the home directory at bob.com.

Q: What is cURL and how is it useful?
A: cURL (Cambridge University Robot Language) is/was intended to be an easy to use replacement for html/javascript. A useful attribute of cURL is that it can simulate user interaction to a web page, providing means of logging in and modifying existing sites and user information.

Q: What is chromium and where can I find it?
A: Chromium allows parallel graphical rendering across a cluster, supporting openGL it allows fast graphical rendering and advanced graphics.
Chromium can be found here: http://chromium.sourceforge.net/

Q: What are some examples of distributed processing?
A: There are quite a few programs out there that use the idle time of home PC's to perform complex calculations. The net result is a massive amount of calculations that would otherwise be impossible. A prime example is the Seti@home project. There are currently over 5.2 million users that have returned over two million years of accumulated computing time, and over 10^21 floating point operations, unfortunately, ET has not phoned home yet…

Q: Ok, how do you time how fast it takes a program to run?
A: Just type the word “time” before executing the program, simple eh? Like this:

$ time ./thisprog

You will have time statistics returned when execution is over. This is useful when optimizing a program, or comparing single run to cluster run times.

Q: What is a KVM?
A: A KVM stands for keyboard, video, mouse. It is an adapter that allows you to connect multiple computers and select which you control via one keyboard, monitor, and mouse.

Section Heading N

Section Heading O

Section Heading P

faq/hpc.txt · Last modified: 2010/05/21 23:04 by ryoung12