Posts Tagged ‘UNIX’

openSuSE 10.2: the first ten minutes

Saturday, January 20th, 2007

I borrowed an openSuSE 10.2 DVD from Anton and finally got around to giving it a whirl. Here are my thoughts about it:

  • GRUB bootsplash and boot-up is very nice and swish; better than Ubuntu
  • installer is way behind the Ubuntu equivalent; there is too much choice and potential to go wrong
  • partition editor is a recipe for disaster; different disks aren’t clearly defined: it would be very easy for a newbie to nuke their disk by accident
  • the install went smoothly and the overall presentation of the OS is good
  • GNOME support is much improved over previous releases; it feels like less of an afterthought
  • I ended up with a CD-only application repository thanks to not having an uplink at install time. YaST2 sucks monkey balls; this is a real shame considering how great it used to be. The options are ambiguous and it took me a good amount of time to find out how to add a new YUM repository
  • What is YUM? What is ZEN? What is going on with the consistency in this operating system? There are two available tools to add/update repositories and whatnot. One of them crashed half-way through, and the other wanted me to insert a disc!
  • YUM is very slow, apt/deb is far superior
  • Installing nvidia drivers was more complicated than Ubuntu (I gave up)
  • The GNOME slab is very nice, not because it is better, but because it is good that people are thinking about things
  • Beagle (with the Firefox plugin) by default is good news for all
  • I didn’t get the 3D desktop stuff working
  • Nice to have some proprietary stuff included by default: Flash, etc.
  • My webcam wasn’t recognised (Ubuntu manages it)
  • Much improved integration between KDE and GNOME

    Overall I wasn’t impressed. Some things are definitely ahead of Ubuntu: the GRUB menu is one big thing that I think the Ubuntu guys need to concentrate on. It seems the Novell guys are spending more time with whiz-bang than they are on the fundamentals.

    Ubuntu, on the other hand, now have a very solid foundation and the next release (which won’t install on my machine right now (but it is an alpha)) should definitely help level things out.

    If you want desktop Linux: use Ubuntu.

Sun Ray course

Tuesday, January 16th, 2007

Last week Liam, James, Chris, Anton, Wilson and myself were all on a SunRay training course being held for OpenAnswers.  We were lucky enough to get the places in return for setting the conference room up with a whole pile of Ultra 60s, a few Ultra 10s and some SunRay 1s with attached monitors.

I had messed briefly with SunRays before the course (setting up SunRay@Home) and obviously we use and support these on a day-to-day basis.

I think that of us all it was just Chris and Anton who hadn’t quite gotten around to setting up a knock-off SunRay at home.  For those of us that had, the first day or two was very straightforward: it covered installing the packages, the very basic setup and initial setup of the DHCP server.

Beyond the first day or two a lot more useful things began to crop up: the full workings of failover groups, exactly how/what happens in multi-head and Xinerama setups (although I swear Sun haven’t quite got their definitions of multi-head and Xinerama the right way around) and fancy multi-failover groups on the same subnetwork.

All in all there was plenty of useful information, although much of it was in the form of “gap filling” and getting some actual hands-on experience.

I’ve got myself booked onto another training course starting this coming Monday morning.  I’ve opted to go for the Solaris System Performance Management (SA-400) course, which appears to cover plenty of really useful and interesting stuff.  I’m still desperate to get on the Solaris Internals course, but the big problem is finding enough other people wanting to attend.

Mac OS X: ZFS

Tuesday, December 19th, 2006

The latest OS X builds have ZFS support. This is brilliant stuff, but there are a few questions that I have about this:

  • Why isn’t ZFS the default FS? HSFS sucks monkey balls.
  • Can it do ZFS root?
  • Will they be introducing a good GUI in 10.6?
  • How about a decent kernel in 10.7?

    It’d also be interesting to see how Apple go about handling failed writes… a panic makes sense in the enterprise, but is it right for the desktop?

    To be honest… the way things are going, you have to wonder why Apple don’t make the sensible decision to bolt their proprietary GUI crap on top of a solid, proven system.  A system that introduced the world to DTrace and ZFS… Solaris.

bash programmable tab completion

Wednesday, September 20th, 2006

After reading about bash a bit more I decided to make the switch. It’s been surprisingly painless considering just how long I’ve been running tcsh more or less exclusively since I learned the joys of FreeBSD way back at version 4.1 (okay, so it’s not /that/ long ago).

The main incentive was to get that funky programmable tab completion working. Everybody all over the place should investigate whether or not it can be of use to them. What I’ve done is fairly simple—allowed bash to use a NIS+ lookup (via the nisgrep command) to provide the necessary information to drive tab completion.

