Archive

Archive for the ‘Computing’ Category

Installing the Perl DBD::Oracle on SPARC/Solaris 10

June 4th, 2010 beezly 2 comments

Installing the Perl DBD::Oracle driver on Solaris is traditionally a complete ballache. I hate most things about Oracle software packaging and installation instructions, so I thought I’d get my own instructions going.

So here goes;

Compilers

Start by ensuring you have Solaris 10, patched up to date. First thing we need is a compiler, so take yourself off to http://developers.sun.com/sunstudio/ and get them installed. Once you have done that you should be able to run “versions” and get something like this;


[root@cisapplive /]# version
Machine hardware:   sun4u
OS version:         5.10
Processor type:     sparc
Hardware:           SUNW,SPARC-Enterprise

The following components are installed on your system:

Sun Studio 12 update 1
        Sun Studio 12 update 1 C Compiler
        Sun Studio 12 update 1 C++ Compiler
        Sun Studio 12 update 1 Tools.h++ 7.1
        Sun Studio 12 update 1 C++ Standard 64-bit Class Library
        Sun Studio 12 update 1 Garbage Collector
        Sun Studio 12 update 1 Fortran 95
        Sun Studio 12 update 1 Debugging Tools (including dbx)
        Sun Studio 12 update 1 IDE
        Sun Studio 12 update 1 Performance Analyzer (including collect, ...)
        Sun Studio 12 update 1 Performance Library
        Sun Studio 12 update 1 Scalapack
        Sun Studio 12 update 1 LockLint
        Sun Studio 12 update 1 Building Software (including dmake)
        Sun Studio 12 update 1 Documentation Set
        Sun Studio 12 update 1 /usr symbolic links and GNOME menu item

version of "/opt/sunstudio12.1/bin/../prod/bin/../../bin/cc": Sun C 5.10 SunOS_sparc 2009/06/03
version of "/opt/sunstudio12.1/bin/../prod/bin/../../bin/CC": Sun C++ 5.10 SunOS_sparc 2009/06/03
version of "/opt/sunstudio12.1/bin/../prod/bin/../../bin/f90": Sun Fortran 95 8.4 SunOS_sparc 2009/06/03
version of "/opt/sunstudio12.1/bin/../prod/bin/../../bin/dbx": Sun DBX Debugger 7.7 SunOS_sparc 2009/06/03
version of "/opt/sunstudio12.1/bin/../prod/bin/../../bin/analyzer": Sun Analyzer 7.7 SunOS_sparc 2009/06/03
version of "/opt/sunstudio12.1/bin/../prod/bin/../../bin/dmake": Sun Distributed Make 7.9 SunOS_sparc 2009/06/03

Oracle Instant Client

Get the 32-bit SPARC Instant Client from http://www.oracle.com/technology/software/tech/oci/instantclient/index.html. Get the 32bit version even if you Solaris install is 64-bit (on SPARC, this doesn’t apply on x86-64). Your perl install is 32-bit (don’t believe me? Use file /usr/bin/perl to show you) and you need the 32 bit drivers.

You need the sqlplus, basic and sdk files from the Oracle site.

Extract the zip files into a directory. I put mine in /opt/instantclient. Then ensure your link loader knows where to find the libraries. You can use LD_LIBRARY_PATH although I generally don’t like that method and prefer to use crle instead.

crle -l /lib:/usr/lib:/opt/instantclient

Updating CPAN

The default install of CPAN on Solaris 10 has loads of out-dated modules. Fortunately, it is very easy to update them to current versions. You can start the CPAN shell by running (as root) perl -MCPAN -e shell.

The very first time you use CPAN it will ask you a lot of config questions. One thing I would strongly suggest doing is using gtar instead of the default Solaris tar. The default tar appears to have been written about the same time as Noah built the Ark and as such doesn’t support quite a few of the options modern tar files use (include the CPAN tar file which gets downloaded). Once you have finished answering the questions, you should be presented with a CPAN shell, where you can run;

install Bundle::CPAN

This will update CPAN and all the related modules. Answer “yes” to any questions it gives you and once it has completely finished use reload cpan to get it to refresh itself.

Installing DBD::Oracle

