Shane Duffy

I have a few HP laser printers which are connected to our network. The problem I was having was one of the network cards in the printers was not showing up anymore and I needed to preform a reset of the configuration in order to clear the settings on the card and reconfigure the printer.

The procedure that I found for resetting the HP 2300 DTN is as follows:

  1. Turn the printer off
  2. Hold the green button on the front
  3. Power the printer on (while holding the green button still)
  4. Keep pressing the green button until all three lights are on the front panel then release
  5. Then use the up arrow to go from Select Language to “Cold Reset”
  6. Press the green button again and the printer will reset to factory defaults.

Hope this helps anyone who is having problems either connecting to a Hewlett Packard networked laser printer. This procedure is useful if you have bought one of these printers second hand and need to reset the IP range that the printer is using.

Google App Engine has just added some more invitations for developers who missed out on the first round.

http://appengine.google.com

With only 1 more day left to the official release of Ubuntu 8.04. Check back here were we will give any guides and tips needed to get this release installed under Parallels on the MAC and also VMware fusion offering. I will also go true the details for anyone who has already 7.10 installed and wants to preform an upgrade.

This week I was working on a new project and for the project I needed to keep an eye on the lenght of a queue which was stored in a MySQL table. I already have the very useful MRTG tool installed on the server so I decided to make use of it to create a simple a quick graphs.

For anyone who doesn’t already know what MRTG is its a very handy tool for graphing data. It is normally used to graph things such are network interface traffic stats and works with an RRD data store in the background storing 5 minute averages. MRTG makes it very easy for users to monitor custom data aswell and has a simple input format. All that is required is to write a script which will output 4 lines of data.

Line 1 -current state of the first variable, normally ‘incoming bytes count’
Line 2 -current state of the second variable, normally ‘outgoing bytes count’
Line 3 -string (in any human readable format), telling the uptime of the target.
Line 4 -string, telling the name of the target.

In order to get started graphing that data that I wanted I created this small script below

#!/bin/sh
echo 0
mysql -h localhost -u USER --password=PASSWORD -e "$1" DATABASE | tail -1
echo 0
echo "Queued Items"

When this script is called it takes 1 argument which is in the form of the count query you want to preform. eg “Select count(*) from table_X”

Then in our MRTG cfg file we need to add an entry to call and display this data.

Target[Blackarrow_queue]: `/graphs/collector_links "Select count(*) from table_X"`
MaxBytes[Blackarrow_queue]: 10000
Options[Blackarrow_queue]: nopercent,growright,nobanner,nolegend,noinfo,gauge,integer,transparent,noi
Title[Blackarrow_queue]: Queue Lenght
PageTop[Blackarrow_queue]:<h3>Queue</h3>
YLegend[Blackarrow_queue]: records
ShortLegend[Blackarrow_queue]:
LegendI[Blackarrow_queue]:
LegendO[Blackarrow_queue]:records

For a graph like this you’ll want to use similar options to the ones I used above. nopercent disables percentage display, growright tells the graph to read from left to right instead of the default right to left, gauge tell MRTG that the data points are “current status” measurements rather than ever-increasing counters, noi tells MRTG there is no “input” data to compare against “output” data and a few cosmetic display options. The resulting graph looks something like this:

MRTG Custom Stats

Im working on a project now and using subversion a lot for the project. One of the things that has been annoying me in the last while is sometimes I want to move code into another svn repository while working on it, and really the only way to do it is to remove all the .svn directories check out the top level empty directory of the repository I want to place the code into and then do svn add *

The only problem been that removing all the .svn files can be a real pain on large projects.

find . -type d -name ‘.svn’ -print0 | xargs –0 rm -rdf

Is a very handy command that I now use all the time. What this does is find all the .svn directories and removes everything below them, leaving me free to add the code back into another subversion repository.

Update: This is also very handy way of reducing the transfer size if using SCP to move your code between servers. As when working on SVN subversions files the .SVN directories can double the size of your code on disk as they store copies of the files in the .svn folders for later comparison

So this morning I was doing some work with one of my webservers and adding new sub hosts to some of the domains and to see the changes on my MacBook pro laptop I knew I would need to flush the DNS cache so I wouldnt have to wait for the cache to expire.

So for anyone else who needs to know the commands here they are:

OS X <= 10.5.1

lookupd -flushcache

OS X >= 10.5.2

dscacheutil -flushcache

Hope that will help anyone out there who needs to flush their dns cache and has just upgraded to 10.5.2

The majority of us don’t backup on a regular basis. It usually isn’t until we lose a bunch of critical data that the light bulb turns on and we start backing up for maybe a week or two and then we stop. Apple’s new Leopard operating system contains Time Machine to fix that problem. Time Machine runs in the background, backing up your entire hard drive without you having to remember to manually run a backup.

This was one of the niceties which excited me about upgrading to Leopard; however I was somewhat disappointed to learn after upgrading, that Time Machine would only backup to another physically attached hard drive. In my situation I primarily like to place my backups in a remote location such as a networked server. I work of a laptop, so my physical working location is always changing and I’m not going to carry an external drive with me all the time. Luckily, after a few hours of research I found a nice tweak to let me use our office network servers as my backup location.

Here is how you do it:

REQUIREMENTS
Obviously you need to be running Leopard and you’ll need a network share which is larger or equal to your hard drive in your Mac. In my case these shares are in SMB and AFP.

1. Go into Applications / Utilities and open up terminal
2. Copy and paste this command into terminal (all on one line)

defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

3. Hit enter / return
4. Mount your network share, in my case my share is off our server called INAS1 and my share is called User-Backups
5. Go to System Preferences and open Time Machine
6. Click on Change Disk
7. Select the share you wish to backup to, I’ve selected User-Backups
6. That’s it, you’re done

Wait up to 15 minutes and you should be set. To verify it is working open up your network share in Finder and you should see a file which is named [your computer name] [your MAC address].sparsebundle

Be sure you post any comments or questions about this method.

Subscribe to this blog now!

Top Clicks

  • None
May 2017
M T W T F S S
« Feb    
1234567
891011121314
15161718192021
22232425262728
293031