For example, in our labs the host naming scheme is fairly straightforward: arch-type-no-geo. So a host might be: v4u-10-e-gmp03. That’s the fifth SPARC Ultra 10 in my building. Normally we ping this by typing the command out, but with my simple script we can tab complete. This isn’t a massive time-saver, but every little helps.

It’s also very handy to be able to do:

$ v4u-10[TAB][TAB]

to get a listing of all of the Ultra 10s we have in the lab.

At a later point in time I’d like to tie this in to our booking system and maybe allow more powerful completion in a similar way to bash’s history search (CTRL+R) to allow us to just type ping 10-e[TAB] to get ping v4u-10-e-gmp03.

A word of warning: don’t forget to update tcsh’s ASCI escape sequences to the bash-style ones. I had an annoying cursor wrap that was driving me crazy for about a week until I bothered to fix it.

Event-driven ZFS

Wednesday, September 20th, 2006

It’s about time I created a Sun and/or Work category for filing entries. This is only a quick entry for now as it’s not something I’ve got beyond the very basics with.

I’ve been trying my best to keep up with the good stuff that Chris Gerhard has been doing with his new home server. He’s got some cool ZFS stuff going with cron jobs taking some seriously frequent snapshots (every five minutes!).

A while back Jarod Nash (who has no blog entries) was talking to us about all of the stages involved in writing “Hello, world!” in vi to actually running it (i.e. terminals, editors, compiling, linking, executing, etc.). As part of this we got talking about Apple’s new Time Machine, which allows the end user to easily recover previously-deleted data. Jarod mentioned how the technology behind this was technically not great (when compared to Solaris’ ZFS) but the UI was. Interestingly it’s also an event-driven model and likely has some userland daemon running to handle events and create copies of deleted items.

Now there’s no way that I could even hope to write a great GUI for ZFS, but I did wonder to myself how I might go about making it work in an event-driven way. Fortunately Chris did a presentation on ZFS to us and I got the chance to bring this up—the answer, he believes, is to use DTrace.

I brought a blank DVD-R into work today and pulled down Nevada build 48, which I’ll install under vmware shortly. My aim is to create a simple slice to test ZFS with. It doesn’t need to be more than a pool with a single volume. With this I’m hoping to write some very very (I can’t stress that enough) DTrace scripts to prove that what Chris and Jarod have suggested will work.

The idea is basically to use DTrace to trap the open(2) syscall, check the flags (i.e. open for reading) and have ZFS create a snapshot at that instance. This all seemed great to me, but Tim Uglow and Matt Finch at this point decided to rock my boat by complicated things with mmapped IO, vnode pages and all sorts of other things I don’t understand and can’t hope to without doing some serious reading and researching. So the point really is that there’s no way in hell this would be useful for anything other than a test…

More updates to come when I’ve actually done something (expect failure ;).

Edit: I just realised I didn’t really explain the whole point of this. It’s really very simple: to do away with cron jobs that create unnecessary snapshots, and have the system create them as and when required (e.g. when a file is created, deleted, modified).

ZFS

Friday, August 25th, 2006

I’ve just been talking to Chris Gerhard who is one of the high-level engineers that work in the same area as us. The conversation started with Mooktakim’s idea to use an E450 as a storage server, but then shifted towards Solaris’ big new feature: ZFS.

ZFS is now available in the latest Solaris 10 update (u2), which was released recently. I overheard a conversation he was having a while ago about why using ZFS with hardware RAID controllers was bad, and decided to chase this up. The reason hardware RAID won’t work well with ZFS is because a hardware RAID controller hides faults from ZFS (i.e. ZFS doesn’t know that there is an error on one disk, or when a disk has failed). This is straightforward enough, but I was confused as to how ZFS performance could ever be close to a hardware solution.

The answer, it turns out, is that ZFS benefits greatly from a hardware RAID controller with plenty of cache—one of the answers is to use the expensive hardware controller to present the disks to Solaris as JBOD, but at the same time leaving the cache enabled. This is an all-round win: the expensive investment is still used, the performance is retained and the data integrity is even better protected thanks to ZFS’ copy-on-write architecture.

CPU speeds have massively outstripped disk speeds, so using compression also provides all-round benefits: in many cases it is now faster to read a smaller amount of data and uncompress it than it is to read all of the uncompressed data direct from the disk.

ChrisG suggested that soon it will be beneficial for Solaris to have a single partition/slice for the whole OS. This includes even swap, which will also be able to benefit from the improved integrity.

