Sunday, December 14, 2008
Wednesday, December 10, 2008
Installing Condor in OSX 10.5
I found this process in a weird place on condor's site ... it was in the tutorials under Administration Tutorial. At the same time this worked. The only thing I did differently was to download the Condor package for Intel Mac 10.4. Sorry but you will have to do all of this from the terminal window. Beyond that everything else worked. So here is my "workflow" lol...
- Downloaded Condor for Intel Mac 10.4 (In my case I used 7.0.5).
- Opened terminal (Hard drive --> Applications --> Utilities --> Terminal)
- Logged in to my root account with "su" and then typed in my password (If you dont know your root password your boned lol ok seriously you need to either see your system administrator or try this out http://www.mac-forums.com/forums/os-x-operating-system/5331-how-do-i-reset-root-password.html but if your root account just isnt on check out this link http://support.apple.com/kb/HT1528)
- Type "useradd condor" and press [Enter]
- Type "chmod a+rx ~condor" and press [Enter]
- Type "cd /" and press [Enter]
- Type "mkdir condor" and press [Enter]
- Type "cd /condor" and press [Enter]
- Type "cp /Users/jeaimepowell/Desktop/condor-7.0.5-MacOSX10.4-x86-dynamic.tar.gz /condor/" and press [Enter]
- Type "tar -xzf condor-7.0.5-MacOSX10.4-x86-dynamic.tar.gz " and press [Enter]
- Type "cd condor-7.0.5" and press [Enter]
- Type "./condor_configure --install --install-dir=/condor/condor \ --local-dir=/condor/condor/var --owner=condor
" and press [Enter] (I got some errors but it installed) - Type "ln -s /condor/condor/etc/condor_config ~condor/" and press [Enter]
- Type "PATH=$PATH:/condor/condor/bin/:/condor/condor/sbin/" and press [Enter]
- Type "nano /condor/condor/etc/condor_config" and press [Enter]
- Look through the file in Part 2 until you find "HOSTALLOW_WRITE =" and remover the text after it and just have a "*"
- Press [ctrl] [x] and press "Y" then hit [enter] twice
- Type "condor_master" and press [Enter]
- Type "ps -ef |grep condor" and press [Enter] (you should see a bunch of condor processes running
- After a half a minute or so you should be able to type "condor_status" and actually see your machine on the node.
- You are done!
Installing Condor the easy-easy way
So I have to be honest here... the traditional install of condor using the "Newer Unix Install" has kicked my butt. I ran into permission issues, directory location issues,environmental variable issues, hostname issues and all other sorts problems I would rather forget. Well as a last ditch effort and kind of as a joke to myself I decided to install Fedora (FC10) and look in the package manager (In Gnome "System-->Administration-->Add/Remove Software) for Condor. To my complete shock it was there under "Condor:High Throughput Computing"!!! I checked it and it installed and get this...I typed "condor_status" in the terminal window and boom-bam it was working!! The main condor folder (release directory) is all over the place in the system but the bastard just works. So just to lay it out in a non ubber geek way:
- Install Fedora (I used FC10 but I dont know if it is in other cores)
- Open "System-->Administration-->Add/Remove Software"
- Search for Condor (type it in the search box and hit enter)
- Put a check next to "Condor:High Throughput Computing" (I checked the Condor headers one too but I dont know if it is necessary)
- Click "Apply" (In my case it also added a few other dependencies automagically so dont be worried if you see that)
- When it is done open a terminal window (Applications --> System Tools --> Terminal)
- Type "condor_status" and you should see a status with one node.
- You are done!!
Good Luck!!
Wednesday, September 3, 2008
Installing Canon i860 in Fedora Core 9 (gutenprint)
Here is the easiest way I have found to get the driver in there.
- Goto Systen --> Administration --> Add/Remove Software
- In the search box type "gutenprint" and click [Find]
- Add a check mark next to "Cups drivers for Canon, Epson, HP and compatible printers"
- Click "Apply"
- Then goto System --> Administration --> Printing
- Click "New"
- Select the "i860 USB #1" and click [Forward] (this was in my case it may be a different number for you)
- Select "Canon" and click [Forward]
- The "i860" model and "Canon i860 - CUPS+Gutenprint v.5.0.2 ...] should be selected and click [Forward]
- You can change the name if you want but i just left it as "i860" and clicked [Apply]
- Once the install is complete I would test the printer by selecting it from the list and clicking [Print Test Page]
No sound from flash (Youtube) in Fedora Core 9
No I am not the one who came up with this fix. The credit goes to /crisis website.
- Open a terminal window
- Type
su -
and enter your root password - Type
yum install libflashsupport
- When it is done you should be good to go.
Sunday, July 20, 2008
Linux Commands used in Greenland to Admin the server
For System Monitoring
-top - displays the load and memory usage of all applications and processors
-uptime - show system load and should not be over 20 (for Greenland field server)
-vmstat [-S M 5] (S M show in megabytes and 5 says update every 5 seconds) - shows memory usage.... hopefully will not use swap file because it will slow down the processing
-mpstat [-P ALL](for all processors or can put the number of the specific processor) - shows cpu usage
-df - displays mounted drives and locations
-du [-h](shows a human readable view) - displays disk usage
-SMclient - displays RAID status
-nodestatus - displays MDCE MatLab workers running
-/etc/init.d/mdce [status] - displays whether mdce is running
-/sbin/service [name] [start stop status restart] - used to access other service such as nfs, portmap ...etc
-cat /etc/fstab - lists mounts and apps that run at startup
-dmesg - kernel messages such as when you plug up a usb device
-/var/log - contains many system logs for error checking
Grub Boot Screen Options (press a at the Grub startup screen)
-Single - starts linux in single users mode with root access
-while in single user mode can type init 3 (3 being the run level you want)
-console=/dev/ttyS0 - means the output of the startup is passed to the serial port
Rsync Command options
can use the following syntax to to rsync directly to a network drive
rsync -av jpowell@192.168.254.108:/mnt/storage/20080717A /media/usb
***If you add a / to the trailing source location, it means to copy the data in the folder....without it copies the parent folder too
autossh command
autossh -M [port1] (-M says what port 1 to monitor on) -N (dont run a command) -R [port2]:localhost:22 (open up the port 2 on the IP machine to create a tunnel to your machine (localhost) on port 22) [user@ip](ssh location you want to connect to)
example:
autossh -M 20000 -N -R 11000:localhost:22 jpowell@ssh.cresis.ku.edu -p 62
person ssh in to this would use:
ssh -p 11000 localhost (this is assuming they are on ssh.cresis.ku.edu)
dd command options
dd -fi=input directory -do=file out
Managing users and permissions
useradd - used to add users
syntax:
useradd -c "normal user" -d /home/userid -g users\
-G webadm,helpdesk -s\ /bin/bash userid
***This command creates a new user called "userid," the last parameter in the command. A comment is entered that says "normal user." Userid's home directory will be "/home/userid." Userid's primary group will be users, but userid will also be placed in the "webadm" and "helpdesk" groups. Userid will use the "/bin/bash" shell as the normal console environment.
passwd [userid] - changes the users password
userdel -r userid - deletes a user ...the -r means to also delete the home directory
more /etc/passwd - allows you to view all the users and their associations - The first column contains the user name. The second column contains the user's password. The third column contains the user's numeric id. The fourth column contains the numeric id for the user's primary group. The fifth column contains the user's full name, or a comment. The sixth column contains the location of the user's home directory. Normally this directory lives in the /home directory and has the same name as the user id. The seventh column contains the user's default console shell.
groupadd mygroup - adds groups
ls -l - produces the following information relating to groups
-rw-r--r-- 1 userid mygroup 703 Jun 23 22:12 myfile
Ignoring the other columns for the moment, look at the third, fourth, and last columns. The third column contains the name of the owner of the file, userid. The fourth column contains the group associated with the file, mygroup. The last column is the file name. Each file can have only one owner and one group. It is possible to assign rights to Other, the users who don't fall into either category. Think of Other as the equivalent of the Windows group Everyone.
chown [owner] [file] - changes the owner of a file or directory
chmod [+-r+-w+-x] [file] - changes the permissions for a file
Network Mangement
ifconfig [ethernet port] - view current ethernet port configuration
ifup [eth port] - turn ethernet port on
ifdown [eth port]- turn ethernet port off
dhclient [ethernet port] - sets the ethernet port to dhcp and grabs IP
/sbin/service iptables stop - Linux firewall service stop
Crontab Management
crontab - allows you to work with items in the cron (task scheduler)
-l means list all cron jobs
Other often used commands
halt - to stop system
mount - to mount drives
umount [-f] (forces unmount) - to unmount drives
su - - root user with environment
ssh [-Y] (to port graphics)
nano - text editor
fsck - scans and defragments drive (perform at least once per month to not have it automatically kick in [that sucks])
rm -rf [directory]- removes directories with data inside
find - finds freggin anything
sleep [number of seconds] - very useful in scripts to make the system wait
man - manual it is your friend
less - displays a file page by page
-top - displays the load and memory usage of all applications and processors
-uptime - show system load and should not be over 20 (for Greenland field server)
-vmstat [-S M 5] (S M show in megabytes and 5 says update every 5 seconds) - shows memory usage.... hopefully will not use swap file because it will slow down the processing
-mpstat [-P ALL](for all processors or can put the number of the specific processor) - shows cpu usage
-df - displays mounted drives and locations
-du [-h](shows a human readable view) - displays disk usage
-SMclient - displays RAID status
-nodestatus - displays MDCE MatLab workers running
-/etc/init.d/mdce [status] - displays whether mdce is running
-/sbin/service [name] [start stop status restart] - used to access other service such as nfs, portmap ...etc
-cat /etc/fstab - lists mounts and apps that run at startup
-dmesg - kernel messages such as when you plug up a usb device
-/var/log - contains many system logs for error checking
Grub Boot Screen Options (press a at the Grub startup screen)
-Single - starts linux in single users mode with root access
-while in single user mode can type init 3 (3 being the run level you want)
-console=/dev/ttyS0 - means the output of the startup is passed to the serial port
Rsync Command options
can use the following syntax to to rsync directly to a network drive
rsync -av jpowell@192.168.254.108:/mnt/storage/20080717A /media/usb
***If you add a / to the trailing source location, it means to copy the data in the folder....without it copies the parent folder too
autossh command
autossh -M [port1] (-M says what port 1 to monitor on) -N (dont run a command) -R [port2]:localhost:22 (open up the port 2 on the IP machine to create a tunnel to your machine (localhost) on port 22) [user@ip](ssh location you want to connect to)
example:
autossh -M 20000 -N -R 11000:localhost:22 jpowell@ssh.cresis.ku.edu -p 62
person ssh in to this would use:
ssh -p 11000 localhost (this is assuming they are on ssh.cresis.ku.edu)
dd command options
dd -fi=input directory -do=file out
Managing users and permissions
useradd - used to add users
syntax:
useradd -c "normal user" -d /home/userid -g users\
-G webadm,helpdesk -s\ /bin/bash userid
***This command creates a new user called "userid," the last parameter in the command. A comment is entered that says "normal user." Userid's home directory will be "/home/userid." Userid's primary group will be users, but userid will also be placed in the "webadm" and "helpdesk" groups. Userid will use the "/bin/bash" shell as the normal console environment.
passwd [userid] - changes the users password
userdel -r userid - deletes a user ...the -r means to also delete the home directory
more /etc/passwd - allows you to view all the users and their associations - The first column contains the user name. The second column contains the user's password. The third column contains the user's numeric id. The fourth column contains the numeric id for the user's primary group. The fifth column contains the user's full name, or a comment. The sixth column contains the location of the user's home directory. Normally this directory lives in the /home directory and has the same name as the user id. The seventh column contains the user's default console shell.
groupadd mygroup - adds groups
ls -l - produces the following information relating to groups
-rw-r--r-- 1 userid mygroup 703 Jun 23 22:12 myfile
Ignoring the other columns for the moment, look at the third, fourth, and last columns. The third column contains the name of the owner of the file, userid. The fourth column contains the group associated with the file, mygroup. The last column is the file name. Each file can have only one owner and one group. It is possible to assign rights to Other, the users who don't fall into either category. Think of Other as the equivalent of the Windows group Everyone.
chown [owner] [file] - changes the owner of a file or directory
chmod [+-r+-w+-x] [file] - changes the permissions for a file
Network Mangement
ifconfig [ethernet port] - view current ethernet port configuration
ifup [eth port] - turn ethernet port on
ifdown [eth port]- turn ethernet port off
dhclient [ethernet port] - sets the ethernet port to dhcp and grabs IP
/sbin/service iptables stop - Linux firewall service stop
Crontab Management
crontab - allows you to work with items in the cron (task scheduler)
-l means list all cron jobs
Other often used commands
halt - to stop system
mount - to mount drives
umount [-f] (forces unmount) - to unmount drives
su - - root user with environment
ssh [-Y] (to port graphics)
nano - text editor
fsck - scans and defragments drive (perform at least once per month to not have it automatically kick in [that sucks])
rm -rf [directory]- removes directories with data inside
find - finds freggin anything
sleep [number of seconds] - very useful in scripts to make the system wait
man - manual it is your friend
less - displays a file page by page
Saturday, July 12, 2008
Wednesday, July 9, 2008
How to check what is running on your system
Ok if you have ever looked over the shoulder of a linux person goign to town you may have seen something like
so here is what is really going on in that command
The ps command tells you what processes are actually running. In the manual it actual says that it gives you a snapshop of what is running on the system.
says print all processes owned by a user named "x" this could be changed to specify a specific user
The "|" or pipe symbol says to this command and this other command together
"grep" is a filter. If you were to simply type "ps" you woudl get a screen full of processes running for your user. By adding the "|" along with "grep" you can filter those processes down to what you need. In this case we looked for "cron" jobs (scheduled tasks). That can of course be changed to anything else you may need to check on.
So to say it all together the command
Hope that helps!!
ps -aux | grep cron
so here is what is really going on in that command
ps
The ps command tells you what processes are actually running. In the manual it actual says that it gives you a snapshop of what is running on the system.
-aux
says print all processes owned by a user named "x" this could be changed to specify a specific user
|
The "|" or pipe symbol says to this command and this other command together
grep
"grep" is a filter. If you were to simply type "ps" you woudl get a screen full of processes running for your user. By adding the "|" along with "grep" you can filter those processes down to what you need. In this case we looked for "cron" jobs (scheduled tasks). That can of course be changed to anything else you may need to check on.
So to say it all together the command
ps -aux | grep cronis actually telling the computer to show all processes under any user that specifically deals with cron.
Hope that helps!!
Sunday, July 6, 2008
How to manually mount a USB Drive in Redhat
Inserting a USB storage device
- Plug in the device.
- Check the contents of the file /var/log/dmesg to see what the system named the device. (You can use the command dmesg as well.) It should appear as a SCSI device, so the name should be similar to /dev/sda or /dev/sdb.
- Use the command fdisk -l
, replacing with the device name from /var/log/dmesg to determine the partitions on the device. Most USB flash drives and other portable storage media types have only one partition, so the output of the fdisk command will most likely be something like /dev/sda1 or /dev/sdb1. - Create a directory (mkdir) to serve as the drive's mount point. It is recommended to use a name that is easy to remember like /mnt/usb.
- Mount the device with the mount command. If the device was detected as /dev/sda and the fdisk command showed /dev/sda1 as your partition, the command would be:
The mount command should automatically detect the partition type and mount the drive. It can be problematic to add the mount command to the file/etc/fstab, as the device may be detected with a different name if system devices are changed or if more than one USB device is plugged in at the same time. For this reason, it is recommended to mount the device manually with the full mount command listed above instead of relying on an entry in /etc/fstab.mount /dev/sda1 /mnt/usb
Thursday, July 3, 2008
Geeky way to send a terminal message to a user
How to send someone a message over linux or unix
Step 1: Type who to find out what port they are on (the pts with the number is the port)
Step 2: cat >/dev/ptx/y
Step 3: type message
Step 4: press: "Ctrl + d" to end
***could also use the "write username [then optionally pts/terminal#]
Step 1: Type who to find out what port they are on (the pts with the number is the port)
Step 2: cat >/dev/ptx/y
Step 3: type message
Step 4: press: "Ctrl + d" to end
***could also use the "write username [then optionally pts/terminal#]
Subscribe to:
Posts (Atom)