Monday, December 22, 2008

Bash Scripting with Spaces

From time to time I have I run into a space issues when trying to write bash scripts.  This website was the first solution that made sense.
  1. cat /var/lib/dpkg/info/skype.list
  2. for i in `cat /var/lib/dpkg/info/skype.list`; do echo rm $i; done
Modified command:
  1. IFS=$(echo -en "\n\b"); for i in `more /var/lib/dpkg/info/skype.list`; do echo rm \"$i\"; done
Note: the above command didn't work like I wanted it to and then I figured out why I couldn't delete skype from aptitude, it was only installed using gdeb or dpkg -i.

BASH Shell: For Loop File Names With Spaces
BASH Shell: For Loop File Names With Spaces

by Vivek Gite [Last updated: December 9, 2008]

BASH for loop works nicely under UNIX / Linux / Windows and OS X while working on set of files. However, if you try to process a for loop on file name with spaces in them you are going to have some problem. for loop uses $IFS variable to determine what the field separators are. By default $IFS is set to the space character. There are multiple solutions to this problem.
Set $IFS variable

Try it as follows:

#!/bin/bash
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
for f in *
do
echo "$f"
done
IFS=$SAVEIFS

OR

#!/bin/bash
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
# set me
FILES=/data/*
for f in $FILES
do
echo "$f"
done
# restore $IFS
IFS=$SAVEIFS

Friday, December 19, 2008

Exchange 2007 Powershell example

get-distributiongroupmember "administrative staff" | select-object displayname, primaryemailaddress, recipienttype | export-csv -path test.csv

This almost accomplishes what we want but we would like to limit the output to only where recipienttype="Usermailbox".  Whenever we try to use "select-string -pattern" (powershell's grep) we either only get the recipienttype module array or we get no output because recipienttype is not in the output.

Technorati Tags: , ,

Thursday, December 18, 2008

Powershell Example

What Can I Do With Windows PowerShell?

Scenario: Needed to test disaster recovery procedures at the hospital.  All employees were told to go to a website and type in a url.

Problem: Workstations located in the doctor-patient procedure rooms don't have that ability because of patients have been known to 'surf' the web while waiting to be helped.

Solution: Needed to copy a new http:// shortcut to every workstation ASAP

Tools used: Active Directory Users and Computers and Powershell

1. Export a list of all Procedure Workstations from Active Directory
2. I was going to use psexec tool but then remembered powershell was capable of running a foreach loop
3. Started with: cat 'secured workstations.txt' | foreach-object -process {echo copy-item 'shortcut.lnk' \\$_\c$\documents and settings\userprofile\start menu}
4. After failure I started looking at backslash as an escape character and putting parts of the phrase in quotes
5. Tested one computer with: echo 'computername' | foreach-object -process {copy-item 'shortcut.lnk' \\$_"\c$\documents and settings\userprofile\start menu\"}
6. Ran final command: cat 'secured workstations.txt' | foreach-object -process {copy-item 'shortcut.lnk' \\$_"\c$\documents and settings\userprofile\start menu\"}

Tuesday, November 4, 2008

Ubuntu Intrepid CD Burning

I had a problem with burning iso files through gnome's nautilus until I ran 'sudo wodim --devices'  Otherwise I used the command 'cdrecord *.iso' from the command line.

Wednesday, October 29, 2008

Bomgar Remote Assistance Tool

I have been tasked to find a remote assistance tool that will allow us to connect to people outside of our network and outside of our control.

Internally we have been using Remote Assistance and Remote Desktop.  This works really well internally but when we start working with our doctors that are currently at another hospital or calling from home we have relied on talking the user through the gambit of typing in ipconfig and other commands to diagnose the problem.  It would be so much easier to just see the screen and to interact with the desktop.

Right now I am very impressed with Bomgar.  Instead of charging for a service forever, we can purchase a hardware solution that we control.  Now we can put that box in our DMZ and use it to deal with outside users and on the rare occation we could also connect with our internal users.  It also looks like it might be able to keep track of some helpdesk tickets.  Whereas it isn't very full featured, it has enough of the basics that I may have looked into using this one solution for issue tracking.



To get bomgar.com to install on Ubuntu Intrepid 64-bit follow these steps.



1. Download the *.desktop file from Bomgar

2. Change permissions on the file through Nautilus so that you can execute the file

3. If you get the error "error while loading shared libraries:
libpng.so.3" then you need to double check /usr/lib/libpng* AND
/usr/lib32/libpng* for a libpng.so.3. This is a 32-bit program so
64-bit users will have to look at the /usr/lib32 directory.

a. if you don't have the file you can create a symbolic link

b. sudo ln -s libpng.so.0.27 /usr/lib32/libpng.so.3

4. The second error I got was "That DESKTOP_INSTALLER" variable is not set"

a. Bomgar's only use for the variable seems to be to rm -f "$DESKTOP_INSTALLER" to remove the installer file

b. export DESKTOP_INSTALLER=/tmp/bomgar-rep.1410 #or a dummy file to sacrifice if you want to keep the installer.

Thursday, October 2, 2008

TCP/IP Design Vulnerabiltiy that Effects Almost All OS

Sockstress vulnerabilities in TCP/IP will collapse internets! [minn.tc]

It looks like a vulnerability similar to the DNS crisis.  Someone seems to have found a way to exploit a SYN-cookie type packet and cause the host server to buffer overload its outbound queue stack and get the machine/ service to reboot with only 10-15 packets a minute.  Now script kiddies don't need to have a massive botnet to take down Yahoo/ Google, only the knowledge of this exploit.

Saturday, September 13, 2008

Frets on Fire Note

Frets on Fire is a fantastic game that I am now addicted.  I find it extremely relaxing and it can take my mind away from work for some real relaxation.  The game is for Linux, Mac, and PC.  It is written in Python.  The biggest drawback is that it only comes with a few songs.

I grew up learning how to play the piano.  I used to love learning something new and kept trying to get better and better.  That was until I met a natural piano player that couldn't read a note to save his life but played much better than myself.  The whole time I learned how to play the piano, I never learned how to play with the piano.

Make no mistake, Frets on Fire and games like Guitar Hero and Rock Band won't teach you how to play an instrument.  Luckily I don't want to learn how to play the guitar, I want to pretend that I know how to play the guitar.  For me that is the big draw of these types of games.  I can improve my fictitious skill and have fun listening to songs that I didn't even know were favorites.

I wish I could work with Jonathan Coulton to fret "Code Monkey" and have him resell it for a few bucks.  Finally I'm at a place the Record Industry wants me to be, I'd like to purchase a song and learn how to fake-fret it for a video game.  It really does seem to be the next logical step toward loving a song.

Tip:


Now for the real reason I felt compelled to write...

I had the hardest time getting Frets on Fire to recognize a new folder full of songs.  Apparently, Frets on Fire will not go any further that the first layer when adding songs to its playlist.  However, you can trick Frets on Fire into recognizing a deep folder structure if you put a song folder inside of every folder depth for the first time Frets on Fire recognizes the folder.  After Frets on Fire recognizes your folder, you can then redistribute your song folders however you would like.  For example, instead of creating 2 new folders under songs and then placing the song folder, you must create it like data/songs/newfolder/newsongfolder/song.ogg

Friday, September 5, 2008

SQL Server Performance Counters

Page 2 - How to Perform a SQL Server Performance Audit
How to Perform a SQL Server Performance Audit - Using Performance Monitor to Identify SQL Server Hardware Bottlenecks

Performance Audit Checklist

Memory: Pages/sec
Memory: Available Bytes
Physical Disk: % Disk time
Physical Disk: Avg. Disk Queue Length
Processor: % Processor Time
System: Processor Queue Length
SQL Server Buffer: Buffer Cache Hit Ratio
SQL Server General: User Connections


Once you have added each performance indicator as listed above, then find out your Average, Minimun, and Maximum for each value.

Remote Assistance Shortcuts

If you want to call Remote Assistance from another program like a helpdesk web application, you have to do a couple tricks. I found out about these links by using SysInternals ProcMon and performing the tasks I wanted to copy. I then had to look through the information for the needle in the haystack.

Here is the generic starting of Remote Assistance on Windows XP (you will need to fill in the computername at a web form):
C:\windows\PCHealth\HelpCtr\Binaries\HelpCtr.exe -FromHCP -url "hcp://CN=Microsoft%20Corporation,L=Redmond,S=Washington,C=US/Remote%20Assistance/Escalation/Unsolicited/unsolicitedrcui.htm"
Here is the SMS 2003 call that sends a computer name variable to the command line (This doesn't work unless you have SMS 2003 installed or copy the SMSUnsolicitedRCUI.htm to the correct PCHealth folder)
C:\WINDOWS\PCHEALTH\HELPCTR\Binaries\helpctr.exe -FromStartHelp -url hcp://CN=Microsoft%20Corporation,L=Redmond,S=Washington,C=US/Remote%20Assistance/Escalation/unsolicited/SMSUnsolicitedRCUI.htm -ExtraArgument "NOVICECOMPUTER=_ComputerName_&NOVICEUSERID="""

Where _ComputerName_ = NetBios name of the remote computer

This is the location of the original hcp files:
C:\WINDOWS\PCHealth\HelpCtr\Vendors\CN=Microsoft Corporation,L=Redmond,S=Washington,C=US\Remote Assistance\Escalation\Unsolicited\


Let me know if you need a copy of the htm files. I'm pretty sure I would break Microsoft's copyright by posting the html file on this webpage.

Thursday, September 4, 2008

Upgrading Dell BIOS through Ubuntu

Repository/firmware - DellLinuxWiki
For Ubuntu systems, be sure the Universe section is enabled in /etc/apt/sources.list, then do:

# set up repos
wget -q -O - http://linux.dell.com/repo/firmware/bootstrap.cgi | bash
aptitude install firmware-addon-dell
aptitude install $(bootstrap_firmware -a)
update_firmware


Following these instructions didn't work for me. It looks like the bootstrap.cgi script is removing a temporary apt repository file from /etc/apt/sources.list.d/dell-software-temp-bootstrap.list

At any rate if you install these 2 debs the instructions should work.


i386

amd64 (both Intel and AMD 64 bit processors)

        <a href="http://linux.dell.com/repo/dists/hardy/dell-software/binary-amd64/dell-firmware-repository_1-2_all.deb">dell-firmware-repository_1-2_all.deb</a><br />        <a href="http://linux.dell.com/repo/dists/hardy/dell-software/binary-amd64/dell-software-repository_1-2_all.deb">dell-software-repository_1-2_all.deb</a>

Analytics and Metrics for Help Desk Personnel

ITIL Alternatives
The British Educational Communications and Technology Agency (BECTA) has developed the Framework for ICT Technical Support (FITS) and is based on ITIL, but it is slimmed down for UK primary and secondary schools (which often have very small IT departments).

Becta Schools
Internal metrics

Internal metrics are to manage the processes and should indicate any
issues internal to ICT that may have an impact on service delivery.

Example internal metrics:

* Availability of individual components such as routers and servers - used to calculate service availability
* Breakdown of time taken by each participant in the life cycle of
an incident
* Breakdown of time taken in each step of the life cycle of an incident
* Percentage of incidents resolved by the service desk in a given period
* Number of changes approved in a given period Number of changes rejected in a given period
* Length of meetings when considering change and trend over time
* Number of changes resubmitted following failure during testing

Becta Schools
External metrics

External metrics are to measure service delivery and should indicate any issues that may be causing a detrimental impact on users of the ICT services.

Example external metrics:

* Length of time elapsed between identifying an incident and resolving it
* Number of calls logged in a given period
* Number of calls logged in a given period sorted by priority
* Number of calls logged in a given period sorted by category
* Number of changes implemented in a given period
* Number of successful changes in a given period
* Number of failed changes in a given period
* Availability of ICT services

Now to apply these metrics to our chosen helpdesk application, BMC's SDE product.

Wednesday, September 3, 2008

Powershell Script To update links

Single line to deploy new shortcut to all workstations:
cat workstations.txt | ForEach-Object -process {copy-item 'shortcut.lnk' -destination "\\$_\c$\documents and settings\all users\start menu"}

If I was to work on this again I would want to add a line that would tell me what workstation was being worked on like the untested code below.  If the computer is turned off or not able to be connected then the error just shows up as "Copy-Item : The network path was not found" or "Copy-Item : Could not find a part of the path" without any indication of what workstation was failing.
cat workstations.txt | ForEach-Object -process {

write-host "Trying to connect to $_"; copy-item 'shortcut.lnk' -destination "\\$_\c$\documents and settings\all users\start menu"}

Wednesday, August 6, 2008

Success With LVM

After the weekend I came back to a bad hard drive (See error log /var/log/messages). I ran the Dell hard disk tool and got a number 7 code.

I then found a second hard drive and hooked it up to my machine to try to copy as much information over as I could. I booted up with a Live Ubuntu install disk.

I have 3 primary partitions (Dell Utility, /boot, and LVM-8e) with /dev/mapper/main-root /dev/mapper/main-home and /dev/mapper/main-swap as critical LVM partitions.

After booting the live cd, I ran these commands to add LVM support for that session.

  1. sudo aptitude update
  2. sudo aptitude install lvm2
  3. sudo modprobe dm_mod
  4. sudo modprobe dm_mirror
  5. sudo gparted
  6. Copy and paste the 1st (Dell Utiltiy) & 2nd (/boot 100MB) partitions within gparted
  7. sudo cfdisk /dev/sdb
  8. Create a 3rd partition with type 8e - Linux LVM
Now we need to do the LVM magic as followed by the LVM recipes page.
  1. sudo pvcreate /dev/sdb3
  2. sudo vgextend main /dev/sdb3
  3. sudo pvmove /dev/sda3 /dev/sdb3 (Long process)
  4. sudo vgreduce main /dev/sda3
Next we need to copy the MBR (Master Boot Record)
  1. sudo vgchange -a y main (activates the partitions
  2. sudo mount /dev/mapper/main-root /mnt
  3. sudo mount /dev/mapper/main-root /mnt/home
  4. sudo mount /dev/sdb2 /mnt/boot
  5. sudo chroot /mnt
  6. sudo mount -t proc proc /proc
  7. sudo grub-install /dev/sdb
That grub-install command may not have worked or I tried it this way instead.
  1. Exit chroot = exit
  2. sudo grub-install /dev/sdb --root-directory=/mnt/boot
When I booted up, I had a grub error probably because I removed the original drive and had to go to the grub command line and run
  1. grub> root ( //Use grub's tab completion to show all options
  2. grub> root (hda,1) //Basically /dev/sda1
  3. grub> kernel / //Use grub's tab completion to show all current kernels
  4. grub> kernel /vmlinuz-2.6.24-20-generic root=/dev/mapper/main-root
  5. grub> initrd / //Again use grub's tab completion to show all initrd's
  6. grub> initrd /initrd.img-2.6.24-20-generic
  7. grub> boot
  8. Linux should boot correctly and then you need to run a 'sudo update-grub' to correct any grub issues.
This is what I didn't do but would have been much easier
  1. dd if=/dev/sda of=/dev/sdb bs=512 count=1


Aug 4 21:08:28 computername kernel: [378293.902550] res 51/01:60:4c:da:28/00:00:00:00:00/e0 Emask 0x1 (device error)
Aug 4 21:08:28 computername kernel: [378293.925352] ata1.00: configured for UDMA/133
Aug 4 21:08:28 computername kernel: [378293.925358] ata1: EH complete
Aug 4 21:08:28 computername kernel: [378322.629661] res 51/01:60:4c:da:28/00:00:00:00:00/e0 Emask 0x1 (device error)
Aug 4 21:08:28 computername kernel: [378322.653637] ata1.00: configured for UDMA/133
Aug 4 21:08:28 computername kernel: [378322.653643] ata1: EH complete
Aug 4 21:08:28 computername kernel: [378349.828468] res 51/40:60:4c:da:28/00:00:00:00:00/e0 Emask 0x9 (media error)
Aug 4 21:08:28 computername kernel: [378349.850959] ata1.00: configured for UDMA/133
Aug 4 21:08:28 computername kernel: [378349.850964] ata1: EH complete
Aug 4 21:08:28 computername kernel: [378376.559690] res 51/40:60:4c:da:28/00:00:00:00:00/e0 Emask 0x9 (media error)
Aug 4 21:08:28 computername kernel: [378376.584448] ata1.00: configured for UDMA/133
Aug 4 21:08:28 computername kernel: [378376.584454] ata1: EH complete
Aug 4 21:08:28 computername kernel: [378401.822621] res 51/01:60:4c:da:28/00:00:00:00:00/e0 Emask 0x1 (device error)
Aug 4 21:08:28 computername kernel: [378401.847117] ata1.00: configured for UDMA/133
Aug 4 21:08:28 computername kernel: [378401.847121] ata1: EH complete
Aug 4 21:08:28 computername kernel: [378431.825421] res 40/00:60:4c:da:28/00:00:00:00:00/e0 Emask 0x4 (timeout)
Aug 4 21:08:28 computername kernel: [378436.862026] ata1: port is slow to respond, please be patient (Status 0xd0)
Aug 4 21:08:28 computername kernel: [378441.842681] ata1: device not ready (errno=-16), forcing hardreset
Aug 4 21:08:28 computername kernel: [378441.842683] ata1: soft resetting link
Aug 4 21:08:28 computername kernel: [378444.264855] ata1: failed to recover some devices, retrying in 5 secs
Aug 4 21:08:28 computername kernel: [378449.265526] ata1: soft resetting link
Aug 4 21:08:28 computername kernel: [378454.457898] ata1: port is slow to respond, please be patient (Status 0xd0)
Aug 4 21:08:28 computername kernel: [378459.270523] ata1: soft resetting link
Aug 4 21:08:28 computername kernel: [378464.462945] ata1: port is slow to respond, please be patient (Status 0xd0)
Aug 4 21:08:28 computername kernel: [378469.275601] ata1: soft resetting link
Aug 4 21:08:28 computername kernel: [378474.468006] ata1: port is slow to respond, please be patient (Status 0xd0)
Aug 4 21:08:28 computername kernel: [378486.189105] ata1.00: configured for UDMA/133
Aug 4 21:08:28 computername kernel: [378486.189118] sd 0:0:0:0: [sda] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE,SUGGEST_OK
Aug 4 21:08:28 computername kernel: [378486.189120] sd 0:0:0:0: [sda] Sense Key : Aborted Command [current] [descriptor]
Aug 4 21:08:28 computername kernel: [378486.189123] Descriptor sense data with sense descriptors (in hex):
Aug 4 21:08:28 computername kernel: [378486.189124] 72 0b 00 00 00 00 00 0c 00 0a 80 00 00 00 00 00
Aug 4 21:08:28 computername kernel: [378486.189129] 00 28 da 4c
Aug 4 21:08:28 computername kernel: [378486.189131] sd 0:0:0:0: [sda] Add. Sense: No additional sense information
Aug 4 21:08:28 computername kernel: [378486.189134] end_request: I/O error, dev sda, sector 2677324
Aug 4 21:08:28 computername kernel: [378486.189144] ata1: EH complete
Aug 4 21:08:28 computername kernel: [378509.519389] res 51/40:18:cc:da:28/00:00:00:00:00/e0 Emask 0x9 (media error)
Aug 4 21:08:28 computername kernel: [378509.540917] ata1.00: configured for UDMA/133
Aug 4 21:08:28 computername kernel: [378509.540921] ata1: EH complete
Aug 4 21:08:28 computername kernel: [378510.052261] sd 0:0:0:0: [sda] 156250000 512-byte hardware sectors (80000 MB)
Aug 4 21:08:28 computername kernel: [378510.058538] sd 0:0:0:0: [sda] Write Protect is off
Aug 4 21:08:28 computername kernel: [378510.141910] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Aug 4 21:08:28 computername kernel: [378510.148816] sd 0:0:0:0: [sda] 156250000 512-byte hardware sectors (80000 MB)
Aug 4 21:08:28 computername kernel: [378510.151418] sd 0:0:0:0: [sda] Write Protect is off
Aug 4 21:08:28 computername kernel: [378510.160698] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Aug 4 21:24:17 computername kernel: [379461.168295] res 40/00:18:cc:da:28/00:00:00:00:00/e0 Emask 0x4 (timeout)
Aug 4 21:24:17 computername kernel: [379466.205053] ata1: port is slow to respond, please be patient (Status 0xd0)
Aug 4 21:24:17 computername kernel: [379471.185623] ata1: device not ready (errno=-16), forcing hardreset
Aug 4 21:24:17 computername kernel: [379471.185625] ata1: soft resetting link
Aug 4 21:24:17 computername kernel: [379471.366433] ata1.00: configured for UDMA/133
Aug 4 21:24:17 computername kernel: [379471.366440] ata1: EH complete
Aug 4 21:24:17 computername kernel: [379471.377770] sd 0:0:0:0: [sda] 156250000 512-byte hardware sectors (80000 MB)
Aug 4 21:24:17 computername kernel: [379471.384741] sd 0:0:0:0: [sda] Write Protect is off
Aug 4 21:24:17 computername kernel: [379471.386102] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Aug 4 21:39:07 computername kernel: [380113.535064] res 40/00:18:cc:da:28/00:00:00:00:00/e0 Emask 0x4 (timeout)
Aug 4 21:39:07 computername kernel: [380118.571651] ata1: port is slow to respond, please be patient (Status 0xd0)
Aug 4 21:39:07 computername kernel: [380123.552248] ata1: device not ready (errno=-16), forcing hardreset
Aug 4 21:39:07 computername kernel: [380123.552250] ata1: soft resetting link
Aug 4 21:39:07 computername kernel: [380153.739475] ata1.00: qc timeout (cmd 0xec)
Aug 4 21:39:07 computername kernel: [380153.739480] ata1.00: failed to IDENTIFY (I/O error, err_mask=0x4)
Aug 4 21:39:07 computername kernel: [380153.739484] ata1: failed to recover some devices, retrying in 5 secs
Aug 4 21:39:07 computername kernel: [380163.776678] ata1: port is slow to respond, please be patient (Status 0xd0)
Aug 4 21:39:07 computername kernel: [380166.966361] ata1: soft resetting link
Aug 4 21:39:07 computername kernel: [380167.147111] ata1.00: configured for UDMA/133
Aug 4 21:39:07 computername kernel: [380167.147122] ata1: EH complete
Aug 4 21:39:07 computername kernel: [380197.125557] res 40/00:18:cc:da:28/00:00:00:00:00/e0 Emask 0x4 (timeout)
Aug 4 21:39:07 computername kernel: [380202.162040] ata1: port is slow to respond, please be patient (Status 0xd0)
Aug 4 21:39:07 computername kernel: [380207.142777] ata1: device not ready (errno=-16), forcing hardreset
Aug 4 21:39:07 computername kernel: [380207.142779] ata1: soft resetting link
Aug 4 21:39:07 computername kernel: [380207.323522] ata1.00: configured for UDMA/133
Aug 4 21:39:07 computername kernel: [380207.323527] ata1: EH complete
Aug 4 21:39:07 computername kernel: [380237.301956] res 40/00:18:cc:da:28/00:00:00:00:00/e0 Emask 0x4 (timeout)
Aug 4 21:39:07 computername kernel: [380242.338347] ata1: port is slow to respond, please be patient (Status 0xd0)
Aug 4 21:39:07 computername kernel: [380247.318929] ata1: device not ready (errno=-16), forcing hardreset
Aug 4 21:39:07 computername kernel: [380247.318931] ata1: soft resetting link
Aug 4 21:39:07 computername kernel: [380249.237862] ata1: failed to recover some devices, retrying in 5 secs
Aug 4 21:39:07 computername kernel: [380254.238399] ata1: soft resetting link
Aug 4 21:39:07 computername kernel: [380259.430820] ata1: port is slow to respond, please be patient (Status 0xd0)
Aug 4 21:39:07 computername kernel: [380261.974006] ata1.00: configured for UDMA/133
Aug 4 21:39:07 computername kernel: [380261.974014] ata1: EH complete
Aug 4 21:39:07 computername kernel: [380291.952436] ata1.00: limiting speed to UDMA/100:PIO4
Aug 4 21:39:07 computername kernel: [380291.952443] res 40/00:18:cc:da:28/00:00:00:00:00/e0 Emask 0x4 (timeout)
Aug 4 21:39:07 computername kernel: [380296.988957] ata1: port is slow to respond, please be patient (Status 0xd0)
Aug 4 21:39:07 computername kernel: [380301.969527] ata1: device not ready (errno=-16), forcing hardreset
Aug 4 21:39:07 computername kernel: [380301.969529] ata1: soft resetting link
Aug 4 21:39:07 computername kernel: [380302.150353] ata1.00: configured for UDMA/100
Aug 4 21:39:07 computername kernel: [380302.150358] ata1: EH complete
Aug 4 21:39:07 computername kernel: [380332.128774] res 40/00:18:cc:da:28/00:00:00:00:00/e0 Emask 0x4 (timeout)
Aug 4 21:39:07 computername kernel: [380337.165291] ata1: port is slow to respond, please be patient (Status 0xd0)
Aug 4 21:39:07 computername kernel: [380342.145861] ata1: device not ready (errno=-16), forcing hardreset
Aug 4 21:39:07 computername kernel: [380342.145863] ata1: soft resetting link
Aug 4 21:39:07 computername kernel: [380346.430934] ata1: failed to recover some devices, retrying in 5 secs
Aug 4 21:39:07 computername kernel: [380351.431469] ata1: soft resetting link
Aug 4 21:39:07 computername kernel: [380355.809378] ata1.00: configured for UDMA/100
Aug 4 21:39:07 computername kernel: [380355.809386] ata1: EH complete
Aug 4 21:39:07 computername kernel: [380358.378372] sd 0:0:0:0: [sda] 156250000 512-byte hardware sectors (80000 MB)
Aug 4 21:39:07 computername kernel: [380358.378390] sd 0:0:0:0: [sda] Write Protect is off
Aug 4 21:39:07 computername kernel: [380358.378403] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Aug 4 21:39:07 computername kernel: [380358.378421] sd 0:0:0:0: [sda] 156250000 512-byte hardware sectors (80000 MB)
Aug 4 21:39:07 computername kernel: [380358.388355] sd 0:0:0:0: [sda] Write Protect is off
Aug 4 21:39:07 computername kernel: [380358.388547] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA

Monday, July 28, 2008

Gwibber is my new Microblogging Client for Ubuntu

Gwibber in Launchpad

I'm really excited about a new Twitter/ Identi.ca client for my Ubuntu workstation.

Take a look at this screenshot:


To install gwibber on Ubuntu.

1. Install bzr python-cairo-dev and python-simplejson

sudo aptitude install bzr python-cairo-dev python-simplejson



2. Go to a workspace folder.  This command will download the sourcecode from launchpad.net in a folder called gwibber

bzr branch lp:gwibber



3. Follow the install instructions

sudo python setup.py install

Thursday, July 10, 2008

Microsoft's User Migration 3.1

Here is how I implimented Microsoft's User Migration.  I think it works pretty well and it wasn't obvious from the documents how this would work.
REM Here is how to create the custom configuration XML files used in the real script.

REM "%programfiles%\USMT301\scanstate" \\servername\user_migration\%computername% /o /targetxp /ue:adminsitrator /i:\\servername\user_migration\config.xml /l:\\servername\user_migration\%computername%_saved_log.txt /v:1

REM Make sure to Install .Net 2.0

REM Install User Migration 3.1 tool (same version on before and after machine)

REM "%windir%\system32\msiexec.exe" /i "\\servername\user_migration\User Migration\InstallUSMT301_x86.msi"

REM This will create and save all users profiles to a folder named after the computername.

REM Before wiping computer, make sure you have some data.  This tool will create empty directory structures even on failure.

"%programfiles%\USMT301\scanstate" \\servername\user_migration\%computername% /i:miguser.xml /i:migapp.xml /i:migsys.xml /targetxp /v:13 /l:\\servername\user_migration\%computername%_saved_log.txt /all

pause

Then after 5-10 minutes I go to the next machine or reimage the current machine.
@echo on

REM Make sure that you have User Migration 3.1 installed on new computer

rem "%windir%\system32\msiexec.exe" /i "\\servername\user_migration\User Migration\InstallUSMT301_x86.msi"

REM This will ask for input and put it into the %computer% variable

SET /P computer=Enter the computername of the old computer you want to load:

"%programfiles%\USMT301\loadstate.exe" \\servername\user_migration\%computer% /i:miguser.xml /i:migapp.xml /i:migsys.xml /v:13 /l:\\servername\user_migration\%computer%_to_%computername%_restore_log.txt /all /c

pause

This will create folders with profile data and log files with both the save and loading process.  If you don't see a -/|\ (Rotating asterisk) you won't have anything successful.

Thursday, July 3, 2008

Flash 10 on 64-bit Ubuntu 8.04

Download http://download.macromedia.com/pub/labs/flashplayer10/flashplayer10_install_linux_070208.tar.gz and untar it.

I copied it to ~/.mozilla/plugins (after creating directory)

nspluginwrapper -v -a -i

Restart Firefox 3.

Wednesday, June 25, 2008

Remotely Recursively list files on the network

Bash single line:
for i in `cat workstations.txt`; \
do echo "========="; \
echo; \
echo $i; \
smbclient -p 445 -k //$i/c$ -D 'Documents and Settings/All Users/start menu' -c 'recurse;ls';\
done > Output\ Report.txt


This gives me the flexibility to see what desktops have whatever file I wanted to look up.

Bill Gates Upset about Windows Filesystem and Registry

Full text: An epic Bill Gates e-mail rant
Someone decided to trash the one part of Windows that was usable? The file system is no longer usable. The registry is not usable. This program listing was one sane place but now it is all crapped up.

This is a great quote from Bill Gates about how hard it is to keep implementations of good ideas both usable and organized.

I can see how the Windows Registry started as a great idea. On Linux the /etc folder is the system configuration and could potentially be improved by placing all data into a database. Gnome is using something similar to Windows Registry called Gconf. Some people dislike Gconf because it is reminisent of Windows Registry but Gconf is a grand idea. The trick will be if open source can do a better job keeping the cruft out of Gconf and /etc.

Pidgin and Gtalk behind a firewall

Google didn't include instructions for how to set up Pidgin when you are behind an ISA 2006 firewall.

I needed to change the normal port 5222 to port 443 to get through the firewall and then I had to enable the old SSL protocol. I don't understand why the SSL/TLS failed. Maybe it had something to do with the Debian SSL certificate problem.



How do I configure Pidgin for Google Talk?

Friday, May 23, 2008

Neat BASH Trick

http://www.lockergnome.com/linux/2003/07/11/many-ways-to-see-numeric-permissions/

<blockquote>

“The above command will output the octal permissions followed by
the filename:

600 testfile

 

“Or use: stat -c "%a %n" *

</blockquote>

Monday, May 19, 2008

Google Health: Game Changing


Live: Google Health Launching At Factory Tour of Search

It looks like Google Health will be a game changer in the healthcare space. I've been working in healthcare IT since 2000. Most of our industry time is spent integrating systems using clunky protocols like HL7. HL7 works but this "standard" still costs approximately $10,000 for each connection. And one companies "HL7 compliant" is another companies text import/ export.

If Google can tie all our medical record data into one location and allow for independent companies to work with this data for importing and exporting medical records, we have a game change.

Just picture this, clinic XYZ wants to move to the 21st century but can't spend $1,000,000 to get a decent system. They still use a mixture of electronic applications but can't spend the money tieing all those systems together. So Google comes along and offers an API and cost structure that allows for off-site storage of medical information. Nothing fancy, no billing or insurance claims just medical records. The small clinic can hire someone for $10,000 or less to create 1 connection to Google's API.

Accessing the information will be free for both the healthcare entity(s) and for the individual whose information the record is concerning. When a patient wants to go to small clinic2, then they just give permission to the new clinic to read their health record and change the relationship with the original clinic so that they can only read data that clinic has contributed.

Presto! Now we have 2 clinics that can offer some of the same services the big hospitals can without spending millions to do it.

Monday, April 28, 2008

The Sitcom - Social Lubricant

The Sitcom - The Social Lubricant needed in a time of our society changing from the Industrial Age to the Information Age.

I really like that idea. It gives me hope that the Internet will change the way that we interact with our entertainment.AIM Sitcom 8 -- by Aaron Webb

Gin, Television, and Social Surplus - Here Comes Everybody


If I had to pick the critical technology for the 20th century, the bit of social lubricant without which the wheels would've come off the whole enterprise, I'd say it was the sitcom. Starting with the Second World War a whole series of things happened--rising GDP per capita, rising educational attainment, rising life expectancy and, critically, a rising number of people who were working five-day work weeks. For the first time, society forced onto an enormous number of its citizens the requirement to manage something they had never had to manage before--free time.

And what did we do with that free time? Well, mostly we spent it watching TV.

We did that for decades. We watched I Love Lucy. We watched Gilligan's Island. We watch Malcolm in the Middle. We watch Desperate Housewives. Desperate Housewives essentially functioned as a kind of cognitive heat sink, dissipating thinking that might otherwise have built up and caused society to overheat.

And it's only now, as we're waking up from that collective bender, that we're starting to see the cognitive surplus as an asset rather than as a crisis. We're seeing things being designed to take advantage of that surplus, to deploy it in ways more engaging than just having a TV in everybody's basement.

Monday, April 21, 2008

Twitter is Something New

I'm not the first one to discover this but it took me a few attempts before really understanding why Twitter.com is a game changer.

Twitter is known as a micro-blog tool, which isn't interesting in the least.  You could always limit yourself to 140 characters without a service.  What Twitter is not, is a way to update your life-status (i.e. I'm getting lunch ready).

For me, Twitter is a chatting room tool to converse with only people you are interested in.  In many ways, Twitter combines the usefulness of IRC and IM with Facebook's social web.  When you let Twitter pull your addressbook for a list of current contacts already using Twitter you may or may not find close friends showing up.  For me, I was pleasently suprised to find a bunch of people who I've corresponded only once or just happened to be subscribed to the same email list-serv.  These were all people that I have something in common, however insignificant.

Twitter allows people to follow or not follow people with very little barriers.  If someone you follow just irritates you, you can remove the offending person without affecting anyone else.

Facebook is set to launch an Instant Messaging service.  Unfortunately, they haven't realized that Twitter beat them to it.  I can't imagine Facebook having a better system.  Facebook would be better off just buying Twitter for whatever obscene price Twitter is willing to make a deal.   Twitter also needs to somehow be combined with Quoteably.com -- either by Facebook buying both companies and merging the teams or by Twitter offering to buy Quoteably.com so that they get the same talent on their team.

Thursday, March 20, 2008

Asterisk Hangup

I bought the 'Asterisk: The Future of Telephony' book to see about picking up some skills in a very neat Linux PBX system.  I've worked as the Project Liaison for a small company in Florida that purchased a $110,000 system that included lots a phones and 2 communicating PBX systems for 2 sites.  What I learned from that experience was that phone systems were nothing more than proprietary computer systems that offered very little innovation and lots of uptime.

Not to mention there seems to be a big difference in how much phone technology can cost.  It must all stem from a lack of competition and businesses willingness to spend tons of money on something they don't understand very well.

Now Asterisk is matching and surpassing the telephony technologies in an open source software and hardware model.  The software model allows for businesses to maximize costs of consultants in a large ecosystem.

My current healthcare provider has purchased a big VOIP PBX system for our 600 devices over 5 seperated branches.  We are just using VOIP at our distant branches.  Our voice mail system isn't anything to write home about and the Outlook module that allows for mail integration sucks and is out of date.

Anyway, I wanted to write down my biggest stumbling block trying to get Asterisk to start in a simple setup with an Ekiga softphone connected over SIP.  Apparently, you need to have these files in the /etc/asterisk/ directory.

  • extensions.conf -- the dialplan file

  • sip.con -- the sip configuration

  • modules.conf  -- to tell asterisk to load the dialplan and sip modules automatically

    • [modules]
      autoload=yes



Goodbye Xen, hello KVM

I've been pulling my hair out trying to get Xen to work with Ubuntu/Gutsy so that I could use Linux as my main Operating System and Windows could be run as a virtual machine.  I have been able to get that to work with lots of effort and recently, I haven't been able to go back to Xen because I really want to maintain my XGL wiggly windows.  So much so that I switched to VMware for a few months.

Now I am a happy camper using Linux's new kvm module.  What I never understood when reading about this module that is part of the main kernel trunk, is that the kvm module is just the context in which the hypervisor could be called.  The KVM module is really quiet stupid and simplistic.  It uses the Linux memory manager to manage all processes and calls to the virtual machine context and the kvm module is used to make all instructions called from a guest operating system safe for the host.  This is exactly what a kernel module should do; make hardware devices available to applications not make the applications.

Now with some modifications of the long time used qemu application (Under Ubuntu - called/ aliased as kvm) , we are able to upgrade to a really nice virtual machine solution.  I'm able to run KVM virtual machines with 100% Linux support for the host and offering a number of great features for the guest OSs.  For myself, that means I can run XGL on the host and run the virtual machines on flexible LVM drives directly, without filesystem containers or really any sort of hassles.

The big key is that you can now run Virtual Machines on Linux without giving up anything that Linux can do.  The only drawback is that there is no GUI interface but when starting a new machine is as easy as 'kvm -hda /dev/main/guest1'

Here is my bash script that runs my Windows XP virtual machine when I log onto my computer:
'kvm -no-acpi -no-reboot -m 512 -hda /dev/main/guest1 -cdrom /dev/cdrom -usb -smp2 -soundhw all'