This is the last step. At the CPAN shell, use get DBD::Oracle to download the Oracle DBD interface and then make DBD::Oracle to build it. I do this as separate tests because it is very likely that the make test phase of the install will fail. Assuming that the compile is successful use force install DBD::Oracle to install the Oracle driver. The test-suite is very thorough and goes as far as checking for connectivity to a test database and the ability to perform operations on a test database (hence why I said it is likely to fail). Once the install phase is finished, you are done.

Categories: Computing, work Tags:

Getting VMware Workstation 6.5 to work on AMD64 Ubuntu 9.04

February 13th, 2009 beezly No comments

If you get a segfault when trying to start vmware on Ubuntu 9.04 (Jaunty Jackalope) you can fix the problem by moving /usr/lib/vmware/modules/binary to somewhere else (binary.old) will do.

The included 64 bit binaries cause vmware to segfault when starting up.

Good luck!

Categories: Computing Tags: , , ,

Encyclopedia Britannica’s rant on Wikipedia

January 22nd, 2009 beezly 1 comment

From the SMH article:

“If I were to be the CEO of Google or the founders of Google I would be very [displeased] that the best search engine in the world continues to provide as a first link, Wikipedia,” he said.”Is this the best they can do? Is this the best that [their] algorithm can do?”

I can’t think of an occasion where Google has returned a Wikipedia entry for a query and that Wikipedia entry hasn’t been totally relevant and detailed.

Besides, the contest for detail, freshness, accessibility and usability Wikipedia wins hands down; compare the Encyclopedia Britannica and Wikipedia articles on Alcohol. EB weighs in at roughly 500 words, WP at roughly 3500. Another interesting comparison: the EB article about Wikipedia weighs in at roughly 900 words, the WP article about Encyclopaedia Britannica, 7600 words.

How many people aware of the “state of the art” can readily contribute to EB? Not many. Anyone can contribute to Wikipedia. Not that Wikipedia doesn’t have it’s faults, of course. On the other hand EB isn’t always correct either.

Oh yeah – and to get proper access to Encyclopaedia Britannica, you have to pay fifty quid a year. No thanks.

Categories: Computing, Life Tags: ,

Fixing Comment Counts in WordPress

September 27th, 2007 beezly No comments

As I’ve just migrated to using WordPress for my blog, I thought I’d add some useful information in my first post.

WordPress caches comment counts for each individual article in wp_posts.comment_count. If for some reason these cached values don’t match up to the real comment counts per article, you can fix this using the following SQL. This applies to WordPress 2.3. I don’t know if it will work for anything else.

UPDATE wp_posts
  SET comment_count = (
   SELECT COUNT(*)
     FROM wp_comments
     WHERE wp_posts.ID=wp_comments.comment_post_id
     GROUP BY wp_comments.comment_post_id
   );
Categories: Computing Tags: ,

Bad user…

September 20th, 2007 beezly No comments
# uptime

  2:05pm  up 49 day(s), 20:17,  45 users,  load average: 7938.89, 5199.82, 1657.09
Categories: Computing Tags:

A few months on…

August 9th, 2007 beezly No comments

It’s been a few months since I bought my Mac now. It’s really become my main operating system at work and I use it fairly frequently at home, so I thought I’d list a few of the applications I’m using frequently:

  • iTerm – iterm.sourceforge.net.

    An enhanced terminal application. I was used to gnome-terminal on Linux and the tabbed window feature was something I missed in the Apple supplied Terminal. One minor gripe was some broken keyboard mappings, but I fixed that.

  • VMware Fusion – vmware.com/products/fusion.

    Basically this is VMware Workstation for Macs. The Unity feature is excellent, allowing me to embed Windows applications on to my OS X desktop without having to have an entire Windows desktop running in a window. My main requirement for this is to run Linux and also for Windows XP (my work use Microsoft Live Communication Server – Windows Messenger is the only client that I can use to talk to it and the Mac version doesn’t seem to work). I’ve always been really impressed with VMware’s products and Fusion also excels.

  • MacFUSE – code.google.com/p/macfuse.

    FUSE for Macintosh. It allows me to mount filesystems on machines just using SSH. Another great piece of software which I was used to from Linux.

  • Azureus – azureus.sourceforge.net.

    A cross-platform Java BitTorrent client. I’m not too keen on what they are doing with v3, but v2.5 is ok. I’ve also been using Transmission – tranmission.m0k.org, although sometimes it doesn’t have some features that I want to use.

  • VirtueDesktops – virtuedesktops.org.

    Virtual Desktops for OSX. If you used Virtual Desktops before you’ll find this to be a really nice implementation with some clever features that allow you to use the tilt and light sensors to change desktops (although they’re more of a gimmick than anything else). Development of VirtueDesktops has stopped as it is about to be out-moded by the inclusion of a Virtual Desktop feature ( Spaces) in the next release of Mac OSX. Until then, VirtueDesktops is great.

  • Firefox – getfirefox.com.

    The best web browser out there for my purposes.

  • MissingSync for Palm OS – www.markspace.com/missingsync_palmos.php

    Decent synchronisation for my Treo 680 phone.

  • SpanningSync – spanningsync.com.

    Synchronises my iCal Calendars with Google Calendar. I’m not usually that keen on “Subscription Software”, but this application seems to work reliably.

