Thursday, February 28, 2008

command line email in Cygwin

As mailx is not part of the Cygwin distribution, you don't have that many choices if you want to send an email from a shell script. In this regard, Jeremy Reed has kindly provided a nice substitute script that can help us out:
http://cygwin.com/ml/cygwin/2005-02/msg00635.html

If you have Cygwin installed, you'll need to do the following things:
1) install ssmtp
2) configure ssmtp with ssmtp-config
3) install Jeremy's mailx shell programs

There are a couple of gotchas with step 2 above.
1) make sure you have the directory /etc/ssmtp created
- for some reason, the ssmtp-config program doesn't create it
2) make sure you define a fully qualified hostname
- if not, you'll get the following error
$ /usr/bin/mailx -s "test" cacasododom@gmail.com < test.txt
3) make sure that you have a symbolic link created for /usr/sbin/sendmail that links to /usr/sbin/ssmtp and that /usr/sbin is in your PATH. Otherwise, you'll get this error:
$ mailx.sh -s "test" joe.user@yahoo.com < test.txt

That's it.

I preferred to use Jeremy's program over nail, because it gives me the same arguments as mailx did.

Thanks Jeremy!
TAG

Tuesday, February 12, 2008

Site Overlay in Analytics is lame

We can only look a gift horse in the mouth so often. So when Google stumbles with a small feature in the free toolsets that they provide us, we shouldn't yell at them.

Case in point: the Site Overlay feature in Google Analytics.

Site Overlay *should* be very cool, giving us a visual representation of the traffic to our websites by overlaying the percentage of traffic directly on the page itself. For my site, it looks something like this:


Notice all those 0%'s? Unfortunately, Site Overlay only works with static pages. It chokes on dynamic content, CSS, javascript links, redirects and almost any recent technology used to power a website. Here is the company line from a rep I emailed regarding what Site Overlay can and cannot do:

Thank you for your email. I understand you are concerned about zero datain your Site Overlay reports. Please note that the site overlay report uses cURL to request a web page, and displays clicks on standard links that are embedded on that page. Its functionality is currently limited to static pages with unique links to content located elsewhere on the website.

The site overlay is not currently able to work with Javascript links, CSS content, Flash navigation, downloadable files, outbound links, frames, or automatic redirects.


In the above cases, it's common to see missing overlay bars, or bars with zero content. If there are multiple links on a page that all point to the same place, Analytics will total the clicks to on all those links and display the total number for each overlay bar on each of those common links.

If you have a filter that changes your Request URI, the Site Overlay report may display 0 in your report.


Oh well. If Google updates this feature to allow for the use of dynamic content, I'll let you know.
Cacasodo

Saturday, February 09, 2008

understanding CSS using Firebug

Blogger templates are dense with Cascading Style Sheets and can pretty difficult to understand if you need to edit them. I didn't really understand them until I picked one apart using Firebug (http://www.getfirebug.com), the developer's plugin to Firefox. I have to tell you, Firebug really kicks ass and makes understand the CSS of any HTML page very clear. Enjoy the video!
'sodo

Wednesday, February 06, 2008

upgrading Cygwin: dos2unix

