Archive for the ‘Uncategorized’ Category
If you need to clear the DNS resolver cache on a Mac OSX computer here are some handy command line tips.
Over the years with different versions of Mac OSX yosemite, leopard, mountain lion Apple has changed the command that you will need to use.
OSX 10.10 Yosemite
sudo discoveryutil udnsflushcaches OSX 10.9 Mavericks dscacheutil -flushcache; sudo killall -HUP mDNSResponder
OSX 10.7 - 10.8 Lion & Mountain Lion
sudo killall -HUP mDNSResponder
OSX 10.5 - 10.6 Leopard & Snow Leopard
sudo dscacheutil -flushcache
Any one who is using windows its stayed the same over the years Windows
This is a quick follow up post to my earlier one about creating timemachine backups on a network share.
A good tip/trick for anyone who has setup backups to a network share is to disable spotlight from indexing this volume as it slows down the backup process a lot. This can easily be disabled by going to the spotlight panel in system preferences.
To avoid this slow down, as soon as the share is mounted for the backup process go to Spotlight’s Privacy panel in System Preferences. Use the ‘+’ button at the bottom, select your backup share, and Spotlight will then ignore it. If Spotlight has already started indexing it, it should immediately stop and the backup will speed up.
Google App Engine has just added some more invitations for developers who missed out on the first round.
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
mysql -h localhost -u USER --password=PASSWORD -e "$1" DATABASE | tail -1
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"`
Title[Blackarrow_queue]: Queue Lenght
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: