Silly networker error message

This has been bugging me for a while.  Every so often after I get a waiting for tape message which is then handeled it get

NetWorker media request: (critical) Waiting for 0 writable volume(s) to backup pool ‘Daily’ tape on <server name>

Huh?  I suppose strictly I should go and remove all writable volumes(s) from the pool :D

January 8, 2012 · robert · No Comments
Posted in: bugs, Work / Microsoft

Momentus XT & Linux – No more stuttering!

A while back I got a new HD for my laptop – a Momentus XT. While I haven’t been entirely happy with it – overall it was much improved on the standard laptop hd I had. Load times where quick and a restart no longer meant making a cup of tea.

Recently I’ve been doing some video editing an really started to struggle. For some reason in everything but totem video playback sucked big time. Its was struggling to load the content of the HD and would playback 5 seconds, pause 2, playback 5.

Anyway I decided to try optimise my set-up as if it was an SSD (after all there is 4gb worth of SSD on it). And I’ve got to say big improvement! Video playback is now seamless in all applications. The biggest difference was changing the elevator setting to noop.

If you want to try it see http://opentechnow.blogspot.com/2010/02/linux-ssd-optimization-guide.html for a guide

Update: Still seem to have some issues when launching mplayer by click on a file, but if I run it from command line it seems fine. I also get the same issue with dvbcut. However the noop change does make things run a lot smother than before

Update 2:  Gnome Media player doesn’t suffer from this issue – you may just want to use that instead!

November 6, 2011 · robert · No Comments
Tags: , , , ,  Â· Posted in: Hardware, Linux

AutoIT: _WordDocFindReplace in TextBox + Disable Macros

The Default _WordDocFindReplace only works with pretty standard word documents (It’s more the fault of the way VBA’s find function work the word.au3). However thanks to a few VBA samples on the web I’ve managed to come up with some code to get around this issue.

First do your normal find & replace to catch anything in the “normal” layout section. The following code example can then be used to search though each textbox in turn:

1
2
3
4
5
For $j = 1 To $oDoc.Shapes.Count ;For 1 to total number of textboxes
	$oDoc.Shapes($j).Select ;Select Text box $j
	$oDoc.Application.Selection.WholeStory ;Select content of textbox
	$oFind = _WordDocFindReplace($oDoc, "01924", "xxxxxx",2,-1) ;Find in current selection
Next

And yes $oDoc.Application.Selection.WholeStory is real! It selects the content inside the text box. The -1 parameter of the _WordDocFindReplace tells it to search just the current select. Using 0 will cause _WordDocFindReplace to select all the normal content and search that, ignoring the textbox

As for disabling Macro’s (for example if you want to stop any automatic macros from firing when open a document) you can use:

1
2
$AutomationSecurity=$oWordApp.Application.AutomationSecurity ;Save Settings
$oWordApp.Application.AutomationSecurity=3 ;Disable Macros

To restore the settings use

1
$oWordApp.Application.AutomationSecurity=$AutomationSecurity

Hope someone out there finds this useful.

July 22, 2011 · robert · No Comments
Tags: , ,  Â· Posted in: Howtos, Work / Microsoft

Ubuntu 10.04 and cupsaddsmb

It seems on my setup cupsaddsmb doesn’t work out of the box (even once drivers are added) the missing finial steps (for my setup is)

  1. Setup Administrators group
    sudo net sam createbuiltingroup Administrators
    sudo net sam addmem Administrators "domain\Domain Admins"
    sudo net sam addmem Administrators "localhost\administrator"
  2. Setup driver push
    sudo chgrp admin /var/lib/samba/printers
    cupsaddsmb -U "localhost\administrator" -a -v

October 8, 2010 · robert · Comments Closed
Tags: , ,  Â· Posted in: Howtos, Ubuntu

Time for Change

(And I mean real change).

I’ve know for some years our political system is in trouble. With the election of Tony Blair (although previous PM’s did pave the way) the position of Prime Minister seems to be more and more presidential. This wouldn’t necessarily be a bad thing if we had a system designed around a president, but we don’t.

It seems far too often important bills are drawn up in secret meeting (although to be honest most of the times they ain’t that secret) in No 10, with the occasional deal done with the leader of the opposition. Its still goes through he parliamentary procedure but with the use of whips and “timetabling” the parliamentary procedure is just done for show boating – a bit of theatre if you like. You get the feeling they only go though the process as they have to.

The Digital Economy Bill was a great example of this. Both the second and third readings allowed next to no time to discuss the bill. In the third reading hardly any of the bill got discussed, and that’s with amendments been dropped to allow more to be covered. It completely ludicrous that this situation is allowed to occur, and that none of the main parties seem to be willing to do anything about it. We may as well do away with the house of commons if this is the case. I mean the only time its seems to be full is PMQ, and that’s just a slanging match, with some pre-staged questions either designed to embarrass the government or to allow them to boast.

As for the election – well its not looking good. So far it seems to be about one party saying boo hiss look how bad the other party is – we’ll be betters. You get statements from them saying that x will or won’t do y. Well to be honest I don’t care. I don’t believe you when you say that and anyway I’ll find that out for myself. What I want to hear is what you will do and what you want do (and possibly why).

In case anyone of interest does happen to read this – here’s some idea in what I’m looking for in a candidate (in no particular order):

  • No more PFI. Its cheaper for Government to borrow, so what’s the point in PFI?
  • Parliamentary process reform – allow proper time for discussion, public consultation etc. Exepect in the case of emergency allow a week to pass between each stage. Ban the use of whips*
  • Expense reforms – pay raises for key members to bring them in line with reasonable industry and public sector roles. Clamp down on misuse of expense, and expense privileges not allowed to anyone else (IE claiming for accountants etc).
  • Limited public sector pay rise until economy picks up – say max ~£500 to help balance the pay gap
  • Commitment to more use of free and open source software, including ensuring no public services are limited to only MS and Apple systems
  • Removal of the Digital Economy bill and start work on a new one
  • Appoint Tom Watson as Digital Tzar
  • EU – Put serious work and effort into making the EU more democratic and aim for actually sorting out the issues with the EU finance so that the auditors will actually sign it off for once
  • Pubs – Tackle the tied system. It doesn’t work and is in desperate need of reform.
  • Science – Seriously increase funding for science including education.
  • BBC – Keep 6 Music etc and cut the real wastes of money. Stop pandering to Murdoch
  • Patents – NO SOFTWARE PATENTS
  • Copyright – Reduce the copyright length down to something more reasonable, introduce a fair use law
  • Environment – Increase recycling and attempt to stamp out the current trend of electronic items been consumables. Decrease out dependence on oil to minimise the effect of ‘peak oil’
  • Planning Reforms – To stop the bully and bribing big business use to get things past.
  • Increase funding for Rail Infrastructure and new trains.
  • Remove crown copy right and replace with laws on fair reporting and quoting for newspapers etc
  • Libel Law – Stop Libel Tourism and allow a right for free publication of science papers and comments
  • Whistle-blowers – Clap down on the abuse most whistle-blowers experience after there actions have become know.

There probably lots of other things I’d like to see if I put my mind to it – however the parties themselves should be coming up with these ideas, ensuring they are feasible and proposing them to us rather than bickering between themselves.

Here’s hoping things pick up from here. If not it may have to spoil my vote.

*In some case I can accept dismissing people from the party etc in case of voting against any issue the government got elected on or against key party beliefs.

April 11, 2010 · robert · Comments Closed
Tags:  Â· Posted in: Uncategorized

Naptan to GPX Waypoints (OSM)

If anyone has been following the goings on of OpenStreetMap of the uk you may have noticed the appearance of a load of Bus Stops (or duplicate bus stops if they where already in OSM). These have come from a database called NaPTAN kindly supplied to OSM by the UK Department for Transport and Traveline. See the OSM Wiki for more details.

These new points now need confirming/merging. I’ve also got a new GPS (BGT-31) which can alert me when I get near a waypoint – so I though why not load up the new data as waypoints into my GPS?

Heres the rough script I’ve written to download the data and convert it to the right format for my GPS. It also delete the name field, and changes the local_ref field to be the name, dropping the prefix 450. This is because the GPS only shows 6 characters for the name of a waypoint and in my area the last 6 characters are probably the easiest way to identify individual bus stops in 6 characters.