I recently converted from a very old version of Cygwin Beta 20 (circa 1999) to the latest 1.5.25-7 version of the Cygwin DLL. I noticed when I tried to execute some of my existing scripts that had executed under the old beta version, I now would receive a lot of these errors:
./script.sh: line 40: $'\r': command not found
or
./script.sh: line 5: syntax error near unexpected token `$'do\r''

Looks to me like the command interpreter on the new version of Cygwin is a lot more picky than the old one. Specifically, Cygwin is choking on the carriage returns that Windows XP Notepad inserts at the end of each line of the file. Yuk.

I wondered if this was something configurable with an environment variable (http://www.cygwin.com/cygwin-ug-net/setup-env.html), so I first tried setting the CYGWIN environment variable to nobinmode (http://www.cygwin.com/cygwin-ug-net/using-cygwinenv.html). Unfortunately, this change had no effect. I did find a bit of background here:
http://cygwin.com/faq/faq-nochunks.html#faq.api.cr-lf

I had a bit more success using one of the nice little utilities Cygwin has called "dos2unix". Dos2Unix strips out any carriage return or line feed characters in text files and automatically saves the file. The command is simple:
dos2unix [filename]

where [filename] is the name of the file you wish to convert. Dos2Unix has no man page, so don't bother looking for it.

Unfortunately, I had quite a few scripts in various directories, so I just went through each directory and typed:
dos2unix *.sh

I could have written a script to interate through the directories, but there were only about fifteen, so I got lazy and just ran the command manually. After running the command, I was able to execute the scripts without error.

Nice!
Cacasodo

Saturday, February 02, 2008

tag cloud for Blogger blog labels

Phydeaux3 has posted some very easy-to-follow instructions on how to create a tag cloud for labels on your Blogger blog:
http://phy3blog.googlepages.com/Beta-Blogger-Label-Cloud.html

A tag cloud looks like this:


You can see a working implementation of a label cloud here:
http://crazedmuleproductions.blogspot.com

The one thing that Phydeaux doesn't provide is an overview of the steps necessary in order to create the tag cloud. Here is the overview:
  1. Back up your blog template
  2. Add the label cloud stylesheet to your blog template (before the end skin tag)
  3. Add javascript variables for the cloud to your template before the end HEAD tag
  4. Replace the template code for your existing Label widget with the custom Label Cloud code
Finally, Phydeaux adds some troubleshooting tips as well as some hints for editing the label cloud text sizes and colors:
http://phy3blog.googlepages.com/Beta-Blogger-Label-Cloud.html

Nice job, Phydeaux!!
'sodo

ps - If you're new to Blogger, I've posted a number of videos here that you may find useful:
/2007/10/introduction-to-blogger-video-tutorial.html

Thursday, January 31, 2008

cygwin cron on Win2K/XP

Well, setting up Cygwin (http://www.cygwin.com/) cron on Win2K Server and my XP workstation is a complete bitch. Simply put, my scripts would not start properly. I used the latest version of the Cygwin DLL, v.1.5.25-7.

Why?
In a nutshell, my problems came down to three issues:
1) cron would only work as my local domain account
-lots of good information here: http://www.andrewlouie.com/wordpress/?page_id=88
-and a little bit of info here: http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-switch
2) cron needed to be installed using "smbntsec" privileges for my SSH-based scripts to work
3) finally, c:\cygwin\bin needed to be the last entry in my PATH enviroment variable

Installation Steps Added 3/1/2008
Most of the following information comes from these gentlemens' fine posts:
-http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-switch
-http://ist.uwaterloo.ca/~kscully/CygwinSSHD_W2K3.html

The overview is that you'll have to do quite a bit to get cron under cygwin running properly. Please refer to the two docs above, but here is the short list of steps:
1) decide on a user that cron will run under
- we have a domain account used for scheduled tasks, so I used that
2) add the user to /etc/passwd
- setup a proper home directory in /etc/passwd
- if you do not have a proper home directory, you'll see "Can't cd to $HOME" errors from the output of cronevents.exe
- copy valid .bashrc/.bash_profile files to your users' home directory
3) under Control Panel -> Administrative Tools -> Local Security Policy -> Local Policies -> User Rights Assignment -> tweak your Win2K/XP Local Security Policy settings to add the chosen user to
- (Adjust Memory Quotas for a Process) Increase Quotas
- Create a Token Object
- Log on As A Service
- Replace Process Level Token
4) create a crontab for your user
- crontab -e
5) verify that the permissions on the command(s) to be cron'd will allow the user you've chosen to execute the command(s)
6) run cron-config to enable the cron daemon
- you may get execute and write errors related to permissions on /var, /var/run, /var/log, /usr/sbin/sendmail, /usr/bin/cronlog. I took the easy route and fixed them with:
chmod 766 [file or directory]
or
chmod 755 [file or directory]

Also, make sure the user that you will be using to execute cron jobs is setup in /etc/passwd.

6) once the cron daemon is running, validate that your script is running properly by looking at cronevents.exe and $HOME/cron.log
- if you have not applied the Local Policy settings correctly, you may see the "can't switch user context" error in the log output
- at one point, I received this error:
C:\cygwin\usr\sbin\cron.exe: *** fatal error - could not load user32, Win32 error 1114

I resolved this by moving my user from the "guest" group to the "Administrators" group in /etc/passwd. Of course, you may not want to do this based on your security needs.

troubleshooting
I learned a few things along the way:
1) after installing the cron package into Cygwin, you want to use cron-config to setup cron
2) after enabling your cron, cronevents.exe is a good thing
3) occasionally, $HOME/cron.log provides some useful info
4) the CYGWIN environment variable can be a nasty beast:
http://www.cygwin.com/cygwin-ug-net/using-cygwinenv.html
5) the HOME environment variable must be set properly:
http://blog.spikesource.com/crontab.htm suggests running "env" in your cron out to a file to find differences between your user environment and the cron environment. Good idea!
6) don't forget your scripting basics:
/2007/07/why-doesnt-my-shell-script-run-under.html
7) documentation can help:
C:\cygwin\usr\share\doc\Cygwin\cron-4.1-6.README

Detail
1) after you install the cron packages from the CygWin setup program, make sure to use "cron-config" to add or remove the cron daemon as an NT service, and perform configuration of cron.

I needed to run the service as myself, with the security tweaks described in both these places:
-http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-switch
-http://www.andrewlouie.com/wordpress/?page_id=88

Here's a sample of the installer dialog:
$ cron-config
Cron is already installed as a service under account DOMAIN\USER.
Do you want to remove or reinstall it? (yes/no) yes
OK. The cron service was removed.

Do you want to install the cron daemon as a service? (yes/no) yes
Enter the value of CYGWIN for the daemon: [ntsec smbntsec] smbntsec

The service can run either as yourself or under a privileged account.
Running as yourself allows better access to network drives,
but does not allow to run the crontab of other users.
Do you want to the cron daemon to run as yourself? (yes/no) yes

Please enter the password for user 'SODO':
Reenter:
Running cron_diagnose ...
... no problem found.

Do you want to start the cron daemon as a service now? (yes/no) yes
OK. The cron daemon is now running.

In case of problem, examine the log file for cron,
/var/log/cron.log, and the Windows event log (using /usr/bin/cronevents)
for information about the problem cron is having.

Examine also any cron.log file in the HOME directory
(or the file specified in MAILTO) and cron related files in /tmp.

If you cannot fix the problem, then report it to cygwin@cygwin.com.
Please run the script /usr/bin/cronbug and ATTACH its output
(the file cronbug.txt) to your e-mail.


Occasionally, cron-config may bark at you for permissions errors on /etc/group and /etc/passwd. Fix them and then re-run cron-config.

Event Log Errors
If I ran the cron daemon under the SYSTEM user context, I got the following Application Event log error:
The description for Event ID ( 0 ) in Source ( /usr/sbin/cron ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: /usr/sbin/cron: PID 5300: (CRON) error (can't cd to HOME).

After a proper install, I still see a running set of Information Alerts in the Application logs. These don't seem to hurt, as my jobs still runs:
The description for Event ID ( 0 ) in Source ( /usr/sbin/cron ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: /usr/sbin/cron: PID 5016: (SODO) CMD (/scheduledtasks/scripts/load.sh ).

2) Setup your cron using "crontab -e". This puts you into the edit window of the text editor that you installed with Cygwin.

Once a cron is setup, view the output of cronevents.exe to see what cron jobs executed:
$ cronevents.exe tail
2008/01/31 16:53:01 [SODO] /usr/sbin/cron: PID 5992: (SODO) CMD (/scripts/load.sh >> /scripts/load.txt )
2008/01/31 16:53:01 [SODO] /usr/sbin/cron: PID 6652: (SODO) CMD (/scripts/connScript.sh >> /scripts/conn.txt)
2008/01/31 16:54:01 [SODO] /usr/sbin/cron: PID 8132: (SODO) CMD (/scripts/load.sh >> /scripts/load.txt )
2008/01/31 16:54:01 [SODO] /usr/sbin/cron: PID 4708: (SODO) CMD (/scripts/connScript.sh >> /scripts/conn.txt)
2008/01/31 16:55:01 [SODO] /usr/sbin/cron: PID 8164: (SODO) CMD (/scripts/connDiff.sh)
2008/01/31 16:55:01 [SODO] /usr/sbin/cron: PID 3372: (SODO) CMD (/scripts/connAlert.sh )
2008/01/31 16:55:01 [SODO] /usr/sbin/cron: PID 4460: (SODO) CMD (/scripts/load.sh >> /scripts/load.txt )
2008/01/31 16:55:01 [SODO] /usr/sbin/cron: PID 7976: (SODO) CMD (/scripts/connScript.sh >> /scripts/conn.txt)
2008/01/31 16:56:01 [SODO] /usr/sbin/cron: PID 6424: (SODO) CMD (/scripts/load.sh >> /scripts/load.txt )
2008/01/31 16:56:01 [SODO] /usr/sbin/cron: PID 2676: (SODO) CMD (/scripts/connScript.sh >> /scripts/conn.txt)


3) Viewing the cron logs are important! The cron.log is place in $HOME/cron.log:
$ cat /cygdrive/h/cron.logThis file was written by the /usr/bin/cronlog script on 20080131_165003
From: root (Cron Daemon)To: SODOSubject: Cron
SODO@SODO02 /scripts/connDiff.sh

X-Cron-Env: ALLUSERSPROFILE=C:\Documents and Settings\All Users
X-Cron-Env: COMMONPROGRAMFILES=C:\Program Files\Common Files
X-Cron-Env: COMPUTERNAME=SODO02X-Cron-Env: COMSPEC=C:\WINDOWS\system32\cmd.exe
X-Cron-Env: CYGWIN=smbntsecX-Cron-Env: NUMBER_OF_PROCESSORS=4
X-Cron-Env: OS=Windows_NTX-Cron-Env: PATH=/cygdrive/c/Program Files/PHP/:/cygdrive/c/oracle9i/bin:/cygdrive/c/oracle9i/jre/1.4.2/bin/client:/cygdrive/c/oracle9i/jre/1.4.2/bin:/cygdrive/c/Program Files/Oracle/jre/1.1.8/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/Program Files/TeaLeaf:/cygdrive/c/Program Files/Python25:/cygdrive/c/Program Files/QuickTime/QTSystem/:"C:/Program Files/Symantec/Norton Ghost 2003/":/cygdrive/c/Program Files/Common Files/Adaptec Shared/System:/usr/bin:/cygdrive/c/Program Files/SSH Communications Security/SSH Secure Shell:/bin
X-Cron-Env: PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
X-Cron-Env: PROCESSOR_ARCHITECTURE=x86
X-Cron-Env: PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 3, GenuineIntel
X-Cron-Env: PROCESSOR_LEVEL=15X-Cron-Env: PROCESSOR_REVISION=0403
X-Cron-Env: PROGRAMFILES=C:\Program FilesX-Cron-Env: SYSTEMDRIVE=C:
X-Cron-Env: SYSTEMROOT=C:\WINDOWS
X-Cron-Env: TMP=/cygdrive/c/DOCUME~1/SODO/LOCALS~1/Temp
X-Cron-Env: TEMP=/cygdrive/c/DOCUME~1/SODO/LOCALS~1/Temp
X-Cron-Env: WINDIR=C:\WINDOWSX-Cron-Env: SHELL=/bin/sh
X-Cron-Env: HOME=//SAN/Users$/SODO
X-Cron-Env: LOGNAME=SODO

4) My scripts do such things as SSH into other boxes and grab HTTP connection counts. The scripts only ran using the CYGWIN environment variable set to smbntsec.


5) the HOME environment variable must be set properly: http://blog.spikesource.com/crontab.htm suggests running "env" in your cron out to a file to find differences between your user environment and the cron environment. Good idea!

6) don't forget your scripting basics:
/2007/07/why-doesnt-my-shell-script-run-under.html

7) documentation can help:
C:\cygwin\usr\share\doc\Cygwin\cron-4.1-6.README


Or whatever the latest version happens to be..

Mail That Cron Sends

Change the email that cron sends error messages to:
http://www.cyberciti.biz/faq/linux-unix-crontab-change-mailto-settings/
or
run cron-config
or
Add/edit the "From:" address in /etc/ssmtp.conf

Hope these tips help!
sodo

Wednesday, January 30, 2008

couldn't set file permissions in Cygwin

Here's a little tidbit that might help someone. I was configuring my public and private keys to allow secure SSH communications between my workstation and a server (see /2007/08/eliminating-need-to-enter-your-password.html for more details). The workstation is an XP box running Cygwin and the server is a Linux variant. When I went to test ssh, I got the following error in Cygwin from the XP box that denied access to the private key:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
WARNING: UNPROTECTED PRIVATE KEY FILE! @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Permissions 0644 for '/cygdrive/h/.ssh/id_rsa' are too open.
It is recommended that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /cygdrive/h/.ssh/id_rsa
Password:

Woops. I guess that's my fault. Looking at the file permissions, I see that id_rsa perms are too loose:
bash-2.02$ ls -l id_rsa
-rw-r--r-- 1 28235 everyone 1675 Jan 30 15:33 id_rsa

I issued the following chmod command:
bash-2.02$ chmod 600 id_rsa
bash-2.02$ ls -l id_rsa
-rw-r--r-- 1 28235 everyone 1675 Jan 30 15:33 id_rsa

But the permissions stayed the same. What gives? Why aren't the permissions changing?

Apparently, Cygwin has two ways to deal with file permissions. Here's the explanation:
http://www.iu.hio.no/cfengine/docs/cfengine-NT/node24.html

The short answer, though, is that I was able to solve my problem by setting this environment variable in /Cygnus/cygwin-b20/cygnus.bat:
set CYGWIN=ntea

Once I set that environment variable in the batch script and restarted a new Cygwin shell, I was able to set the permissions correctly:
bash-2.02$ chmod 600 id_rsa
bash-2.02$ ls -l id_rsa
-rw------- 1 28235 everyone 1675 Jan 30 15:33 id_rsa

Update 2/8/2008
I also got bollucksed with id_rsa permissions if my user's NT permissions on the file were not Full Control. So watch out for that as well.

Live and learn!
sodo

Thursday, January 24, 2008

using regular expressions in Oracle

I needed to select rows of data from a column where some of the records begin with a date in the form:
YYYYMMDD

The other records in the column had random text strings. For example:
N MESSAGE
- -------
1 20080124: Hello. I have written to you today to compliment you
2 I have a problem with one of the products you sell.

I thought it would be perfect to use regular expressions to pluck out only the records I needed. Luckily, Oracle now supports for regular expressions as of version 10G:
Writing Better SQL Using Regular Expressions

I needed to first create the regular expression to match the date. In simple terms, I want to match the eight-digit string.

First, here is a regular expression that matches any digit, 0-9:
[0-9]

Secondly, we can expand this match to include the entire eight digit date:
[0-9]\{8\}

The escaped braces repeat the initial match for any number eight ("8") times. I will then put a carat (^) in front of the regular expression to match the beginning of the pattern buffer. The pattern buffer in this case is the MESSAGE column in our table:
^[0-9]\{8\}

OK! So we have our regular expression. Let's put it in a SELECT statement. We will use Oracle 10Gs new regexp_like condition to perform a regular expression match:
SELECT n,message
FROM message_table
WHERE regexp_like (message, '^[0-9]\{8\}');

N MESSAGE
- -------
1 20080124: Hello. I have written to you today to compliment you

Sweet! This works.

There is a slight problem. I did notice a substantial performance penalty for using regexp_like. For a very small table (<20,000 rows), it took about a minute to return the results of the search. Eeek. A normal WHERE clause came back in less than a second.

If I have any further information regarding performance tuning using regular expressions in Oracle, I will let you know.

Here are some more complex examples

TAG

Sunday, January 06, 2008

Belkin F5U503 firewire mishap

Though it may seem so, not all tasks computing are an easily digestible banquet for Cacasodo. Yes, there are high points of success, but like many the intrepid engineer, there are more failures than success. In this light will I tell you my tale of frustration.

It began with a simple goal: to optimize my video editing by installing a firewire card using the PCIX slot of my Dell SC1430. As my one and only PCI slot was used by my Sil680 RAID card, I wanted to install a firewire card in one of the two PCIX slots in the box. And of course, the card had to work under Fedora. As a precursor to the story, I will say that I have a DLink PCI firewire card and that card works without error in the box. But my purpose was to have the RAID card use the one and only PCI slot and the Belkin in one of the PCIX slots so both could live happily in the same home. Alas, I did not know the hell that awaited me in trying to make this happen.

It started as a hasty, unresearched purchase of a Belkin F5U503 firewire card. After my purchase was made, I was told by a friend to avoid the Belkin cards, as Belkin was a known OEM reseller who used substandard parts. Cold comfort that was after the fact, but I digress.

I brought the card home and installed it in the first PCIX slot of the Dell. The Belkin has three connectors that allow it to fit in either PCIX slot of my box:
http://www.staples.com/sbd/img/cat/std/s0057708_std.jpg

Here's a pic of my server's motherboard:
http://dcse.dell.com/IFR/PowerEdge/PESC1430/images/sysbrd_full.jpg

When I installed the card in the PCIX slot, here's what happened. Dmesg gives me this error:
[cacasodo ogre ~]# dmesg | grep 1394
ohci1394: fw-host0: OHCI-1394 1.1 (PCI): IRQ=[38]
MMIO=[fc5ff800-fc5fffff] Max Packet=[2048] IR/IT contexts=[4/8]
ohci1394: fw-host0: Get PHY Reg timeout [0x000004c0/0x00000000/100]

ohci1394: fw-host0: Get PHY Reg timeout [0x000004c0/0x00000000/100]


I get a couple more errors in dmesg once I turn the cam on:
ieee1394: hpsb_update_config_rom() is deprecated
ieee1394: Failed to generate Configuration ROM image for host 0


lsmod reads:
[cacasodo ogre ~]# lsmod | grep 1394
ohci1394 43273 0 ieee1394 109081 1 ohci1394


lspci reads:
[cacasodo ogre ~]# lspci | grep 1394
06:06.0 FireWire (IEEE 1394): Texas Instruments TSB43AB23 IEEE-1394a-2000 Controller (PHY/Link)


after probing for raw1394:
[cacasodo ogre ~]# modprobe raw1394
[cacasodo ogre ~]# lsmod | grep 1394
raw1394 37233 0 ohci1394 43273 0 ieee1394 109081 2 raw1394,ohci1394


I am running Fedora 7 and my kernel is the EZPlanet firewire patch kernel. I use this patched kernel because firewire is broken in Fedora 7's standard build:
[cacasodo ogre ~]# uname -r
2.6.22.9-1091.ez.fc7


I do see interrupt activity when I connect and turn on the cam:
[cacasodo ogre ~]# grep 1394 /proc/interrupts
38: 2 0 0 0 1 0
0 0 IO-APIC-fasteoi ohci1394


testlibraw gives me something:
[cacasodo ogre ~]# testlibraw
successfully got handle

current generation number: 1
1 card(s)
found
nodes on bus: 0,
card name: ohci1394

using first card found: 0 nodes on bus, local ID is 0, IRM is 63


But plugreport doesn't give me anything:
[cacasodo ogre ~]# plugreport
Host Adapter 0 ==============


Adding "noacpi", "noapic" and "nolapic" to my grub.conf and rebooting didn't help.

To see if it was kernel related, I tried booting using these other distros/kernels, with the same result..the "Get PHY Reg timeout" error:
Ubuntu 6.10 -> 2.6.17-10 kernel
Knoppix -> 2.6.19 kernel
Fedora 6 -> 2.6.18-1.2798 kernel

OK. I am almost spent for the evening. But does the card even work in the PCI slot? I put the card in the PCI slot and lo and behold, the card DOES work. To reiterate, the card does work in the PCI slot, just not in either of the PCIX slots. At this point I'm thinking that the card is not getting proper power, but I'm too tired to continue on. I sleep uneasily.

The next day, I take fifteen minutes to call Belkin. The gentleman on the line is helpful, but when I tell him I'm running Linux, I get the cold shoulder and he dismisses me with the "we don't support the card under Linux" line. Well, if the card works fine in one slot under Linux, why shouldn't it work in the other slot?! No matter, "we don't support the card under Linux."

Argh. So here is where I dive off into the deep end to set out to prove Belkin wrong that it is a power issue and not an OS issue. I went on Belkin's support site and tried to find the voltage requirements for the card. I could not. I searched on google and not so amazingly, I find a link to the voltage requirements ON BELKIN'S OWN SITE!
http://web.belkin.com/support/kb/kb.asp?a=3742&langid=

Great search engine there, Belkin! NOT! As well, I look on Dell's site for the voltage of the PCIX slots:
  • 2 64-bit/100MHz PCI-X slots 3.3V

The slots handle 3.3volts. Referring back to the Belkin KB article, it states clearly:
The F5U503 PCI requires a 5 volt PCI slot.

I knew it! Now, in order to prove Belkin wrong, I decide to get a Windows OS running on the Dell and show them that it is a POWER issue and NOT an OS related issue!

To do this, I'd install an older IDE drive in the Dell and apply an old Ghost image I had of XP. Well, the Dell doesn't have a floppy drive. So, I power down my web server, take the floppy out, install it in the Dell and reconfigure the BIOS to allow the floppy to be seen. OK. I try one of my Ghost floppies. It doesn't boot. I try a second and a third. They do not boot as well. Argh.

Wouldn't it be great if Ghost worked on a bootable CD? Unfortunately, Norton doesn't provide that option. But an enterprising person has a lovely install doc written up here:
http://nightowl.radified.com/bootcd/bootcdintro.html

Thank you, Nightowl! Though, it did take me a number of hours to setup the Ghost bootable disk, it was well worth the time as I now have reliable boot media for Ghost. The process itself could use a small blog entry. Nightowl did a great job, but he needs better formatting and less verbiage to make the instructions easier to follow.

Next, I used it to boot and apply a Ghost image of my XP system to that older hard drive I mentioned. But when I bootup, Ghost does not recognize the DVD disc. I try another disc that has an earlier Ghost image. Ghost also does not recognize that disc. Finally, I have a third DVD. Luckily, Ghost recognizes that disc. Unfortunately, when I go to apply the image, Ghost cannot find the IDE hard drive. What the hell? I see the drive in the BIOS, though the BIOS doesn't report back the correct size of the drive. It is the master drive on the IDE controller..what gives?

I tried a few couple configuration options:
-hard drive being slave
-hard drive cable select
-disabling the SATA drives
-changing boot sequence
-refreshing the BIOS version to the latest 1.0.4

None of these worked. Then I thought that if Ghost re-imaging didn't work, I should just install the OS itself. So, I had a bootable copy of the XP disc. I started the system with the disc in the drive, but the install process soon gave me a blue screen with a message regarding pci.sys. Looks like a lot of folks had that one:
http://www.google.com/search?q=xp+professional+install+pci.sys+blue+screen

This problem should be resolved with a disc that integrates XP with SP2 . Which of course, I don't have right now. So for expediancy's sake, I take another route: a Windows 2000 Advanced Server install. I was able to put the extra hard drive in a second machine, start the Win2K install process, but for some reason, the hard drive is not recognized properly by the BIOS. I brought the disk over to my Dell SC400 machine that runs XP. I disconnected the existing XP drive, installed the disk and got Win2K Advanced Server working without a problem. The box boots to that drive, so I know that the Master Boot Record is not corrupt. But when I move the drive back to the SC1430, it refuses to boot.

Not sure what to do at this point. I'd sure like to prove those Belkin support engineers wrong, but I can't get the "Belkin certifed" OS (in this case, Windows 2000 Advanced Server) to boot in the Dell. I assume I will have the same problem with XP SP2, but it might be worth a try.

To sum up:
-card doesn't work in PCIX slot, but I believe it is a simple voltage problem
-I'd like to prove this to Belkin, but I can't get a Windows OS to load via Ghost'ing an existing hard drive or installing a hard drive with a Windows OS on it

Update 1/6/08
Ooops..my bad. Looking in the manual for the Dell SC1430, it shows that pre-Win2003 OSs are not supported. Thereby, I am out $52 for the price I paid for the Belkin card. Just goes to show..DO YOUR RESEARCH before making a purchase of this kind.
!
A Frustrated Cacasodo

Saturday, January 05, 2008

WinAmp under Wine on Fedora 7

Happy 2008, everybody!

This was a nice surprise. I wanted some visualizations with my music, rather than just the plain xmms oscilloscope, so I thought I'd try installing WinAmp under Wine, the Windows Emulator (http://www.winehq.com). I hadn't had very good experiences with Wine before and wasn't confident that my sound hardware would be recognized correctly, especially in my quirky Dell SC1430.

The Dell is a server class machine not made for consumer applications. Though I'm trying my best to convert it into a video editing monster machine. For the most part, I have succeeded in that task. But there has been a lot of bloodletting (read: time spent) in the process.

Currently, I have Fedora 7 running on the Dell. As Wine is part of this Fedora distro, installing Wine was a simple matter of doing:
[cacasodo@ogre ~]# yum install wine

Version wine-0.9.49-1.fc7 got installed from the fedora-updates repository.

After reading a bit on the Wine FAQ, I saw that the installation of Windows programs to the Wine environment should be fairly straightforward. With that in mind, I downloaded the latest WinAmp player. I started the install by using the following command from my home directory, the directory I copied the program to:
[cacasodo@ogre ~]# wine winamp551_basic.exe

I forgot that Wine runs all the Windows applications and dialogs appeared in their own Metacity windows. Wine running WinAmp looks like this:


As I made it through the final dialog box of the installation process, I assumed the program installed correctly. Now, it was time to configure Wine using the Wine configuration program. I typed:
[cacasodo@ogre ~]# winecfg



In winecfg, I made sure that my audio drivers were selected correctly. Upon installation, Wine automatically detected that OSS, ALSA and JACK drivers were installed in my system. They were selected, so I played a test sound. The test sound was garbled and unintelligible. Ooops. I looked at the command output in the terminal window and it showed an ALSA error:
ALSA lib pcm_dmix.c:868:(snd_pcm_dmix_open) unable to open slave

I saw that my other audio applications were similarly broken, so I decided to reboot just for good measure. When the box came back up, I first played a test sound in XMMS. That worked, so I opened winecfg and the test sound played correctly! Happiness.

The real test would be to start 'er up and load an MP3 file. I started WinAmp using the following command:
wine /cacasodo/.wine/drive_c/Program\ Files/Winamp/winamp.exe

WinAmp started up, so I dragged the default Mike Llama wave file from the WinAmp installation folder into the playlist of WinAmp. The drag and drop from Metacity to WinAmp running under Wine worked, which was nice to see. Pressing play, I was happy to hear Mike's dulcid tones..well, not so dulcid..ring out loudly through my speakers. WinAmp was working!!

My original purpose for the WinAmp installation was to have some nice visualizations to go with my music. I was very interested to see if they'd work under Wine. In WinAmp, I went to Preferences by pressing the familiar CTRL-P key combination. Indeed, this opened up a Preferences window. Wine does key combinations..cool! I selected Visualizations -> Advanced Visualization Studio and pressed Start plugin. Lo and behold, another window appeared and even better than that, a visualization started up!

The visualizations were working so well that I could expand the viz window to roughly DVD size resolution (720x480) without it slowing down. Nice! At this point, I knew that Wine must be taking advantage of my NVidia (BFG) 8500GT card. There's no way plain old X could handle those beautiful streaming colors all by itself:


Again, nice going Wine, for taking advantage of the OpenGL in my NVidia chip!

However, I will say there must be some optimization needed in Wine, as a constant flow of error messages comes through in the terminal session:
fixme:ddraw:IDirectDrawImpl_WaitForVerticalBlank (0x1b27ff0)->(1,(nil)): Stub

Aside from that, it is very nice to have an unexpected success like this install of WinAmp and its beautiful visualizations. Tally ho!

For your reference, the WineHQ site has a nice database that shows which Windows applications will work with Wine:
http://appdb.winehq.org/appbrowse.php

In particular, here is the root page describing WinAmp compatibility with Wine:
http://appdb.winehq.org/objectManager.php?sClass=application&iId=5

Very cool.
'sodo

Thursday, December 13, 2007

MacBook Pro: six month review

I've had my MacBook Pro 2.33Ghz Intel Core 2 Duo for over six months now and thought I'd give a quick review and impressions. Disclaimer: This review will be from the standpoint of a guy who uses the box mainly to connect to his corporate network, surf the web and do some occasional live video importing using iMovie HD.

Stability
It is pretty bulletproof and does not hang, until you start playing with HDV. Then things slow down or in some very rare situations, have hung the box. Thus, a restart is necessary.

Networking
Wi-Fi and hardwired ethernet setup are a breeze. At home, WiFi performance to my NetGear WGT624 is excellent and works from the first floor in my loft, through metal studded walls up to the router which is upstairs in the loft roughly twenty feet away. I have had no trouble connecting to WiFi networks in hotels or conference centers.

Connectivity
In order to logon to other boxes at my home and corp networks, I run Microshaft Terminal Services and Chicken of the VNC. This is our peak season at work, so when I am home, I will log in over Cisco VPN to my workstation at work via MS RDP and keep the connection up as long as possible. Cisco VPN has been connected for as long as fourteen days with no downtime. Microsoft RDP occasionally hangs and I will have to restart the box. Figures..the times I have had to restart a Mac is because of a Microsoft product. Finally, built in BSD Unix gives you all the Unix tools plus ssh/scp for other connectivity options.

OS Alternatives
I don't run Boot Camp; instead, I run VMware Fusion (VMware's answer to Parallels) and have XP and Fedora running in virtual machines on the MacBook. Parallels works for some people; however, I encountered problems with a kernel panic when I installed Fedora. Since we use VMware at work, I just opted to use VMware Fusion.

XP and Fedora performance in Fusion is good, but not great for things like editing video. However, at least you have the capability of running an alternate OS without fear of the virtual PC going down. VMware allows you to assign one or more processors to a VM, so that is an additional performance boost.

I know folks who do run Boot Camp without issue if you want to go down that route.

Applications

I haven't used the Mac apps other than Safari/TextEdit/Preview/IMovie HD/iTunes. But those programs seem really intuitive. Kudos to Jobs for enforcing ease of use. On certain websites. there is squirrely-ness with Safari and some form fields. I suspect this is due to those sites' coders not doing a good job of testing. For those websites, I run Firefox and that usually will get around these problems.

Battery Life
Multimedia will suck the juice out of this thing. I probably get only 1 1/2 to 2 hours of battery life if I am viewing YouTube or watching a DVD. However, if I use non-multimedia apps, I get quite a bit more usable batt time. For instance, I was able to use Microsoft Word on a plane for about 4.5 hours straight before the box died.


All in all, I am a man for all seasons: PC for noodling about or raw firepower and the Mac for "it just works"

sodo

Monday, December 10, 2007

Google Gmail shortcut keys

In Settings, enable keyboard shortcuts.

j (move to older thread; aka. Conversation)
k (move to newer thread)
o (open thread)
With thread open:
n (next email in thread)
p (previous email)
o (open/expand email (or collapse it if it currently expanded))
u (return to list view)

y (if reading Inbox, archive thread; ie. remove from Inbox)
s (star or un-star message/thread)
# (delete; ie, send to Trash)

x (select thread -- useful in thread list view, in conjunction with j & k shortcuts)
? (Help; ie. show list of keyboard shortcuts)

Link to full list of shortcuts:
http://mail.google.com/support/bin/answer.py?hl=en&ctx=mail&answer=6594

Thanks to BT for the reminder!

Tuesday, November 27, 2007

"out of memory" messages while opening windows in XP

I'd been plagued with this annoyance for a couple years, but never bothered to research it until today. Here's a nice solution, compliments of Kevin Dente:
http://weblogs.asp.net/kdente/archive/2004/06/04/148145.aspx

Update 2007/11/28
Woops..link now works!


Thanks Kevin!
'sodo

Monday, October 22, 2007

command line to send test email via SMTP

Because I always forget this, here is the command line syntax for sending a test email through an SMTP mail server. Commands to enter at a prompt are in RED.

telnet mail.whateverdomain.com 25

Connected to whateverdomain.com.
Escape character is '^]'.
220-whateverdomain.com Smail-3.2.0.101 (#2 1998-Jul-16) ready at Mon, 27 Nov 2000 13: 34:55 -0600 (EST)

HELO yourmachine.yourdomain.com
250 yourdomain.com Hello yourmachine.yourdomain.com (yourdomain.com from address 64.214.123.23).
MAIL FROM:foo@yourdomain.com
250 foo@yourdomain.com ... Sender Okay
RCPT TO:joe_user@yahoo.com
250 'joe_user@yahoo.com' Recipient Okay.
DATA
354 Enter mail, end with "." on a line by itself
From: Meredith Foo
To: Joe
CC: foo@yourdomain.com
BCC: bar@yourdomain.com
Subject: Test Message

This is only a test.
.

250 Mail accepted
QUIT
221 whateverdomain.com closing connection

Don't forget that if your telnet session is hanging, the key combination of CTRL-] will exit you to the command prompt of telnet (Windows) or the shell prompt (Unix). If you're in Windows, simply type "quit" at the telnet command prompt in order to exit.

Expanding upon this simple test email, I've written some instructions on how to automate emails via shell script that some of you might find useful:
/2007/08/attaching-binary-file-to-command-line.html

cheers,
sodo

Thursday, October 04, 2007

Google Analytics - understanding the Advanced Filter

As our web presence is a typical eCommerce site, we tag our pages with Google Analytics javascript tag to save all of our web traffic information. Google Analytics is great software that is free, as long as your traffic is less than five million pageviews per month. So first, a big Thank You to Google! That disclaimer in place, I will have to say that some of the documentation regarding the advanced features of Analytics is not the greatest. Case in point: Advanced Filters.

Filters
With Filters, you can perform data transformations on the information that Analytics gathers. You can use filters to do a number of things:
* exclude or include data matching certain criterion
* do lowercase or uppercase transformations of data
* search and replace data matching expressions
* do table lookups to transform lists of meaningless codes to something that actually might mean something to a human being

More detail about filters is available here on Google's site. Also, here is detail on how to create a basic filter.

Advanced Filter
An Advanced Filter does a little something different than a normal filter. For instance, using an Advanced Filter, you can match a generic text string and write that data to an empty, user defined field. For instance, if I want to find the value of a specific query parameter in a URL, I can use an Advanced Filter to pull the values from each URL and store them in a separate data field.

Real World Example
Our product search page allows users to enter in a keyword phrase to search on. After the customer submits the form, a list of matching products will be returned. The FORM element of the web page uses a GET request that is made from the browser to the server for the list of matching products. When the GET request is made, the query parameter in the URL is exposed in the Address bar of the browser:
http://ecommercewebsite/search.asp?SSTR=radio&go=1

Therefore, the SSTR parameter in our product search page determines the keyword search that is performed. One of the excellent reports GA gives you is the Top Content report. However, looking at the Top Content report for our search page, we see that a lot of data repeats and it is not easy to pick out the product that the customer wanted to find:


Defining the Advanced Filter
In this case, I want to pluck out only the value of the SSTR parameter and store it in another field. To do this, I will use an Advanced Filter. This filter will have an input value (the URL of the customer request), a match criterion (the value of SSTR) and a place to store the output (an empty column named User Defined in the Visitors report).

Creating the Advanced Filter
Here are the steps we need to perform in Google Analytics to create our Advanced Filter:
1 - Click on "Analytics Settings" in the upper-left of GA.
2 - Click on "Filter Manager"
3 - Click "Add Filter"
4 - In Filter type, select "Custom Filter" and choose "Advanced" from the selection of radio buttons.
5 - Since we need to select the URL of the customer request, select the Request URI as the input field. This input field is listed as Field A.
6 - We will need to define a regular expression as the match criterion. Here is a quick tutorial on using regular expressions. In this case, the verbal description of our match criterion is "pull the words after the "SSTR=" and before the first ampersand, the "&" character. So our match criterion, transformed into a regular expression, becomes this:
.*&SSTR=(.*)&go.*

As noted in the tutorial, the parentheses capture one or more parts of the input field. The text between the parentheses is captured and can then be referenced and stored. We reference the value captured between the parentheses in Field A later by using the shorthand $A1. $A1 translates to "what was in the first set of parentheses in Field A".

7 - Select "User Defined" as the Output Field.
8 - Since we want the values captured between the parentheses, our Constructor will be $A1.
9 - Select a value for "Yes" for "Override Output Field"

Here is how our Advanced Filter should look:


10 - To make the filter active for your specific website, from the "Available Website Profiles", add your website to the "Selected Website Profiles"
11 - Save the filter by clicking Finish

After Google has caught up(probably four to five hours from now), check the data by going back to View Reports -> Visitors -> User Defined report:


Eh Voila! Our report is there! I hope you enjoyed this discussion of Google Analytics Advanced Filtering and it will help you make new, easy-to-read reports for you and your team.

'sodo

Thursday, September 27, 2007

setting up the Dell SC1430

Ah! I'm very excited! Got the new 1.6Ghz Quad-Core, dual Xeon CPU Dell SC1430 a couple of days ago! Specifications http://www.dell.com/content/products/featuresdetails.aspx/pedge_sc1430?c=us&cs=04&l=en&s=bsd&%7Elt=popup Chipset: Intel 5000V Compatible quad core processors: E5310 (1.6Ghz), E5320 (1.86Ghz), E5335 (2.0Ghz), E5345 (2.33Ghz) Limitations The following limitations have caused me trouble along my path to computing bliss:
  • One PCI slot
  • Two PCI Express slots have only 4x lanes, though the connectors on each are 8x
  • Little support for high end graphics cards
  • Only one primary IDE controller (to control two IDE CD/DVD or tape backup drives only)
  • Can't boot from an IDE hard drive (See Dell community forum)
  • Only four drive bays (two 5 1/4", two 3 1/2") and a two-drive SATA housing (six total drives)
  • Spartan Dell BIOS does not allow for performance tweaks
  • pre-Win2003 Microsoft OSs are not supported
BIOS Gotchas BIOS resets the boot sequence when you change SATA settings (like changing AUTO to OFF for a drive). So be wary of this feature when you see a black screen upon bootup! Documentation Of course, I followed the "Getting Started" guide. ;) That and the manual are available here: http://support.dell.com/support/edocs/systems/sc1430/ Here is a link to the manual http://support.euro.dell.com/support/edocs/systems/sc1430/en/hom/html/hom_en/index.htm Note: the links to the PDFs on the destination page do not work in Firefox. I used Opera to view the PDFs Here's a nice pic of the motherboard: http://dcse.dell.com/IFR/PowerEdge/PESC1430/images/sysbrd_full.jpg This box has dual, 1.6Ghz E5310 Cloverton CPUs from Intel. Intel Datasheets on 5300 Series processors: http://developer.intel.com/products/processor/xeon5000/index.htm?iid=servproc+body_xeon5000subtitle Diagnostic LED codes for the SC1430: http://www.support.dell.com/support/topics/global.aspx/support/dsn/en/tree?c=us&l=en&s=gen&treeid=17D80717209DC96CE0401E0A5517366C&journalid=0F73CB4574E211DC80D94DDA4FEC1C21&Query=&SystemID=&ServiceTag=&contenttype=-1&os=-1&component=-1&lang=-1&doclang=en&toggle=false Diagnostics http://support.us.dell.com/support/downloads/download.aspx?c=us&l=en&s=gen&releaseid=r132112&formatcnt=1&libid=0&fileid=178687 Dell Diagnostics on SC1430 running Fedora 12, x86-64: Networking Broadcom 5751 NIC, BIOS default: PXE boot enabled Wake On Lan http://en.community.dell.com/forums/p/19278497/19500906.aspx#19500906 Update 2/24/2010 I spent about eight hours debugging why wake on lan wouldn't work on my newly built Fedora 12, x86-64 system. Went through a million threads, learned something about sleep states in Linux..finally got it by putting a line at the top of /etc/init.d/halt script (called by "shutdown -h now") to remove the kernel module (rmmod tg3) for the ethernet driver. Self-evident, right? NOT! What the F? full story here *** end update *** Memory As people add comments regarding memory that works in the SC1430, I will post updates to this section. By the way, dmidecode and lshw can be used to determine the type of memory you have installed: http://www.cyberciti.biz/faq/linux-find-memory-speed-dimm-command/ So far (Thanks John!):
manufacturer model                           part number
Kingston     DDR2 FB-DIMM ECC Fully Buffered KVR667D2D4F5K2/4G
Video Be warned that this server is very picky with video cards. So before you dremel any PCI Express video cards to get them working in the 8x slot, make sure you test them with an 8x-to-16x PCIe adapter in the box first! ;) (thanks John!) Update 2/28/2010 Video card roundup..cards known to work in the box (from the Comments section below) ATI-based cards ATI Radeon hd4630 ATI x300 ATI X1300 PCI ATI x1550 ATI X1900 All-In-Wonder VisionTek X1550 Radeon Pci 256MB VGA Sapphire x1950GT 512mb card Sapphire Radeon HD 4850 NVidia-based cards NVidia BFG 8800GT NVidia BFG 8500GT EVGA GeForce 9400GT 512MB PCI NVidia BFG 9600GT BFG Tech GeForce 9800GT 512MB Nvidia Quadro NVS 290 NVidia Quadro Fx 540 PCI NVIDIA Quadro NVS 400 Note: It would behoove one to read the full comments section for any gotchas. *** end update *** The first thing I wanted to do was use my ATI Tech Radeon 9200 128 MB PCI Video Adapter with it. Well, no go, as I got a blank screen. Much surfing the net later, I found that only the first two PCI-X slots (PCIX_SLOT5, PCIX_SLOT6) will allow a working video adapter. And so far, folks have only gotten the VisionTek X1550 Radeon Pci 256MB VGA Dvi-i Tv Out) to work on this box. I have not tried the PCI Express slots as yet. Original pain listed here, but an interesting story with somewhat satisfactory conclusion: http://forums.anandtech.com/messageview.aspx?catid=31&threadid=2080542 Last week, I bought the VisionTek; however, the ATI drivers have MANY issues on this box. Much more pain listed here: http://forums.fedoraforum.org/showthread.php?p=878133#post878133 Update 10/23/2007: I was successful in getting the BFG Geforce 8500 GT PCI Express 256MB to work in the box, with the caveat that a PCI Express 8x to 16x adapter (which raises the video card) must be used: http://www.orbitmicro.com/global/pciexpressx8tox16adapter-p-755.html http://crazedmuleproductions.blogspot.com/2007/10/nvidia-in-da-house-er-new-server.html Update 8/6/2008 Good Tom's article on the performance impact of using reduced number of PCI Express lanes with a 16x card: http://www.tomshardware.com/reviews/pci-express-2-0,1915-4.html Update 11/10/2007 In the opposite vein, a couple of us have had success taking a dremel to the 8x PCIe slot to make room for 16x graphics adapters. MarioM had success getting the Sapphire x1950GT 512mb card to work with his newly dremeled slot! Bolstered by Mario's success, I also dremeled SLOT3_PCIE with success (video coming). But for God's sake, BE CAREFUL if you attempt this! You can easily damage and/or otherwise FRY your motherboard if you slip up. Click on the comments below for the success stories. Finally, the video below shows a successful dremel job on the SC1430. Update 12/17/2007 Free2go had success using the PCI NVIDIA Quadio NVS vidso card in one of the PCI-X slots using 7.1.8.4 driver. Update 1/19/2008 BFG 8800GT confirmed as working in an SC1430 modded to accept 16x PCI Express adapter cards. Or just use a PCI Express 8x to 16x adapter that raises the video card in the slot: http://www.orbitmicro.com/global/pciexpressx8tox16adapter-p-755.html Update 2/13/2008 Pics of the BFG 8500GT in the box Update 7/9/2008 Sapphire Radeon HD 4850 confirmed as working in the box. Thanks Subbu! Update 2/9/2010 Ati hd4630 confirmed as working in the box. Thanks Daniele! Linux on the Dell SC1430 Update 10/12/2007: Fedora Core 6, x86_64 installed like a champ and is working well with the onboard video. Cinelerra is installed and running without issue. Love to see all eight cores busy through mpstat..yeah! /2007/10/multithreading-in-ffmpeg-and-mpstat.html Here's a link to compiling Cinelerra on FC6 X86_64: /2007/09/building-cinelerra-on-fc6-64-bit.html Fedora 7 also works in the box, but has the dreaded, Fedora 7 broken firewire stack. A workaround is listed at the bottom of the page here through the EZPlanetOne kernel patch: http://www.physics.wustl.edu/~alford/thinkpad/T23_F7.html This patch does work, as I've been running on Fedora 7 with the patch for about two months now. Fans The fans are somewhat loud on boot, but mellow to a comfortable, if not quiet, level after the system boots. Note that the fans will run high speed (ie, LOUD) if the case is open. Fun A little overclocker heaven: http://www.xtremesystems.org/forums/showthread.php?p=2427225 Update 1/21/2008 Finally tried the above FSB overclock. Suh-WHEET! Program to view temp/fan speed and to control at the bottom of this page: http://diefer.de/i8kfan/index.html Update 10/13/2007 As part of a longer tutorial on the layout of the SC1430 that I will release in the coming weeks, this is the goofy commercial that I made with Cinelerra about the SC1430: Update 11/11/2007 New video describing the SC1430 with emphasis on features, video cards and shows an example of dremeling the end off a PCI Express slot: Update 9/26/2009 Installed a 500GB SATA and Vista 64-bit Ultimate. Update 2/17/2010 Installed a Fedora 12 64-bit on a 4.5TB RAID5 set, courtesy of 3ware 9650SE and Western Digital: http://www.techanswerguy.com/2010/02/3ware-9650se-support-experience.html http://www.techanswerguy.com/2010/02/fedora-12-x86-64-first-impressions.html

Update 1/15/2022 Alas, this will be my final post about the trusty old Dell SC1430, as it went to Goodwill to be bought or recycled today. Many a video was edited or blog entry created on it. May your eternal rest be sweet, fair Dell!

'sodo

Friday, September 21, 2007

VMware Server: "You do not have permissions to perform this operation"

I was migrating an ESX VM back to VMserver and saw this error on startup:
"You do not have permissions to perform this operation"

The reason was because my .vmx config file for the VM was Read Only. You can change the attribute via Windows Explorer or the command line like so:

To show you the current attributes on the files, type:
attrib

To remove the read only attrib on a file, type:
attrib -r [filename]

Reading another post:
http://www.vmware.com/community/message.jspa?messageID=432486

I saw that other users saw the same message for a different reason. Their solution was to set the following parameters in the .vmx file for the VM:

> Enable "allVMMemoryLimit":
> prefvmx.useRecommendedLockedMemSize = "FALSE"
> Set to TRUE when value selected in UI matches
> prefered value. Set to FALSE otherwise.
>
> Set limit for all VMs to 1701MB:
> prefvmx.allVMMemoryLimit = "1701"
> Value selected in UI if it differs from prefered
> value.
>
> Allow most of memory to be swapped:
> prefvmx.minVmMemPct = "25"
> Set to 25, 50, or 100, depending on how much swapping
> you allow.

No promises on this one, but give those two options a try..
'sodo

Sunday, September 16, 2007

what's interesting about LinkedIn

This is a slightly different type of post that I normally write, as I've deviated from my normal specific technology rambling to give you my impressions of a social networking website called LinkedIn. The site is useful, as it may provide some direction for skilled individuals who want to reconnect with old work or school mates, beef up their resume in the hopes of getting new employment or just expand their horizons.

LinkedIn is exactly what the name implies: you create a user profile and based upon information you share, like education and jobs you've had, LinkedIn will find old friends and contacts for you. After entering your basic data, LI will pop up a list of possible contacts for you to invite to join your network. It was pretty amazing to see the vendor contacts I've worked with popup on the list of possible contacts list, simply because they had stated that they had worked for some of the same companies that I had. Or old friends who came up because they went to the same university during the same period I did and were also on LinkedIn.

This is the interesting thing about how LI creates your connections. LinkedIn matches people up by the firms they work(ed) for, the universities they attended and the companies they partnered with. It is the concept of six degrees of separation; ie, you are only six hops away from anyone in the world.

It is important to note that you can control who sees your info via the privacy settings, mainly by making your profile public or private.

If you've made your profile public, you can accept an invitation to link up from a person who has found you. Normally, the person who found you will have connections of their own. Going forward, you'll always see how a person on LinkedIn is connected to you by the degrees of separation that person is from you, as well as the total number of people in your extended network. Pretty cool.

Also, people who you are linked to can recommend you, thus adding value to your vita in case you're aiming to get a new job via LI. In addition, you can recommend service providers or be recommended as a service provider. Finally, you can add street cred for yourself by answering questions posed by other members on LinkedIn's Answers from Your Network section. The questions are generally related to the industry you're in.

As I'm exploring new opportunities in the NYC area that better suit my lifestyle (music/video/tech), I'm trying to beef up my own network in the next year. Good luck and see you on LinkedIn!

'sodo

Tuesday, September 11, 2007

capturing boot messages in Linux via serial console

Sometimes, messages scroll by the screen that are not captured in /var/log/messages. such as these ugly messages that appeared after I moved my FC6 installation over to a non-LVM partition:
[/sbin/fsck.vfat (1) -- /mnt/fat] fsck.vfat -a /dev/sda6
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
Wrong checksum for long file name "".
(Short name FSCK0000.REN may have changed without updating the long name)
Not auto-correcting this.
/dev/sda6: 425 files, 3557906/3864252 clusters


Ugly! (But keep reading for the solution to that particular error). And it is especially bad when the messages scroll by so fast that you can't write them down and have to reboot multiple times just to get the gist.

There is a solution, however. The solution is to view these messages via a serial console. A serial console is like being right at the computer, only the viewing of the boot process takes place over your computers' serial port.

Your server or workstation is not configured to use a serial console by default. The console can be enabled by configuring a few files and attaching a serial cable (or null modem cable) from another PC to the PC you want to monitor. Finally, you'll use a terminal program like HyperTerminal or (Putty) to establish the connection and view the boot messages.

Here is the short list of steps to enable a serial console:
1) Find and attach a suitable RS-232 (serial or null modem) cable from the serial port of the PC that will do the monitoring to the serial port on the PC that you want monitored
2) Edit the following files:
- /boot/grub/grub.conf or /etc/lilo.conf
- /etc/inittab
- /etc/securetty


3) Reboot

As the steps have been documented everywhere on the web, I've provided a list of the most well-written, easiest to follow articles below with links to more detail if you need it.

This is a very nice brief article with everything you need to know:
http://www.cpqlinux.com/serialconsole.html

Here's a short article on the configuration steps and a couple new tricks necessary to enable a serial console access:
http://www.vanemery.com/Linux/Serial/serial-console.html

Here's a very helpful, in-depth article on the subject:
http://www.linuxjournal.com/article/7206

Here's the granddaddy of all serial console docs, the HowTo:
http://tldp.org/HOWTO/Remote-Serial-Console-HOWTO/

So..what was the solution to that ugly message I saw while booting:
[/sbin/fsck.vfat (1) -- /mnt/fat] fsck.vfat -a /dev/sda6
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
Wrong checksum for long file name "".
(Short name FSCK0000.REN may have changed without updating the long name)
Not auto-correcting this.
/dev/sda6: 425 files, 3557906/3864252 clusters


Why, delete the file! Of course, you may have a file you can't delete. If so, since this is a FAT32 partition, I'd suggest you run chkdsk /f on the drive when in Windows. I'm not sure if you can do a chkdsk under Linux. I'll have to research this and get back to you.

Enjoy!
'sodo
Feel free to drop me a line or ask me a question.