It’s also fairly interesting to note that because of the copy-on-write design of ZFS, snapshots and clones are “free”. It also means that ZFS performs faster with a snapshot than without.

Cool stuff for sure. Looks like tonight will be install Solaris on laptop and desktop day. Good job Solaris has great netinstall support!

fatsort

Wednesday, August 9th, 2006

The iRiver UMS (USB Mass Storage) firmware for my MP3 player allows me to copy songs to/from it as though it were a regular USB memory stick. It’s great that iRiver decided to make one, but annoyingly the player displays the files in the order they were uploaded. Sometimes weird things happen when you’re uploading a whole album and you get the songs in a totally random order (when you want them in order).

Enter fatsort. In less than a second it updates the FAT to order all of the filenames properly. Works perfectly and leaves me with one less thing to worry about :)

SunRay hot desking and Gaim away

Sunday, August 6th, 2006

On Friday James had an interesting idea about setting the away status of Gaim, the default GNOME (and therefore Java Desktop System (JDS)) IM client, based on insert/remove actions of the SunBadge many Sun employees use to access their remote X sessions.

SunRay software and hardware is pretty great stuff and works on the concept of tying a token card (SunBadge) to an X session. The first time you use the card you log in on a thin client with a standard username/password to create a persistent session on a central server, which is then associated with the token card. On removal of the card the thin client becomes free for anybody else to use while the session remains active on the central server. Next time you need your desktop back, you simply insert the token card in a free client and pick up where you left off. In more advanced setups the software can be configured to allow “hot desking” between networks or regions (i.e. connecting to a session running in England from a thin client in Japan (Sun call this “regional hot desking”)).

After a little thought it became clear that all of the elements existed to implement an auto-away as described earlier. Gaim can be extended by writing plug-ins that have access to a powerful API and SunRay sessions can be “extended” using utaction to execute code on session connection and disconnection.

Perl plugin support was broken in my Gaim build and I was uanble to get the GaimAccountSetStatus Gaim D-Bus call to work properly so I turned to #gaim on Freenode and was directed towards gaim-remote.pl, which had helpfully been excluded from my Gaim installation. Using one simple command I can change the state of all Gaim accounts, in this example to the Away state with a helpful message:

gaim-remote.py setstatus?status=away&message="I am not currently connected to a SunRay"

Tying this command into utaction is very straightforward:

utaction -c 'gaim-remote.py setstatus?status=available' -d 'gaim-remote.py setstatus?status=away\&message="I am not currently connected to a SunRay"' -t 30 &

Here it’s easy to see that -c is the command to run on connection, -d the command on disconnection and -t is used to specify a timeout after (dis)connection before the command is executed. I added 30s here because it is common for us to let another user very quickly use our SunRay client, during which time we are not really “away”.

I see no reason why this won’t work as-is, but without having had chance to test it, I can’t say for sure. What does annoy me a little is that the SunRay server software provides no clean way of allowing a user to specify a connect/disconnect script that persists between sessions (i.e. if the central server is restarted or I manually log out for any reason). It’s not a massive problem, but adding the utaction command to GNOME’s Startup Programs is not the end of the world.

lftp

Wednesday, March 8th, 2006

I have discovered lftp... it is the best command line FTP client I have ever used.

This evening

Thursday, February 9th, 2006

I’m feeling most refereshed after an early night (10:30pm) last night. I didn’t get up particularly early, but that doesn’t matter.

This evening I have a number of tasks I must complete:

  1. Compile this fangled new Xgl server and compiz. Get it working on my desktop and laptop. Play with eyecandy for a little bit, before getting bored and declaring the whole thing as a useless waste of time and crap.
  2. Finally bother to make this photoblog I mentioned a few days ago… after sampling all sorts of existing software, I can safely say that no such software exists that meets my exact needs. My wotsit will use a database, will have a very simple design and shall support some taxonomy stuff for good luck. Maybe I’ll expand the taxonomic classification to provide a sort of ad-hoc gallery.
  3. Get something to eat
  1. Go to bed (well, maybe that can be tomorrow morning)

    Tomorrow lots of exciting things are happening. CompSoc’s fangled new printer stuff should turn up… this includes a Lyson continuous printing system, ink and some fancy archival paper to go with the rest of it. I’ll stay in bed while this happens, as Vlad will thoroughly enjoy setting it all up. I’ll go to some lectures, then go to Kro bar for the weekly “show and tell” (aka “sitting about in the pub chatting”) session, before going to see a film (maybe) and then going to take some crappy photos with a tripod (I’ve got one, but I hate using it) around the printworks with some other guys.

    It’s all GO GO GO in the land of Lewis. (haha, a land of me would be ace)