#!/bin/bash
wget http://www.informationfreeway.org/api/0.6/node[naptan:verified][bbox=-......] -O /tmp/naptan.osm
xmlstarlet ed -d "//tag[@k='name']" < naptan.osm | xmlstarlet ed -u "//tag[@k='local_ref']/@k" -v 'name' > naptan2.osm
sed 's/450//' < naptan2.osm > naptan.osm
gpsbabel -i osm -f naptan.osm -o ozi -F naptan.wpt

Just change the bbox to the area you want and it will generate the waypoint file which can then be uploaded to the GPS. It is a but rushed but it does the job.

September 27, 2009 · robert · Comments Closed
Tags: , , ,  Â· Posted in: OSM

Zenoss, VMWare and Critical “is up” alerts

I’m currently working on setting up Zenoss to either replace or supplement our current network/server monitoring systems.

As its in test, it got stuck on our currently relatively unused “old” vmware environment (ESX 3). After initially going well it start to go wrong. We kept getting critical alerts that a server was up. Switching zenping to debug didn’t help either – it offered no new information and made the problem worse. As its open source I thought I’d take a look at the source, and hey presto I found the suspected problem. Stuck in an extra debug line, and confirmed it.

The problem – well it was an issue with the clock on the server caused by running under vmware , it was jumping about leading to negative rrt on pings. Funnily enough zenoss didn’t like. I’ll be submitting a bug so that it comes up with the slightly less cryptic error of Ip xxx.xxx.xxx.xx is up. To fix the problem, I had to specify the clocksource in the kernel options. See vmware KB 1006427 for details.

If you can’t fix this for some reason or can’t reboot server, for now you can put an event transform for status/ping in place to suppress them.

import re
 
match = re.search('ip (25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?) is up', evt.message)
if match and evt.severity==5:
	evt._action = 'drop'

September 6, 2009 · robert · Comments Closed
Tags: , , , ,  Â· Posted in: Linux, VMWare, Zenoss

WordPress: Stopping the Sidebar from Printing

I’ve already blogged about this, but here’s a new method on how to fix the problem. This one doesn’t bloat the site as much, and keeps the css files down to a minimum.

Please note: I’m assuming you still use the default theme. Things will be slightly different with other themes, but in general the same principal should apply.

In the file header.php remove media=”screen” from the following line:

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />

In style.css, just before the line

/* Begin Typography &amp; Colors */

Add

@media screen {

At the bottom of the file add the following line:

}
@media print {
    /* style sheet for print goes here */  
   #sidebar { display: none; }
}

Bingo no wasted paper from printing the side bar.

August 14, 2009 · robert · Comments Closed
Posted in: Howtos, WordPress

Exim: Deliver some email address on local domain remotely

Most of my email is handled by a server I run, except for a few legacy address I can’t really move for now.  Before I had been lazy and send simply relayed all mail that didn’t have a local mailbox onto the second server.  However I was forwarding shed loads of emails to duff address.  To fix this I have entered a new router into exim and removed the other domain from the relay list.

special_remote:
  debug_print = "R: special_remote for $local_part@$domain"
  driver = dnslookup
  domains = pobice.com
  local_parts = lsearch;/etc/exim4/non_local
  transport = remote_smtp
  ignore_target_hosts = 127.0.0.0/8
  no_more

I then have entered the local_parts into a file.  Everything else then gets bounced, rather than been forwarded and bounced later on.

Word of warning – I’m no exim expert, but this seems to do the trick for me.

July 24, 2009 · robert · Comments Closed
Posted in: Howtos, Linux

Setting Up Blog Again

Any one who has been reading the Live Journal site will now I haven’t been well.  Because of that I couldn’t be bothered the fix blog.pobice.co.uk when it failed due to a Debian upgrade.

Well things have change, I’m slowly getting around to setting up my wordpress blog again, but on a better address.  I intend for this to be my home page as some point in the future too, as the old site isn’t really relevant to me today and is rather, well dead.

This means stuff doesn’t really work yet.  It’ll get fixed at some point soon I promise.

Update

Stuffs mostly fixed.  Thats enough work for now

June 14, 2009 · robert · Comments Closed
Posted in: Uncategorized