Categories: Computing Tags:

It’s Alive!!

December 9th, 2004 beezly 11 comments

Well, I finally got Gold, my “borrowed” E4500 running last night. 14 CPUS and 4.5GB of RAM. It has two dodgy memory banks which it has disabled, but that still leaves it with 4.3GB.

Here’s some of the output it churns out as it turns on…

{0} ok boot /sbus@3,0/SUNW,fas@3,8800000/sd@9,0
Boot device: /sbus@3,0/SUNW,fas@3,8800000/sd@9,0  File and args:
SILO Version 1.4.8
boot:
Allocated 8 Megs of memory at 0x40000000 for kernel
Uncompressing image...
Loaded kernel version 2.4.27
Loading initial ramdisk (3391488 bytes at 0xC00000 phys, 0x40C00000 virt)...
\
Remapping the kernel... done.
Booting Linux...
Starting CPU 1... OK
Starting CPU 4... OK
Starting CPU 5... OK
Starting CPU 6... OK
Starting CPU 7... OK
Starting CPU 8... OK
Starting CPU 9... OK
Starting CPU 10... OK
Starting CPU 11... OK
Starting CPU 12... OK
Starting CPU 13... OK
Starting CPU 14... OK
Starting CPU 15... OK
PROMLIB: Sun IEEE Boot Prom 3.2.28 2000/12/20 12:24
Linux version 2.4.27-1-sparc64-smp (joshk@fortissimo.triplehelix.org) (gcc vers4ARCH: SUN4U
Ethernet address: 08:00:20:93:5b:a3
On node 0 totalpages: 587863
zone(0): 589445 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Found CPU 0 (node=f0070074,mid=0)
Found CPU 1 (node=f0070434,mid=1)
Found CPU 2 (node=f0150054,mid=4)
Found CPU 3 (node=f0150414,mid=5)
Found CPU 4 (node=f01c0050,mid=6)
Found CPU 5 (node=f01c0410,mid=7)
Found CPU 6 (node=f0230050,mid=8)
Found CPU 7 (node=f0230410,mid=9)
Found CPU 8 (node=f02a0050,mid=10)
Found CPU 9 (node=f02a0410,mid=11)
Found CPU 10 (node=f0310054,mid=12)
Found CPU 11 (node=f0310414,mid=13)
Found CPU 12 (node=f0380050,mid=14)
Found CPU 13 (node=f0380410,mid=15)
Found 14 CPU prom device tree node(s).
CENTRAL: Detected 8 slot Enterprise system. cfreg[a8] cver[7c]
FHC(board 1): Version[1] PartID[fa0] Manuf[3e] (CENTRAL)
FHC(board 0): Version[1] PartID[fa0] Manuf[3e] (JTAG Master)
FHC(board 2): Version[1] PartID[fa0] Manuf[3e]
FHC(board 3): Version[1] PartID[fa0] Manuf[3e]
FHC(board 4): Version[1] PartID[fa0] Manuf[3e]
FHC(board 5): Version[1] PartID[fa0] Manuf[3e]
FHC(board 6): Version[1] PartID[fa0] Manuf[3e]
FHC(board 7): Version[1] PartID[fa0] Manuf[3e]
FHC(board 1): Version[1] PartID[fa0] Manuf[3e]
Kernel command line: root=/dev/sda2 ro
Calibrating delay loop... 671.74 BogoMIPS
Memory: 4647480k available (2008k kernel code, 304k data, 168k init) [fffff8000]Dentry cache hash table entries: 262144 (order: 9, 4194304 bytes)
Inode cache hash table entries: 262144 (order: 9, 4194304 bytes)
Mount cache hash table entries: 512 (order: 0, 8192 bytes)
Buffer cache hash table entries: 524288 (order: 9, 4194304 bytes)
Page-cache hash table entries: 524288 (order: 9, 4194304 bytes)
POSIX conformance testing by UNIFIX
Entering UltraSMPenguin Mode...
Calibrating delay loop... 671.74 BogoMIPS
Calibrating delay loop... 671.74 BogoMIPS
Calibrating delay loop... 671.74 BogoMIPS
Calibrating delay loop... 671.74 BogoMIPS
Calibrating delay loop... 671.74 BogoMIPS
Calibrating delay loop... 671.74 BogoMIPS
Calibrating delay loop... 671.74 BogoMIPS
Calibrating delay loop... 671.74 BogoMIPS
Calibrating delay loop... 671.74 BogoMIPS
Calibrating delay loop... 671.74 BogoMIPS
Calibrating delay loop... 671.74 BogoMIPS
Calibrating delay loop... 671.74 BogoMIPS
Calibrating delay loop... 671.74 BogoMIPS
Total of 14 processors activated (9404.41 BogoMIPS).
CPU 1: synchronized TICK with master CPU (last diff -9 cycles,maxerr 676 cycles)CPU 4: synchronized TICK with master CPU (last diff -14 cycles,maxerr 692 cycle)CPU 5: synchronized TICK with master CPU (last diff -13 cycles,maxerr 692 cycle)CPU 6: synchronized TICK with master CPU (last diff -13 cycles,maxerr 692 cycle)CPU 7: synchronized TICK with master CPU (last diff -12 cycles,maxerr 692 cycle)CPU 8: synchronized TICK with master CPU (last diff -10 cycles,maxerr 690 cycle)CPU 9: synchronized TICK with master CPU (last diff -13 cycles,maxerr 692 cycle)CPU 10: synchronized TICK with master CPU (last diff -13 cycles,maxerr 692 cycl)CPU 11: synchronized TICK with master CPU (last diff -12 cycles,maxerr 692 cycl)CPU 12: synchronized TICK with master CPU (last diff -14 cycles,maxerr 692 cycl)CPU 13: synchronized TICK with master CPU (last diff -13 cycles,maxerr 692 cycl)CPU 14: synchronized TICK with master CPU (last diff -14 cycles,maxerr 692 cycl)CPU 15: synchronized TICK with master CPU (last diff -13 cycles,maxerr 692 cycl)Waiting on wait_init_idle (map = 0xfff2)
All processors have done init_idle
PCI: Probing for controllers.
SYSIO: UPA portID 2, at 000001c400000000
sbus0: Clock 25.0 MHz
dma0: HME DVMA gate array
SYSIO: UPA portID 3, at 000001c600000000
sbus1: Clock 25.0 MHz
dma1: HME DVMA gate array
Sparc Zilog8530 serial driver version 1.68.2.2
Sun Mouse-Systems mouse driver version 1.00
tty00 at 0xf8902004 (irq = 12,b9) is a Zilog8530
tty01 at 0xf8902000 (irq = 12,b9) is a Zilog8530
tty02 at 0xf8904004 (irq = 12,b9) is a Zilog8530
tty03 at 0xf8904000 (irq = 12,b9) is a Zilog8530
keyboard: not present
Console: ttyS0 (Zilog8530)
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
VFS: Disk quotas vdquot_6.5.1
devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x0
pty: 256 Unix98 ptys configured
rtc_init: no PC rtc found
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
Uniform Multi-Platform E-IDE driver Revision: 7.00beta4-2.4
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
usb.c: registered new driver usbmouse
usbmouse.c: v1.6:USB HID Boot Protocol mouse driver
usb.c: registered new driver usbkbd
usbkbd.c: :USB HID Boot Protocol keyboard driver
mice: PS/2 mouse device common for all mice
Initializing Cryptographic API
NET4: Linux TCP/IP 1.0 for NET4.0
IP: routing cache hash table of 65536 buckets, 1024Kbytes
TCP: Hash tables configured (established 262144 bind 65536)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
RAMDISK: cramfs filesystem found at block 0
RAMDISK: Loading 3312 blocks [1 disk] into ram disk... done.
Freeing initrd memory: 3312k freed
VFS: Mounted root (cramfs filesystem).
Unimplemented SPARC system call 188
Unimplemented SPARC system call 188
Unimplemented SPARC system call 188
Unimplemented SPARC system call 188
ll 188-tools:Un 0implem.ented SP1.ARC sy7stem ca4

Unimplemented SPARC system call 188
SCSI subsystem driver Revision: 1.00
esp0: IRQ 7,8b SCSI ID 7 Clk 40MHz CCYC=25000 CCF=8 TOut 167 NCR53C9XF(espfast)
esp1: IRQ 7,db SCSI ID 7 Clk 40MHz CCYC=25000 CCF=8 TOut 167 NCR53C9XF(espfast)
ESP: Total of 2 ESP hosts found, 2 actually in use.
scsi0 : Sparc ESP366-HME
scsi1 : Sparc ESP366-HME
  Vendor: HP        Model: C1537A            Rev: L610
  Type:   Sequential-Access                  ANSI SCSI revision: 02
  Vendor: TOSHIBA   Model: XM6201TASUN32XCD  Rev: 1103
  Type:   CD-ROM                             ANSI SCSI revision: 02
  Vendor: SEAGATE   Model: ST336605LSUN36G   Rev: 0238
  Type:   Direct-Access                      ANSI SCSI revision: 03
  Vendor: FUJITSU   Model: MAJ3364M SUN36G   Rev: 0503
  Type:   Direct-Access                      ANSI SCSI revision: 02
  Vendor: FUJITSU   Model: MAJ3364M SUN36G   Rev: 0503
  Type:   Direct-Access                      ANSI SCSI revision: 02
  Vendor: SEAGATE   Model: ST336605LSUN36G   Rev: 0238
  Type:   Direct-Access                      ANSI SCSI revision: 03
  Vendor: FUJITSU   Model: MAJ3364M SUN36G   Rev: 0503
  Type:   Direct-Access                      ANSI SCSI revision: 02
  Vendor: FUJITSU   Model: MAJ3364M SUN36G   Rev: 0503
  Type:   Direct-Access                      ANSI SCSI revision: 02
Attached scsi disk sda at scsi1, channel 0, id 9, lun 0
Attached scsi disk sdb at scsi1, channel 0, id 10, lun 0
Attached scsi disk sdc at scsi1, channel 0, id 11, lun 0
Attached scsi disk sdd at scsi1, channel 0, id 12, lun 0
Attached scsi disk sde at scsi1, channel 0, id 13, lun 0
Attached scsi disk sdf at scsi1, channel 0, id 14, lun 0
esp1: target 9 [period 100ns offset 15 20.00MHz FAST-WIDE SCSI-II]
SCSI device sda: 71132959 512-byte hdwr sectors (36420 MB)
Partition check:
 /dev/scsi/host1/bus0/target9/lun0: p1 p2 p3 p4
esp1: target 10 [period 100ns offset 15 20.00MHz FAST-WIDE SCSI-II]
SCSI device sdb: 71132959 512-byte hdwr sectors (36420 MB)
 /dev/scsi/host1/bus0/target10/lun0: p1
esp1: target 11 [period 100ns offset 15 20.00MHz FAST-WIDE SCSI-II]
SCSI device sdc: 71132959 512-byte hdwr sectors (36420 MB)
 /dev/scsi/host1/bus0/target11/lun0: p1
esp1: target 12 [period 100ns offset 15 20.00MHz FAST-WIDE SCSI-II]
SCSI device sdd: 71132959 512-byte hdwr sectors (36420 MB)
 /dev/scsi/host1/bus0/target12/lun0:Dev sd(8,48) Sun disklabel: Csum bad, labeld unknown partition table
esp1: target 13 [period 100ns offset 15 20.00MHz FAST-WIDE SCSI-II]
SCSI device sde: 71132959 512-byte hdwr sectors (36420 MB)
 /dev/scsi/host1/bus0/target13/lun0: p1
esp1: target 14 [period 100ns offset 15 20.00MHz FAST-WIDE SCSI-II]
SCSI device sdf: 71132959 512-byte hdwr sectors (36420 MB)
 /dev/scsi/host1/bus0/target14/lun0: p1
Journalled Block Device driver loaded
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
INIT: version 2.86 booting
Categories: Computing Tags: