<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>TOCPCs - The Elite Geeks Blog &#187; Programming</title>
	<atom:link href="http://www.tocpcs.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tocpcs.com</link>
	<description>Impossible? You Lie!</description>
	<lastBuildDate>Mon, 06 Feb 2012 11:19:50 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-alpha-19827</generator>
		<item>
		<title>NewSoftSerial &#8211; Adding a baud rate</title>
		<link>http://www.tocpcs.com/newsoftserial-adding-a-baud-rate/</link>
		<comments>http://www.tocpcs.com/newsoftserial-adding-a-baud-rate/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 23:13:12 +0000</pubDate>
		<dc:creator>The Elite Geek</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.tocpcs.com/?p=1218</guid>
		<description><![CDATA[I was continuing testing with the Arduino to get communication happening with the car &#8211; there is a requirement to test data against known values to confirm findings. I was aiming to use the hardware driven serial on the Arduino&#8217;s &#8230; <a href="http://www.tocpcs.com/newsoftserial-adding-a-baud-rate/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I was continuing testing with the Arduino to get communication happening with the car &#8211; there is a requirement to test data against known values to confirm findings.</p>
<p>I was aiming to use the hardware driven serial on the Arduino&#8217;s ATMega328 chip &#8211; the reference docs claim it can support custom baud rates, so I figured it should just work.</p>
<p>The code base over at OBDuino suggests that Serial.begin(10400) should also work. I was blaming the circuit used for the lack of communication, which would make sense, but it does work with NewSoftSerial. I tested this last night by using 9600 baud with an ELM327 cable. The test fails using the baud rate of 10400 in the Hardware serial.</p>
<p>With NewSoftSerial working at 9600 baud, the missing link then becomes how to use 10400 baud with NewSoftSerial.</p>
<p>The answer was simple enough thankfully:</p>
<blockquote><p>#if F_CPU == 16000000</p>
<p>static const DELAY_TABLE PROGMEM table[] =<br />
{<br />
// baud rxcenter rxintra rxstop tx<br />
{ 115200, 1, 17, 17, 12, },<br />
{ 57600, 10, 37, 37, 33, },<br />
{ 38400, 25, 57, 57, 54, },<br />
{ 31250, 31, 70, 70, 68, },<br />
{ 28800, 34, 77, 77, 74, },<br />
{ 19200, 54, 117, 117, 114, },<br />
{ 14400, 74, 156, 156, 153, },<br />
{ 10400, 106, 218, 218, 215, },<br />
{ 9600, 114, 236, 236, 233, },<br />
{ 4800, 233, 474, 474, 471, },<br />
{ 2400, 471, 950, 950, 947, },<br />
{ 1200, 947, 1902, 1902, 1899, },<br />
{ 300, 3804, 7617, 7617, 7614, },<br />
};</p></blockquote>
<p>The baud rate 10400 is simply 10400 / 9600 = 1.0833333. Then for each of the 9600 rx and tx values, divide by 1.0833333.</p>
<p>Testing this with the OBD wake up that gets sent every second or so (ox01, 0x3E, 0x3F) gets the correct data as it would be at 9600 baud (and matches what I tested with the ECU in the car).</p>
<p>It&#8217;s not ideal though, software serial is using CPU clock cycles to fake an actual serial port, there needs to be a reason as to why the Arduino didn&#8217;t like 10400 baud, this is against the knowledge that it works with the OBDuino &#8211; a project that&#8217;s been used numerous times in the USA, and would therefore be successful.</p>
<p>It really should come down to whether the circuit is correct (I&#8217;ve tried the variation here; <a href="http://blog.perquin.com/prj/obdii/">http://blog.perquin.com/prj/obdii/</a>, and here elmelectronics.com/DSheets/<strong>ELM323</strong>DS.pdf, and the very simple zener and resistor circuit here, <a href="http://sterntech.com/obdii_protocols_iso.php">http://sterntech.com/obdii_protocols_iso.php</a>) &#8211; not to mention variations to those to see if it was a TX related issue (- I was leaving TX empty for receiving only).</p>
<p>Being the holiday period it&#8217;ll take too long to track down one of the IC chips used in the OBDuino, and the MC33290 IC used there is End of life.</p>
<p>I&#8217;ve looked over <a href="http://1.bp.blogspot.com/-pUvSZvyT6gY/Tdg7DHCPiqI/AAAAAAAAAFM/HcNZ91fd7Vg/s1600/OBDII_interface_r1.png" target="_blank">this circuit</a> by someone else who tried the same trick as the first link above, but that&#8217;s really only adding protection, and looking through <a href="http://blog.workingsi.com/2010/10/research-on-arduino-obd-ii-interface.html" target="_blank">his blog</a>, I doubt he found a result &#8211; he claims he got the initial init &#8211; but that&#8217;s it)..</p>
<p>Logically thinking, the serial would be processed as one might expect, the data bits are logic high and low &#8211; 5V high, 0V low, the standard used in the car is that the circuit idles high and goes low when bits are being sent &#8211; so 0, 1, 0, 1 is simply 0V, 5V, 0V, 5V. That should be received, but perhaps the arduino&#8217;s software is discarding it &#8211; though that makes less sense compared to the circuit not producing enough current to trigger a logic high / logic low as need be. I don&#8217;t think the pulses are long enough for the DMM to pick up either.</p>
<p>I&#8217;ll have to toss up on how to solve this issue another time, I&#8217;ve got something to work with now that&#8217;ll get me the test setup I need for data transmission.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tocpcs.com/newsoftserial-adding-a-baud-rate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eureka! Those 5 bytes are found.</title>
		<link>http://www.tocpcs.com/eureka-those-5-bytes-are-found/</link>
		<comments>http://www.tocpcs.com/eureka-those-5-bytes-are-found/#comments</comments>
		<pubDate>Tue, 27 Dec 2011 12:20:20 +0000</pubDate>
		<dc:creator>The Elite Geek</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.tocpcs.com/?p=1215</guid>
		<description><![CDATA[I spent the last few weeks attempting to determine what 5 bytes are necessary to initialise the connection to the car ECU. I tried a few methods of discovering just what the ones and zeros were telling me, and tonight, &#8230; <a href="http://www.tocpcs.com/eureka-those-5-bytes-are-found/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I spent the last few weeks attempting to determine what 5 bytes are necessary to initialise the connection to the car ECU.</p>
<p>I tried a few methods of discovering just what the ones and zeros were telling me, and tonight, a break through, I now know precisely the 5 bytes used to initialise the Nissan ECU for Consult II protocol (and the ECU reply)!</p>
<p>The next is to then get discovering the raw data. The bytes always require calculation to derive the real value (i.e. Hex: 0A is what might be returned for RPM &#8211; but you won&#8217;t find a car doing 10 RPM). Of course fishing out what the PIDs are and those calculations is going to be fun.</p>
<p>I do hope to discover most of the information available and gather it then set up a microcontroller and small LCD display with it for data logging purposes.</p>
<p>That can then store info on real time fuel economy, giving the driver feedback as to whether the current style matches desired consumption (important with fuel prices catching reality). It has other reasonable uses too, log speed and attach a GPS and you can get some idea of what the car was doing and where. Get cameras and the above GPS and you can log useful information there too.</p>
<p>That&#8217;s off in the distance, I&#8217;ve still got to get the connection going, get the bytes moving and get the code written.</p>
<p>But on that note, why is it that when the simple solution is staring me right in the face (literally in some cases), I take the longest road?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tocpcs.com/eureka-those-5-bytes-are-found/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Calendar &#8211; In Code</title>
		<link>http://www.tocpcs.com/the-calendar-in-code/</link>
		<comments>http://www.tocpcs.com/the-calendar-in-code/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 11:05:56 +0000</pubDate>
		<dc:creator>The Elite Geek</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.tocpcs.com/?p=1194</guid>
		<description><![CDATA[It&#8217;s not so hard to look at and work with when you are looking right at one. It becomes a different thing to work with when you are trying to calculate dynamically with it. It&#8217;s not overly difficult, it just &#8230; <a href="http://www.tocpcs.com/the-calendar-in-code/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s not so hard to look at and work with when you are looking right at one.</p>
<p>It becomes a different thing to work with when you are trying to calculate dynamically with it. It&#8217;s not overly difficult, it just has the potential to make me stop in my tracks and think about the logic being used.</p>
<p>It happened today. I started this week hoping to get to work, finish off one project inside of a short time, and move on to something different. Monday was severely flooded, I couldn&#8217;t get access to work &#8211; to uhh work. Roads were flooded. Half the day wasted on account of the rain.</p>
<p>I started today hoping to finish what I was working on, and by mid after noon began pondering how I&#8217;d make the ability to use two date ranges work together.</p>
<p>There are two date ranges, one represents the set of collected data, the data range. The other represents the variable(s) applicable to that data set &#8211; the variables are date ranges.</p>
<p>So to make them work, I come across issues such as &#8211; how do we work with the date of the variables being &#8216;after&#8217;the reporting data set (a very real possibility, I anticipate seeing the variable date ranges begin and end with overlapping data periods.</p>
<p>Thinking more of it tonight, I figured this is the best representation  of what must be done (in logic terms):<br />
if (dataDateStart < variableDateStart) then<br />
  if (variableDateEnd < dataDateEnd) then<br />
     //days involved is the days between variableDateStart and variableDateEnd<br />
 else if (variableDateEnd >= dataDateEnd) then<br />
    //days involved is the days between varaibleDateStart and dataDateEnd</p>
<p>else //if dataDateStart >= variableDateStart)<br />
  if (variableDateEnd < dataDateEnd) then<br />
    //days involved is the days between dataDateStart and variableDateEnd<br />
  else if (variableDateEnd >= dataDateEnd) then<br />
     //days involved is the days between dataDateStart and dataDateEnd</p>
<p>That gives the complete desired overlap needed when considering the variables.<br />
If the variables don&#8217;t meet the data date ranges, that becomes a user error (otherwise the loop fetches multiple records with multiple date ranges and acts accordingly).</p>
<p>It&#8217;s not overly difficult in the basic form, I just don&#8217;t always see the simple when thinking of how to make it work.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tocpcs.com/the-calendar-in-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving Data Wirelessly</title>
		<link>http://www.tocpcs.com/moving-data-wirelessly/</link>
		<comments>http://www.tocpcs.com/moving-data-wirelessly/#comments</comments>
		<pubDate>Sun, 11 Dec 2011 09:39:26 +0000</pubDate>
		<dc:creator>The Elite Geek</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.tocpcs.com/?p=1191</guid>
		<description><![CDATA[I&#8217;ve got a few sensors I&#8217;d be keen on moving data wirelessly between. The first is the Solar Hot Water system, which is where I wanted to start &#8211; wirelessly read some temperature sensors, and send them to the server &#8230; <a href="http://www.tocpcs.com/moving-data-wirelessly/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve got a few sensors I&#8217;d be keen on moving data wirelessly between.</p>
<p>The first is the Solar Hot Water system, which is where I wanted to start &#8211; wirelessly read some temperature sensors, and send them to the server for logging purposes, and set up a warning to turn on electric heating if need be (it&#8217;d be a relay if it could, but it can&#8217;t at the moment).</p>
<p>The original point was so we could gauge some idea of how much hot water was flowing out to the flat compared to the house, but then looking at the system since we&#8217;ve again emptied the flat, the solar hot water is easily serving our requirements &#8211; it&#8217;s obvious the source of waste was the flat. Still would be useful to have wireless information on.</p>
<p>Next, I have some thoughts on monitoring the moisture and temperature of the soil, and then have a pump trigger as appropriate, to find and keep them in the ideal growing range. Not enough time to put that together in a good way.</p>
<p>Wireless data is easily done with the Arduino microcontrollers and the NRF24L01 from Nordic, and another use which I have just started putting together is wireless data  transmission &#8211; I&#8217;ll be hooking it up to the serial line in the car to get that data wirelessly transmitted whilst I get the protocol data. Store this, read it, and then it&#8217;s just a matter of sending that data out correctly, to get the same data in reply.</p>
<p>The difficulties are not in the circuit (though this can be somewhat not so simple to put together), it&#8217;s not in the code (that&#8217;s easy, even if you do forget to allow for some events), it&#8217;s in the enclosure &#8211; putting them together in a way that allows the board, battery, and additions in a neat manner is not so easy.</p>
<p>Creating a custom board with the microcontroller and wireless chip on it would be a better idea &#8211; with inputs and power planned in the design. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.tocpcs.com/moving-data-wirelessly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Time wasted!</title>
		<link>http://www.tocpcs.com/time-wasted/</link>
		<comments>http://www.tocpcs.com/time-wasted/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 13:26:04 +0000</pubDate>
		<dc:creator>The Elite Geek</dc:creator>
				<category><![CDATA[Garden]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random]]></category>
		<category><![CDATA[Sustainable Future]]></category>

		<guid isPermaLink="false">http://www.tocpcs.com/?p=1161</guid>
		<description><![CDATA[I had spent the last few weeks fishing around for details on the protocol used in the Nissan. After much, much, much Googling and some testing, I concluded that there is no OBDII support, and the car has only Nissan&#8217;s &#8230; <a href="http://www.tocpcs.com/time-wasted/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I had spent the last few weeks fishing around for details on the protocol used in the Nissan.</p>
<p>After much, much, much Googling and some testing, I concluded that there is no OBDII support, and the car has only Nissan&#8217;s Consult II protocol available.</p>
<p>That&#8217;s bad in terms of support for performance monitoring, as the protocol for Consult II doesn&#8217;t seem well documented (and those who do have it, don&#8217;t seem to be detailing it &#8211; rather going to lengths to conceal their own findings).</p>
<p>There&#8217;s always more than one way to skin a cat, and I was reminded of that again today, in trying to solve another issue. The original intention was to get real time data on fuel &#8211; and I can do that just as I did in the Sonata &#8211; injectors get turned on and off, so use that signal. The car has a working speedo, use that signal.</p>
<p>I spent hours upon hours over weeks searching and found as much as I could about the protocol available &#8211; I flicked through the service manual and of course it&#8217;s there in black and white! </p>
<p>Getting data from Consult II is not out of the question though &#8211; <a href="http://en.wikipedia.org/wiki/Bit_banging">bit banging</a> is a well documented technique for discovering protocols and the data being carried across them. It&#8217;s a fair bit of effort though.</p>
<p>I tried to test for OBDII specifically, but that didn&#8217;t work. The battery in the car went flat again too, and I was really only in it for 30 minutes or so with the music and sometimes the light on. 30 minutes with such a low load (stereo couldn&#8217;t be too much!), suggests either the speakers in the back are very high, or this battery is needing some maintenance or investigation. Luckily I have jump start cables from the last flat battery, and the Sonata is still lingering around.<br />
Now it&#8217;s out on the street (in case I need another jump start, it&#8217;s difficult moving a car around a tight corner), maybe after we finish getting the Tyres and Servicing on the Pulsar, we&#8217;ll find a new home for it.</p>
<p>Ignoring that, we&#8217;ve been planning some extra fruit trees for some time now, we were waiting on some trees &#8216;taller than the seller&#8217;to become available at the local markets over several weeks &#8211; we gave up waiting and got some from the nurseries instead which seem taller than us.</p>
<p>Our choices were limited primarily to what we know the kids love to eat. The vegie patch has been pretty bare so we moved the garden beds from the back corner of the yard and bought them forward more, making room for the trees to go in on the side and planned spacing between them allowing for growth.</p>
<p>This created it&#8217;s own problem  &#8211; the Citrus trees need to go in the ground from their temporary homes (a great idea at the time). They can&#8217;t now as they are all putting on rapid growth and any transplanting would likely cause them harm.</p>
<p>The space available for the trees is limited, so the shed will need to go for that to happen &#8211; which is already planned.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tocpcs.com/time-wasted/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A flat battery already!</title>
		<link>http://www.tocpcs.com/a-flat-battery-already/</link>
		<comments>http://www.tocpcs.com/a-flat-battery-already/#comments</comments>
		<pubDate>Mon, 08 Aug 2011 09:32:37 +0000</pubDate>
		<dc:creator>The Elite Geek</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.tocpcs.com/?p=1158</guid>
		<description><![CDATA[.. I left the damned interior light on, trying to get the MP3 player remember the &#8220;Random&#8221; setting when playing from USB. I didn&#8217;t see it was on as it was raining last night and I was too focused on &#8230; <a href="http://www.tocpcs.com/a-flat-battery-already/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>.. I left the damned interior light on, trying to get the MP3 player remember the &#8220;Random&#8221; setting when playing from USB.</p>
<p>I didn&#8217;t see it was on as it was raining last night and I was too focused on getting the oldest kid inside.</p>
<p>I tried to clutch start it, figuring it was just the interior light, couldn&#8217;t be that flat, surely.. stuck it in 2nd, rolled down the driveway, but just nothing there.</p>
<p>I&#8217;ve been planning on either selling off the Sonata recently (fully disclosing every single issue with it), to deregistering it and leaving it there to rust out or getting it to scrap metal.</p>
<p>Thankfully progress has been slow, and so the car is still registered. It&#8217;s battery which was sure to be flat was surprisingly capable of starting the car &#8211; and no more belt squeal for some reason. That&#8217;s probably related to the trip out to the dump last weekend &#8211; though it needed a charge to make that trip.</p>
<p>I was tossing up between charging the battery in the Pulsar overnight or getting jumper cables and taking it for a spin to get the battery charged &#8211; speedy jumper cables won, and worked surprisingly well (I was expecting to have to get the Sonata revved up &#8211; but not so).</p>
<p>Fuel was low (as expected, I wanted to run the fuel down in the Sonata so it didn&#8217;t sit there with a lot of fuel), I drove it 20ks to work and figured it probably would run out of fuel on the way home at some point &#8211; so had to add more fuel. I&#8217;ll burn it off somehow.</p>
<p>The Sonata stinks too though, it had a bad leak on the passenger side, and pretty much had a lake on the passenger side that soaked the carpet &#8211; it stunk and still does.</p>
<p>Back to it though, I&#8217;ve been trying to find a feasible method of communication with the ECU of the Pulsar. The Sonata had used MUT (Mitsubishi protocol), for data. Nissan have their own Consult II protocol, which doesn&#8217;t seem to have much on the net in terms of how it operates.</p>
<p>OBDII is non existent I think. So I&#8217;m looking at other communication methods so I don&#8217;t have to solder on to the injector and speedo wires as I did in the Sonata for the Carduino. The Data connector exists, perhaps OBD II is there but the cable I used to connect was not functional &#8211; so I am going to attempt that.</p>
<p>Then I will sus out if there is &#8220;CAN&#8221; communication &#8211; &#8220;Controller Area Network&#8221; communication, this allows the ECU to talk to other parts of the car &#8211; such as Transmission in Auto cars, or in the case of ours, the Combination Meter (Odometer display) also would be talking to it. If I can chase that out, I can run that to the OBD II connector and that would give me communication to the ECU.</p>
<p>I dislike having to use the remote to skip tracks / set random mode that our head unit has &#8211; so I want to rig up something with that to send signals directly, mounting some buttons above the unit.</p>
<p>Then I want to add an annoying speaker to the interior light, thus if it&#8217;s on, it&#8217;ll be damned annoying, and only turn off with the doors shut (or turned off), thus preventing it happening again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tocpcs.com/a-flat-battery-already/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Loading Custom Characters into HD44780 LCD display</title>
		<link>http://www.tocpcs.com/loading-custom-characters-into-hd44780-lcd-display/</link>
		<comments>http://www.tocpcs.com/loading-custom-characters-into-hd44780-lcd-display/#comments</comments>
		<pubDate>Mon, 13 Jun 2011 08:22:46 +0000</pubDate>
		<dc:creator>The Elite Geek</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.tocpcs.com/?p=1115</guid>
		<description><![CDATA[I have been toying with a &#8220;TI Launchpad&#8221; recently, something I&#8217;ve been trying is to get it to work with the popular HD44780 LCD. The LCD supports loading of custom characters in addition to the standard character set &#8211; with &#8230; <a href="http://www.tocpcs.com/loading-custom-characters-into-hd44780-lcd-display/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have been toying with a &#8220;TI Launchpad&#8221; recently, something I&#8217;ve been trying is to get it to work with the popular HD44780 LCD.</p>
<p>The LCD supports loading of custom characters in addition to the standard character set &#8211; with Arduino this seems very easily done.</p>
<p>However the Launchpad, based on the msp430 chip from TI is still relatively new &#8211; so not a lot exists at the moment for setting up with Launchpad and getting custom characters loaded.</p>
<p>Thankfully there is already a large example out that has the <a href="http://groups.google.com/group/hive76-discussion/browse_thread/thread/e0f340ed29a2acad" target="_blank">basics of the LCD done</a>. What was wrong from that basic setup was the ability to work with the newer <a href="http://sourceforge.net/apps/mediawiki/mspgcc/index.php?title=Devel:UniarchGit" target="_blank">msp430-gcc (uniarch) compiler</a> &#8211; from here. I moved to this some time ago to use the full benefits of the msp430g2553 chip &#8211; it is the more beefier chip that is a drop in replacement for the included chip (also features onboard UART, great for serial comms).</p>
<p>The basics needed changing, &#8220;Wiring.h&#8221; had to be edited to be compatible with the new compiler, the pin out was different (the schematic at the URL above was missing contrast).</p>
<p>The changes made to Wiring.h are:<br />
<code>//#pragma vector = TIMERA0_VECTOR       <br />
interrupt(TIMER0_A0_VECTOR)  TA0_ISR (void)        {       <br />
//      __low_power_mode_off_on_exit(); // Restore Active Mode on return       <br />
}</code></p>
<p>The low power mode is commented out &#8211; I won&#8217;t need to use it for the chip is low power to begin with and will be connected to mains via USB &#8211; but it&#8217;s very easy to modify the SR register to take out sleep mode.</p>
<p><code>#include &lt;stdbool.h&gt;<br />
#include &lt;stdio.h&gt;<br />
#include &lt;msp430.h&gt;<br />
#include &lt;legacymsp430.h&gt;<br />
#include &lt;stdint.h&gt;<br />
#include &lt;msp430g2553.h&gt;// Headers for specific device#<br />
include "HD44780LIB.h"</code></p>
<p>To design a character, there&#8217;s a handy webpage here that explains the <a href="http://www.serialwombat.com/parts/lcd107.htm" target="_blank">bits that need to be written to the display </a>(8 possible custom characters). I wanted numbers and after having the MPGuino code handy from my ongoing project for the car &#8211; I simply converted those bits to hex and used them:<br />
<code>unsigned char chars[] = { 0x1F,0x1F,0x0,0x0,0x0,0x0,0x0,0x0,<br />
0x0,0x0,0x0,0x0,0x0,0x0,0x1F,0x1F,<br />
0x1F,0x1F,0x0,0x0,0x0,0x0,0x1F,0x1F,<br />
0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0xF,0x7,<br />
0x0,0x0,0x0,0x0,0x0,0xE,0xE,0xE,<br />
0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1E,0x1C,<br />
0x7,0xF,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,<br />
0x1C,0x1E,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F };</code></p>
<p>The characters are rounded characters, they look good on the display. To load the characters, use the command and write functions as below:</p>
<p><code>HD44780_init(&amp;theHD44780,4,3,0,5,2,1);        //this is different, I copied the Wiring functions to use P2 (Port 2).<br />
HD44780_begin(&amp;theHD44780,16, 2);       <br />
HD44780_print_string(&amp;theHD44780, "Hello");       <br />
 HD44780_pulseEnable(&amp;theHD44780);       <br />
 HD44780_command(&amp;theHD44780, 0x48); <br />
 for (i = 0; i&lt;64; i++) {<br />
                HD44780_write(&amp;theHD44780,chars[i]);<br />
  }<br />
 HD44780_pulseEnable(&amp;theHD44780);              <br />
HD44780_command(&amp;theHD44780, 0x01);       <br />
HD44780_pulseEnable(&amp;theHD44780);       <br />
HD44780_command(&amp;theHD44780, 0x80);       <br />
HD44780_gotoXY(&amp;theHD44780, 0, 0);</code></p>
<p>The init line differs because I changed the pin outs so I could use the UART on the chip (P1.1 and P1.2). I also had issues with the display not loading properly so I moved all to Port 2 and all seems well now. In the above, I also used 0&#215;48 as the CGRAM command &#8211; it&#8217;s noted in the original as being 0&#215;40, the 0&#215;48 request worked &#8211; I sticked with what worked.</p>
<p>The gotoXY function I added t HD44780LIB.h, it is below, but is sourced from MPGuino &#8211; it&#8217;s a simple function:</p>
<p><code>void HD44780_gotoXY(HD44780 *me, unsigned int x, unsigned int y) {<br />
                unsigned int dr=x+0x80;<br />
                if (y==1) dr += 0x40;<br />
                if (y==2) dr += 0x14;<br />
                if (y==3) dr += 0x54;<br />
                HD44780_command(me, dr);       <br />
}</code></p>
<p>Accessing the characters is easy enough &#8211; HD44780_print_byte(&amp;theHD44780, 2) would display character 2 from the CGRAM (which, if we start from 0 is the third character in CGRAM).</p>
<p>The end result being targetted is adding this LCD to the system I have in the lounge room, it has a backlight, so I&#8217;ll display the clock and a few other things that aren&#8217;t easily seen with just the TV on. I&#8217;ll cut an opening for it in a cover in the 5.25&#8243; bay, and glue some stand off screws to hold the display upright and bury the MCU down the bottom, and tap USB from the Motherboard directly.</p>
<p>I&#8217;ll be adding some other functions to it as well &#8211; Now Playing comes to mind for streaming music.</p>
<p>There is already an <a href="https://ssl.bulix.org/projects/lcd4linux/wiki/Howto" target="_blank">LCD project that exists for Linux</a> completely negating the need for the MCU in the middle &#8211; it&#8217;s here &#8211; but I already had the LCD rigged up to the Launchpad when I decided to start it &#8211; so I&#8217;ll stick with it. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.tocpcs.com/loading-custom-characters-into-hd44780-lcd-display/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Garbage In, Garbage Out</title>
		<link>http://www.tocpcs.com/garbage-in-garbage-out/</link>
		<comments>http://www.tocpcs.com/garbage-in-garbage-out/#comments</comments>
		<pubDate>Sun, 15 Aug 2010 09:50:04 +0000</pubDate>
		<dc:creator>The Elite Geek</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.tocpcs.com/?p=838</guid>
		<description><![CDATA[&#8230; so the ancient Charles Babbage once authored. Data Validation is a very, very, very important aspect of any user facing application, be it a website, be it a program, be it a simple calculator. The data must be validated &#8230; <a href="http://www.tocpcs.com/garbage-in-garbage-out/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>&#8230; so the ancient Charles Babbage once authored.</p>
<p>Data Validation is a very, very, very important aspect of any user facing application, be it a website, be it a program, be it a simple calculator. The data must be validated to ensure it conforms to the expected input, prior to being used for logic processes and resultant output.</p>
<p>So, when I recently went through some data and saw such elementary and simple things like postcodes not being checked against &#8216;states&#8217;and suburbs spelt incorrectly, I was immediately thinking &#8211; who the heck gets paid to write such garbage..</p>
<p>Unfortunately, that is the case, and as is the reality in many workplaces, one which isn&#8217;t easily overcome.</p>
<p>I&#8217;ve always held the view that a user, be it malicious, incompetent or just plain lazy, can and often will supply applications (website pages, actual programs, scripts, anything) with garbage data.</p>
<p>The responsibility for testing the validity of that data lies wholly with the application author, and where they fail to do that, they&#8217;ve failed in the development of that application.</p>
<p>.. Another reminder of the complete incompetence of some of the people who somehow manage to hold jobs in Australian workplaces for so long.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tocpcs.com/garbage-in-garbage-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programming Languages</title>
		<link>http://www.tocpcs.com/programming-languages/</link>
		<comments>http://www.tocpcs.com/programming-languages/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 12:01:14 +0000</pubDate>
		<dc:creator>The Elite Geek</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.tocpcs.com/?p=808</guid>
		<description><![CDATA[There are many various languages about, and which one to use for a particular purpose is a decision in itself. I&#8217;ve got many choices when it comes to putting something together for a particular purpose, for example, recently, I&#8217;ve been &#8230; <a href="http://www.tocpcs.com/programming-languages/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There are many various languages about, and which one to use for a particular purpose is a decision in itself.</p>
<p>I&#8217;ve got many choices when it comes to putting something together for a particular purpose, for example, recently, I&#8217;ve been using bash to handle simple tasks.</p>
<p>PHP was my previous language of choice for anything, complex or simple &#8211; it&#8217;s a great scripting language of course, and more capable then a bash shell script. It&#8217;s mostly used as a web server scripting language, but that never stopped me making several monitoring scripts, and some asterisk AGI scripts using it. I&#8217;ve also used it for other purposes like any shell &#8211; working a list of 200 domain names at one point for a specific task &#8211; wasn&#8217;t worth writing a file.</p>
<p>Then there is Perl, another good language. I&#8217;ve dealt with it before, and could still create with it. I haven&#8217;t used it recently, because of a lack of purpose, I don&#8217;t have a need for it &#8211; but much of what I&#8217;ve done in PHP could be replicated in Perl, and likely better. I do have a perl based IRC trivia bot that is reasonably solid &#8211; I&#8217;ve hacked on some MySQL concepts to it as well.</p>
<p>I&#8217;ve also worked with Visual Basic and VBScript &#8211; Microsoft specific languages, incompatible with Linux without resorting to Wine is a serious negative &#8211; but on the other hand, it&#8217;s a very readable language.</p>
<p>Java and Javascript &#8211; I&#8217;ve not dealt with Java before, and have no plans to, however Javascript, has always been a must to know, and with the introduction of AJAX and other similar web browser interactive concepts, it remains a very relevant language.</p>
<p>We have .Net (the reinvention of visual basic, introduction of C#). I have no idea why anyone would desire .NET, it&#8217;s not cross platform, it&#8217;s another language to learn that could have an expiry date any day now (just look at the original Visual Basic.. ), and closed source. I&#8217;m certain people have developped some great applications with it &#8211; I&#8217;ve used it once, for a payments page, the IDE was nice, the code read well &#8211; but I&#8217;d have rathered PHP &#8211; which is cross platform  and doesn&#8217;t seem to have a use-by date.</p>
<p>Then, I&#8217;ve now recently come across Python, and it&#8217;s a fantastic language, it&#8217;s cross platform. In just this week I&#8217;ve managed to make a simple application listen for UDP packets on broadcast, and send out libnotify alerts on my ubuntu machine. I use it so I don&#8217;t need to run netcat and monitor it there!</p>
<p>I&#8217;ve dipped into C/C++ before &#8211; it&#8217;s a far more proven language, being around for a much longer time and still in wide use (oh, and it&#8217;s cross platform). It&#8217;s not very readable, but I&#8217;ve heard around circles that if you can learn C / C++ you can learn Java. The structure of the code is very similar.</p>
<p>There are many different languages out there, from my view, I&#8217;d have thought you&#8217;d need to be multilingual.</p>
<p>I now ponder, for those who seek to start a true career in programming, what language do they master &#8211; why would they?</p>
<p>For me, I&#8217;ve got no problems picking up languages, but to master one is to commit to it for a longer term &#8211; and to me, Python is there, Perl is there, PHP is there, Bash will be there. .Net certainly will not be there &#8211; it&#8217;s too much of a risk.</p>
<p>With open source languages, and the fact they work cross platform (meaning I can load up PHP on a windows server, and a Linux server), there&#8217;s no reason to doubt the viability of  the language.</p>
<p>There&#8217;s not many ways one can set about mastering any particular language however, most industries I can think of will be using a combination of many &#8211; and we can&#8217;t all master all those languages &#8211; only to have them replaced.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tocpcs.com/programming-languages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Monitor bash script</title>
		<link>http://www.tocpcs.com/mysql-monitor-bash-script/</link>
		<comments>http://www.tocpcs.com/mysql-monitor-bash-script/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 11:16:37 +0000</pubDate>
		<dc:creator>The Elite Geek</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.tocpcs.com/?p=760</guid>
		<description><![CDATA[I decided to use some of today to resolve an issue with MySQL Slave setup, where statements fail for various reasons. I could ignore the statements that fail &#8211; but that could be potentially dangerous &#8211; leaving with no slave &#8230; <a href="http://www.tocpcs.com/mysql-monitor-bash-script/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I decided to use some of today to resolve an issue with MySQL Slave setup, where statements fail for various reasons.</p>
<p>I could ignore the statements that fail &#8211; but that could be potentially dangerous &#8211; leaving with no slave backup at all.</p>
<p>The next best option to ensure the database is up to date is simple, monitor mysql for slave errors, which is what I do now &#8211; on my home server, I have it querying the 4 services, and checking if the two &#8220;Yes&#8221; options are ever &#8220;No&#8221;.</p>
<p>I created the script to run in bash, I usually heavily use PHP for all sorts of tasks (yep, many years ago, I did a PHP script for simple ping monitoring, and just stuck with it).</p>
<p>Using bash doesn&#8217;t require as many resources (not that PHP is resource intensive).</p>
<p>The script is probably pretty simple, but it was a bit of a learning curve for me (with my minimal bash experience).</p>
<p>/usr/sbin/mysql_monitor:</p>
<blockquote><p>#!/bin/bash<br />
EMAIL=&#8221;admin@email.address&#8221;<br />
HOSTS=&#8221;192.168.x.x 192.168.x.x x.x.x.x x.x.x.x&#8221;<br />
while :<br />
do<br />
for host in $HOSTS;<br />
do<br />
result=`mysql -h $host -u root &#8211;password=x &#8211;execute=&#8221;SHOW SLAVE STATUS\G&#8221; 2&gt;&amp;1`<br />
slave_result=`printf &#8220;%s\n&#8221; &#8220;$result&#8221; | grep -i running`<br />
connect_result=`printf &#8220;%s\n&#8221; &#8220;$result&#8221; | grep -i Error`<br />
if [[ $slave_result == *No* ]]<br />
then<br />
echo &#8220;$host &#8211; $result&#8221; | mail -s &#8220;SLAVE OUT OF SYNC&#8221;  &#8220;$EMAIL&#8221;<br />
fi</p>
<p>if [[ $connect_result == *connect* ]]<br />
then<br />
echo &#8220;$host &#8211; $result&#8221; | mail -s &#8220;MySQL Connection Issue&#8221; &#8220;$EMAIL&#8221;<br />
fi<br />
done<br />
sleep 1800<br />
done</p></blockquote>
<p>HOSTS is a variable which contains the IPs of the hosts to be monitored.  EMAIL is self explanatory.</p>
<p>The script sleeps for 30 minutes so that it&#8217;s not hammering, yet will check more often then my random every so often, sometimes weeks between follow up.</p>
<p>It&#8217;s added bonus is it&#8217;ll also tell me if a MySQL instance isn&#8217;t running by chance to ensure I am alerted to that.</p>
<p>I created an init script too to make sure it runs on startup on my home CentOS box.</p>
<p>/etc/init.d/mysql_monitor:</p>
<blockquote><p>#!/bin/sh<br />
# chkconfig: 2345 95 20<br />
# description: MySQL Monitor<br />
# Monitors MySQL Slave Status<br />
# processname: mysql_monitor<br />
APP=/usr/sbin/mysql_monitor<br />
PIDFILE=/tmp/mysql_monitor.pid<br />
case &#8220;$1&#8243; in<br />
start)<br />
echo -n &#8220;Starting $APP: &#8221;<br />
$APP &amp; pid=$!<br />
echo $pid &gt; $PIDFILE<br />
echo &#8220;Done.&#8221;<br />
;;<br />
stop)<br />
echo -n &#8220;Stopping $APP: &#8221;<br />
PID=`cat $PIDFILE`<br />
kill -9 $PID<br />
rm -f $PIDFILE<br />
echo &#8220;Done.&#8221;<br />
;;<br />
restart)<br />
echo -n &#8220;Restarting $APP: &#8221;<br />
PID=`cat $PIDFILE`<br />
kill -9 $PID<br />
rm -f $PIDFILE<br />
sleep 1<br />
$APP &amp; pid=$!<br />
echo $pid &gt; $PIDFILE<br />
echo &#8220;Done.&#8221;<br />
;;<br />
esac<br />
exit 0</p></blockquote>
<p>I&#8217;ll have to make more of my monitoring tools run using init scripts and rely less on cron.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tocpcs.com/mysql-monitor-bash-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Upgrade 5.0 to 5.1</title>
		<link>http://www.tocpcs.com/mysql-upgrade-5-0-to-5-1/</link>
		<comments>http://www.tocpcs.com/mysql-upgrade-5-0-to-5-1/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 08:22:13 +0000</pubDate>
		<dc:creator>The Elite Geek</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.tocpcs.com/?p=736</guid>
		<description><![CDATA[A boo-boo! (See the end, I found a solution). I was testing an upgrade for MySQL, from 5.0 to 5.1, to gain Row Based Replication instead of Statement based replication (as statements are a cause of SBR breaking, and it &#8230; <a href="http://www.tocpcs.com/mysql-upgrade-5-0-to-5-1/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A boo-boo! (See the end, I found a solution).</p>
<p>I was testing an upgrade for MySQL, from 5.0 to 5.1, to gain Row Based Replication instead of Statement based replication (as statements are a cause of SBR breaking, and it doesn&#8217;t proceed til I tell it to).</p>
<p>So, in my usual lazy, just do it, manner, installed MySQL Server 5.1, pointed the datadir at the old so that I&#8217;d have my data pretty quickly up and running.</p>
<p>And the installation worked, until I started MySQL.</p>
<p>I use hMailserver for email on my box, this uses MySQL for it&#8217;s settings and database storage (which is good actually, a config file is inflexible for multi domain environments).</p>
<p>The database used by hMailserver is InnoDB, most of my needs are well serviced with MyISAM.</p>
<p>In my rush, I didn&#8217;t do a backup. I didn&#8217;t copy the data folders, just went right over it, started, and got an error:</p>
<p>﻿100610 22:15:32  InnoDB: Database was not shut down normally!<br />
InnoDB: Starting crash recovery.<br />
InnoDB: Reading tablespace information from the .ibd files&#8230;<br />
InnoDB: Restoring possible half-written data pages from the doublewrite<br />
InnoDB: buffer&#8230;<br />
100610 22:15:32  InnoDB: Starting log scan based on checkpoint at<br />
InnoDB: log sequence number 0 1204538731.<br />
InnoDB: Doing recovery: scanned up to log sequence number 0 1204538731<br />
InnoDB: Page directory corruption: supremum not pointed to</p>
<p>It was shut down normally &#8211; using the Windows Service, the issue is that the MySQL database won&#8217;t work with the log files from the previous database for some weird reason.</p>
<p>I&#8217;m still yet to determine if any recovery can be done on the log files, making them usable again, however I have doubts.</p>
<p>I reinstalled my mailserver and did a quick setup on it today to get us operational again. And learnt a lesson &#8211; always backup.</p>
<p>Actually, I should have had a database backup of recent, I don&#8217;t. I have no database backup &#8211; I only have the datafiles as they are.</p>
<p>That instance of MySQL is rarely used, it&#8217;s most usage would be the mailserver, followed shortly by the replication I get it to do from the server in Newcastle. It is my home windows test server, I also have a linux one that I planned similar for &#8211; except that does much, much more and data loss there would very much annoy me.</p>
<p>So, I ask myself &#8211; why is there no backup of it then? Because, there isn&#8217;t.</p>
<p>I MUST use this weekend (which thankfully is a long one), to:<br />
A) Figure out if that log is recoverable, and move back to it, then onward to MySQL 5.1 using a mysqldump.<br />
B) Upgrade To MySQL 5.1 for the windows and Linux box here, and the box in Newcastle.<br />
C) Setup replication using Row Based Replication for those databases I have that need it.<br />
D) Design a regular backup script which backs up the databases locally, something like weekly (With email reporting).<br />
E) Update regularly. 5.0 is really old now.</p>
<p>Reconsider using hMailserver is also on the cards, it&#8217;s not it&#8217;s fault, in fact, it has the ability to use it&#8217;s own seperate instance of MySQL (and does by default, and that&#8217;s what I currently have in Newcastle).  But, I want the ability to access that data &#8211; later for user purposes, greylisting statistics and so forth.</p>
<p><strong>UPDATE: </strong>I found the issue! It turns out the ibdata1 file I needed, was in C:\MySQL Datafiles. In the Program Files folder was a 10MB ibdata1 file, which is why the error messages were occurring.</p>
<p>The Database came right back to life the very moment I shut it down. Copied the file from C:\MySQL Datafiles to the version 5.0 program files folder, and started the version 5.0.45 MySQL server with that file, and the log files intact.</p>
<p>Remember to remove the innodb_force_recovery option if it was added, and it can help to change default-storage-engine=INNODB to default-storage-engine=MyISAM &#8211; so that the server starts with MyISAM instead of INNODB.</p>
<p>This will not work if you don&#8217;t have consistent logfiles and data files &#8211; but otherwise, it&#8217;s a save!</p>
<p>Now, the plan is to dump all that data using mysqldump, and then go forth and better my lazy processes for database server management.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tocpcs.com/mysql-upgrade-5-0-to-5-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GreaseMonkey and Cross Domain Cookies</title>
		<link>http://www.tocpcs.com/greasemonkey-and-cross-domain-cookies/</link>
		<comments>http://www.tocpcs.com/greasemonkey-and-cross-domain-cookies/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 13:30:10 +0000</pubDate>
		<dc:creator>The Elite Geek</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.tocpcs.com/?p=664</guid>
		<description><![CDATA[I hit a small problem tonight, I wanted to make it possible for a GreaseMonkey Javascript running on one domain, to publish data to another site using GM_xmlHttpRequest. The problem was cookies. In order to recognise the person posting, the &#8230; <a href="http://www.tocpcs.com/greasemonkey-and-cross-domain-cookies/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I hit a small problem tonight, I wanted to make it possible for a GreaseMonkey Javascript running on one domain, to publish data to another site using GM_xmlHttpRequest.</p>
<p>The problem was cookies. In order to recognise the person posting, the site requires cookies, and that&#8217;s just something XHR can&#8217;t manage outright by itself. So, I devised a better strategy.</p>
<p>Using GM_setValue, I checked the location in the script to ensure it matches where I want the Cookies to be stored from, and set the value of MyCookie to document.cookie.</p>
<p>Then, when it comes time for a request to be sent, in the XHR, I add a header: Cookie: GM_getValue(&#8220;MyCookie&#8221;). This fetches the cookie from the script settings, and sets it as the cookie for the request.</p>
<p>Then, it was just a simple task of encoding my data, and sending the request.</p>
<p>This is of course a friendly reminder to ensure you only install scripts you trust, else you might find someone catching your cookie data and using it for undesired purposes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tocpcs.com/greasemonkey-and-cross-domain-cookies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hardware Failures</title>
		<link>http://www.tocpcs.com/hardware-failures/</link>
		<comments>http://www.tocpcs.com/hardware-failures/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 12:26:07 +0000</pubDate>
		<dc:creator>The Elite Geek</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.tocpcs.com/?p=574</guid>
		<description><![CDATA[After travelling 460KM today, I&#8217;ve discovered how annoying a hardware failure can be. My colocation box is a HP DL360, G3, so it&#8217;s not exactly bleeding edge, but it&#8217;s a fantastic server, does it&#8217;s job and does it reliably. Last &#8230; <a href="http://www.tocpcs.com/hardware-failures/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After travelling 460KM today, I&#8217;ve discovered how annoying a hardware failure can be.</p>
<p>My colocation box is a HP DL360, G3, so it&#8217;s not exactly bleeding edge, but it&#8217;s a fantastic server, does it&#8217;s job and does it reliably.</p>
<p>Last night, we had a planned outage for just a short time to move the box to a different power situation, this was done and the box came back online.</p>
<p>It dropped off 6.30pm, came back 6.45pm. Then, 7.15pm there was notices coming through &#8211; I&#8217;ve began to ignore the warnings for a while now, so I failed there but it wasn&#8217;t too bad, because..</p>
<p>.. My colo provider, Inticon detected the port was flapping 20 minutes later, and went back to have a look, at 8pm he had advised that the issue was with the processor fan assembly, only one fan was spinning &#8211; strange, it was OK for a while before hand.</p>
<p>He went out and about to find a replacement part, and tried to find alternative measures, but came up empty. Considering the nature of the part &#8211; it&#8217;s pretty server specific, so it was understandable that we had no alternatives.</p>
<p>I then began hunting around for the part &#8211; found one, $185 online. I thought, wow, this must be a pretty premium part..</p>
<p>The contact at the colo provider went even further, and actually advised me there was a box on eBay for $250 &#8211; no kidding.</p>
<p>I looked at it, considered it&#8217;s marginally more expensive, but gives us a lot more hardware to play with as well. I contacted the eBay seller, asked if he could accommodate pickup for tomorrow &#8211; he was OK with it, fantastic I thought..</p>
<p>So, I head to bed &#8211; we can&#8217;t pick it up at night, it&#8217;s just not THAT important (and I had started work 8am, so by that point I was very tired). I think about this for a while in bed, then somehow drift off to sleep.</p>
<p>One of the kids is sick, so they crawl into bed beside me and annoy me, so I get up at 6am, head to sleep on the lounge, peaceful.</p>
<p>The next morning, I get up, sort out a pending PC related issue for somebody (it was arranged already), then the seller was interstate for the morning, not back to 1pm, so that was as good as we could get.</p>
<p>He then contacted us, advising he wouldn&#8217;t be back til 3.30pm &#8211; considering we were getting ready to leave around then, that&#8217;d work out perfectly. We got near the address in the southern Sydney area, but he calls and advises 4.30 &#8211; he was delayed. No problem, can&#8217;t do much if he isn&#8217;t there..</p>
<p>So, 4.30pm, he arrives, we have a look at the box, it works, he upgrades the CPU and RAM and throws in a 15K 36GB SCSI drive &#8211; fantastic I thought, more spare parts. The box worked, so in the boot with it, time to hit the highway for Newcastle.</p>
<p>We hit Newcastle at 7pm (after litterally, racing down the freeway to Newcastle), and the colo provider contact was already there &#8211; fantastic.</p>
<p>I take the server into the colo room, upgrade the box with what good parts I could &#8211; extra 1GB of RAM, 3.06 to 3.2Ghz Xeon, swapped over the fan assembly.. Power it on, it takes some time to boot, unusual, it eventually does boot.</p>
<p>Then, I enter into windows, get a ping going, get task manager up &#8211; make sure the virtual machine kicks over, it does. Box stays up stable.</p>
<p>Pack up the changed parts into the &#8216;new&#8217;box, and get the colo provider to hold those incase something else fails down the track &#8211; pretty much a fully working machine with exception the front panel &#8211; which shouldn&#8217;t fail again.</p>
<p>Then, head back home approximately 30 minutes later, by this time the kid who is sick complains about pain, ends up needing a toilet break, all sorted.</p>
<p>Hit the highway to go back home, arrive at 9.30pm.</p>
<p>Wait for the colo provider contact to remove some trickery done to assist with the downtime, and I modify the SMTP route I put in place to redirect the affected domains to my router.</p>
<p>The outcome &#8211; all mail leaves, some spam shows, delete this, and I update the database, all in sync.. fantastic..</p>
<p>All up, nearly a full day, 460KM&#8217;s travelled, $14 spent on food at Aldi in Sydney, $22 spent at Maccas in Newcastle, $250 spent on a pretty darn good deal (compared to $185 for the processor fan assembly) &#8211; and we are all back and operational.</p>
<p>Hardware failures are REALLY annoying &#8211; especially when you can&#8217;t just call HP and say fix it in 4 hours.. &#8211; but we did pretty good for a 23 hour restore time (and still managed to keep some essential services up anyway).</p>
<p>And the dedication of Inticon is outstanding.</p>
<p>Had this been Servers Australia, I have no idea where we&#8217;d be. Part of me says &#8216;online sooner, cause they have HP DL360&#8242;s (or had them)&#8217;, the other says &#8216;getting Jared to get off his arse and take some damned action&#8217;. I&#8217;m leaning towards the latter, it&#8217;s just typical of previous experiences.</p>
<p>Note to self: work harder on high availability.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tocpcs.com/hardware-failures/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Asterisk Debug Gotcha</title>
		<link>http://www.tocpcs.com/asterisk-debug-gotcha/</link>
		<comments>http://www.tocpcs.com/asterisk-debug-gotcha/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 11:25:49 +0000</pubDate>
		<dc:creator>The Elite Geek</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.tocpcs.com/?p=503</guid>
		<description><![CDATA[I was working on an issue being experienced by someone remotely attached to my asterisk machine, and found an abnormality. I use a realtime implementation to allow for easy addition of users and to have the data I want in &#8230; <a href="http://www.tocpcs.com/asterisk-debug-gotcha/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I was working on an issue being experienced by someone remotely attached to my asterisk machine, and found an abnormality.</p>
<p>I use a realtime implementation to allow for easy addition of users and to have the data I want in MySQL (makes it easier to monitor activity in CDR, etc). The problem recently was as a result of an upgrade, there appears to be changing to Asterisk&#8217;s debug log. Previously, Asterisk debug output would end up in the full log.</p>
<p>This made it easy to review the traces of an issue being experienced, and follow them back to the source &#8211; the log would simply contain the full sequence of issues leading up to the &#8216;issue&#8217;, and what happened after.</p>
<p>The newer version of asterisk however doesn&#8217;t enable debugging unless the startup option &#8216;-d&#8217;is specified. safe_asterisk restarts asterisk in the event it bombs out &#8211; and one has to admit &#8211; crashing doesn&#8217;t happen often with asterisk, it&#8217;s &#8216;reliable&#8217;.</p>
<p>So, whilst I was reading the log, I was seeing messages such as:<br />
&#8221; res_config_mysql.c: MySQL RealTime: Failed to query database. Check debug for more info.&#8221;</p>
<p>That&#8217;s a nice warning, it tells me to find the source of the issue, check into asterisk debug log. So we open the seperate file appointed to debug (it removes clutter), and it&#8217;s empty.</p>
<p>So, I look into the asterisk configuration file &#8211; is debug enabled? Of course it is. Spelt correctly? Yep. Where&#8217;s the debug &#8211; how can you debug a bug without debug?</p>
<p>I check Asterisk &#8216;logger show channels&#8217;&#8211; this is described to show logging channels.</p>
<p>Sure enough, there is a line that states my &#8216;debug&#8217;log is of &#8220;File&#8221; type, and is &#8220;Enabled&#8221; and is configured to be &#8220;Debug&#8221;. Asterisk isn&#8217;t doing anything wrong there.</p>
<p>Then I look into &#8216;help&#8217;&#8211; core set debug. Could it really be, asterisk requires the debug option to be set? It does. You can set it there, or alternatively, you can have it enabled on startup in using safe_asterisk.</p>
<p>In the safe_asterisk script (nano -w /usr/sbin/safe_asterisk) &#8211; find &#8220;ASTARGS&#8221; and edit it to include a &#8220;-d&#8221; &#8211; this enables asterisk debugging information to a log file, by default, asterisk doesn&#8217;t log debug information.</p>
<p>This is confusing. The problem turns out that real-time now has an additional field required &#8211; &#8216;regserver&#8217;, adding that field seems to have caused asterisk to stop spewing the error message.</p>
<p>The issue may be &#8216;better&#8217;managed by asterisk real time mysql having a seperate SQL based log for any errors it experiences. In a production system, you might not have so many errors.</p>
<p>Although, another point to note is the mysql realtime module is very chatty:<br />
 res_config_mysql.c: MySQL RealTime: Connection okay.<br />
res_config_mysql.c: MySQL RealTime: Retrieve SQL: SELECT * FROM sip_buddies WHERE name = &#8221;<br />
res_config_mysql.c: MySQL RealTime: Connection okay.<br />
res_config_mysql.c: MySQL RealTime: Retrieve SQL: SELECT * FROM sip_buddies WHERE name = &#8221; AND host = &#8216;dynamic&#8217;<br />
res_config_mysql.c: MySQL RealTime: Connection okay.<br />
This query might return no results, so it begs to question why is it even executed?</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tocpcs.com/asterisk-debug-gotcha/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Asterisk Reinvite Improved</title>
		<link>http://www.tocpcs.com/asterisk-reinvite-improved/</link>
		<comments>http://www.tocpcs.com/asterisk-reinvite-improved/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 11:10:29 +0000</pubDate>
		<dc:creator>The Elite Geek</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.tocpcs.com/?p=500</guid>
		<description><![CDATA[Looking into the docs for Asterisk 1.6.0 for a solution to a NAT issue, you can find that asterisk reinvite has improved significantly in the later versions. Previously, you had to turn it off for peers stuck behind NAT, this &#8230; <a href="http://www.tocpcs.com/asterisk-reinvite-improved/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Looking into the docs for Asterisk 1.6.0 for a solution to a NAT issue, you can find that asterisk reinvite has improved significantly in the later versions.</p>
<p>Previously, you had to turn it off for peers stuck behind NAT, this is resolved in newer versions of Asterisk which attempt to determine if a peer is behind NAT, or if the peer is connectable.</p>
<p>The method is simple, for the peers affected or unsure, set the canreinvite option to &#8216;nonat&#8217;&#8211; this will cause the audio to be connected directly to the peer if possible, otherwise, it will packet2packet bridge the audio.</p>
<p>It is important to have the right mix of codecs on the server and specified in the ATA settings also &#8211; without it, you&#8217;ll just have a mess to sort out.</p>
<p>NAT is a big problem for VoIP &#8211; nearly every gateway / router will implement NAT differently from what I have been told. The BEST configuration is to have the ports forwarded. This isn&#8217;t hard for many people &#8211; it&#8217;s just a matter of finding what your router calls it, and then forward the ports. Once the ports are forwarded, there should be only codec mismatches to worry about &#8211; and of course, if your codecs are specified right &#8211; well, there is no problem &#8211; the audio should be connected directly, rather than bridged.</p>
<p>Asterisk 1.4 and 1.6 have had many advancements to SIP and RTP implementation. T.38 support is at a strong point now &#8211; not completely tested by me, however with T.38 support, it greatly reduces the errors you may experience trying to transmit fax over ulaw / alaw.</p>
<p>Check out the <a href="http://svn.digium.com/view/asterisk/tags/1.6.0/UPGRADE.txt?view=markup" target="_blank">UPGRADE.txt </a>for Asterisk 1.6 &#8211; the list is massive and impressive.<br />
Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tocpcs.com/asterisk-reinvite-improved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Asterisk Context Control</title>
		<link>http://www.tocpcs.com/asterisk-context-control/</link>
		<comments>http://www.tocpcs.com/asterisk-context-control/#comments</comments>
		<pubDate>Sun, 05 Oct 2008 03:37:54 +0000</pubDate>
		<dc:creator>The Elite Geek</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.tocpcs.com/?p=497</guid>
		<description><![CDATA[Recently, I have been toying with Asterisk 1.6.0 to work in some new internal features that I want to leverage. One of the key features I took advantage of is the context option for each SIP peer. It is possible &#8230; <a href="http://www.tocpcs.com/asterisk-context-control/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Recently, I have been toying with Asterisk 1.6.0 to work in some new internal features that I want to leverage.</p>
<p>One of the key features I took advantage of is the context option for each SIP peer. It is possible to exclude one group of users from calling another group by using contexts.</p>
<p>Let&#8217;s say I want user 300 to never be able to call two users, 400 and 420. 420 and 400 can call each other, and call 300. User 300 is simply someone who will get bullied by 400 &amp; 420, but won&#8217;t be able to get back at them.</p>
<p>This is accomplished easily through the use of extensions and SIP peer contexts.</p>
<p>I set the context for 300 to &#8216;victim&#8217;. I set the context for 400 and 420 to &#8216;attack&#8217;.</p>
<p>Then, in extensions.conf I create the appropriate configurations.</p>
<p>[victim]<br />
exten =&gt; _310X.,1,Dial(SIP/${EXTEN})<br />
exten =&gt; _310X.,n,Hangup</p>
<p>[attack]<br />
exten =&gt; _4X.,1,Dial(SIP/${EXTEN})<br />
exten =&gt; _4X.,n,Hangup<br />
exten =&gt; _3X.,n,Dial(SIP/${EXTEN})<br />
exten =&gt; _3X.,n,Hangup</p>
<p>The sip configuration for each is similar to the below:<br />
[310]<br />
type=friend<br />
username=310<br />
secret=yamomma<br />
allow=all<br />
context=victim</p>
<p>[400]<br />
type=friend<br />
username=400<br />
secret=md5<br />
allow=all<br />
context=attack</p>
<p>[420]<br />
type=friend<br />
username=420<br />
secret=secret<br />
allow=all<br />
context=attack</p>
<p>Try as 310 might, there is no way they can call via the system to 400, however, 400 and 420 can ring 310 as often as they wish.</p>
<p>You can of course add the 4X route to the extensions, and playback a message to the user.</p>
<p>This method can be used to restrict calls to certain areas, such as 1900, or international numbers. It can also be used as a call control method, in the event you don&#8217;t want a specific extension calling someone.</p>
<p>It is important to have a peer and user definition. After upgrading to Asterisk 1.6.0 on my test server, I found my test development server (used for simulation) running Trixbox 1.1 (yep, ancient crap), would not accept calls.</p>
<p>I upgraded to 1.4.22 on the test development server, and found the same issue. This was resolved by changing the sip definitions used for interserver communication to be &#8216;friend&#8217;type, rather than &#8216;user&#8217;type that appears to have been automatically created by Trixbox &#8211; no longer used.</p>
<p>Oh well, back to enjoying a long weekend here in NSW. Another day for me to experiment some more and try and push forward with the updates planned for OzVoIPStatus!</p>
<p>Speaking of OzVoIPStatus &#8211; one of the areas I&#8217;m having difficulties enhancing is the method in which providers may specify plan data &#8211; some have included calls, others have none. Some have unlimited calls, and others have untimed call rates. It&#8217;s not so much a difficulty designing this &#8211; it&#8217;s more in the way of presentation on the page.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tocpcs.com/asterisk-context-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Still on the edge of my seat</title>
		<link>http://www.tocpcs.com/still-on-the-edge-of-my-seat/</link>
		<comments>http://www.tocpcs.com/still-on-the-edge-of-my-seat/#comments</comments>
		<pubDate>Sat, 20 Sep 2008 23:51:49 +0000</pubDate>
		<dc:creator>The Elite Geek</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.tocpcs.com/?p=492</guid>
		<description><![CDATA[After my last post, I attended the interview, and have remained on the edge of my seat waiting for a result. Then, after a short week wait, a response. It&#8217;s not a disappointing reply, but it&#8217;s not successful just yet. &#8230; <a href="http://www.tocpcs.com/still-on-the-edge-of-my-seat/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After my last post, I attended the interview, and have remained on the edge of my seat waiting for a result.</p>
<p>Then, after a short week wait, a response. It&#8217;s not a disappointing reply, but it&#8217;s not successful just yet.</p>
<p>I made the short list for the second round of interviews, which being very soon now, to me looks like they have a tough decision, and they are looking to exclude candidates.</p>
<p>Knowledge is what allows us to strategically position ourselves to suit the requirements and acheieve the goal, in this case, to be successful for the application.</p>
<p>There is not a lot of knowledge available, we know the company, we know the current exploits on their website (well, maybe they don&#8217;t), we know of some of the bugs, we know of what the current users experience, and we know a little about the company structure.</p>
<p>What we don&#8217;t know is the other candidates &#8211; what do they have to choose between? That&#8217;s something I don&#8217;t know, which of course, makes selling yourself, a simpler process. They are doing the comparisons, I&#8217;ve simply got to demonstrate what they are looking for in a new employee, can be found with me.</p>
<p>The previous interview went for a good 45 minutes. I&#8217;ve set another hour aside for this interview, to allow plenty of time for a good solid discussion. I feel confident in my abilities to fulfill many of the tasks they are asking of the right candidate. I can administer servers and perform preventative maintenance, I can optimise code and ensure a positive user experience. I can contribute to discussions, and design to meet objectives. I can create new applications, and optimise what is already there.</p>
<p>But, I imagine so can a few others. The average pay rate for the position is around $55k per annum. I&#8217;ve gone for a figure lower than this, because it&#8217;s my &#8216;first&#8217;employed position in the area, and at the moment, I&#8217;m keen to get away from the support scene.</p>
<p>I&#8217;ve put a fair bit of thought into it, sure, I can support users day in, day out. But the frustration comes when it is something so simple: Have you actually read the quick start guide?</p>
<p>Or, when someone calls, for something that can be resolved by email and thought out in detail, rather than over the phone.</p>
<p>Or, when someone has an unsupported setup, and calls in expecting immediate support for such a setup. I don&#8217;t have 1 hour to spend on the phone helping you do the job of a technician, it&#8217;s not fair to those who have genuine issues that WE do need to resolve.</p>
<p>I don&#8217;t like phones, despite my interests in VoIP, telephones annoy me. They ring, they get answered, and you just think: &#8220;Who the <a href="mailto:f@#k">f@#k</a> dare disturb me answering this email.&#8221;. This of course means the person on the other end of the phone may not be greeted by the most happy sales person (luckily I don&#8217;t answer Sales enquiries anymore). I like to get to the chase, find out what the problem is, give them some troubleshooting, and tell them to go away, so I can assist those who thought patience was ideal, and used email.</p>
<p>Many of those issues just won&#8217;t be present in the new job &#8211; it&#8217;s for an online website, and one which doesn&#8217;t actually have a phone number &#8211; bonus. There isn&#8217;t a strong support aspect in the job, much of it is simply creating applications to meet design specifications, maintaining services, and improving the code base (from what I&#8217;ve been told isn&#8217;t the greatest).</p>
<p>The site itself employs a fantastic array of AJAX, and therefore shouldn&#8217;t be a load nightmare to manage. There are many database optimisations I can put in place, and I&#8217;ve identified a few pages I&#8217;d like to view the code of, and see how they are currently doing that.</p>
<p>I&#8217;m aware of a few security related issues on the server, and part of me thinks &#8211; If I tell them, they may see it as a negative, that I would be using it to simply get the job, on the other, they may think it is a positive &#8211; I&#8217;ve researched the site thoroughly and already found a few exploits. I&#8217;m going with the safer route at the moment, I very much want this job, so I&#8217;m going to try and sell my abilities to them, and simply not advise of what I am aware of. I&#8217;ll just remember to fix them when I start in the position.</p>
<p>Hopefully, the interview can be easily cleared, and I make the number 1 spot on the shortlist, and blow the rest of the candidates out of the water.</p>
<p>Still on the edge of my seat.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tocpcs.com/still-on-the-edge-of-my-seat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nearly finished Diploma studies</title>
		<link>http://www.tocpcs.com/nearly-finished-diploma-studies/</link>
		<comments>http://www.tocpcs.com/nearly-finished-diploma-studies/#comments</comments>
		<pubDate>Sat, 16 Aug 2008 11:20:34 +0000</pubDate>
		<dc:creator>The Elite Geek</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.tocpcs.com/?p=487</guid>
		<description><![CDATA[Recently I&#8217;ve put a lot of progress into completing my studies for the course I&#8217;m studying (Diploma in IT &#8211; Sys Admin). Much of the items are as I described several months ago, mindless paperwork describing something that you have &#8230; <a href="http://www.tocpcs.com/nearly-finished-diploma-studies/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve put a lot of progress into completing my studies for the course I&#8217;m studying (Diploma in IT &#8211; Sys Admin).</p>
<p>Much of the items are as I described several months ago, mindless paperwork describing something that you have done countless times already &#8211; but of course, in this day and age, certification is not always just a bit of paper.</p>
<p>From an employment perspective it can show someone&#8217;s desires, what they felt motivated enough to complete on their own. It can also highlight educational aspects &#8211; how well someone can learn.</p>
<p>The Diploma in IT for me is a bit of a resume filler &#8211; to sit alongside my Cert I, II, III &amp; IV studies and effectively leaves me open to the Advanced Diploma, or to follow more specific studies.</p>
<p>The Cisco Certified Network Administrator course has been a course that has found itself in front of my eyes many times &#8211; not the course, but rather the term CCNA. I had not considered proceeding a full path in networking, mainly because I know what I want, and can always find and work out what I don&#8217;t.</p>
<p>My ideal career path is one which focuses on development &#8211; Client Support is a fair way off from that, but it&#8217;s more of a stop gap measure to keep everything going and of course, add to the resume.</p>
<p>I&#8217;m not entirely sure where I&#8217;ll find myself with development &#8211; be it web or system related &#8211; within the next 3 years. I&#8217;m not anticipating remaining in Client Support for that long, it&#8217;s boring. I&#8217;m a problem solver, sure. I like to resolve issues, but of course, exposure to new issues makes it all the more interesting.</p>
<p>Client Support lacks the aspects I enjoy, the ability to replicate an issue, and fix it. Nearly all the issues I get faced with are the same old, same old. Restart, and viola, it&#8217;s fixed, or adjust configuration setting, and it&#8217;s fixed. It&#8217;s uninteresting, boring.</p>
<p>A problem solving challenge would be a new issue, a new investigation, a new solution, rather than repeating the same troubleshooting with the next caller (dependant on issue).</p>
<p>I had/have plans to push forward with a development business, but that isn&#8217;t taking off as well as it could be. I&#8217;m not a good marketer &#8211; when I review other attempts made by me, I do realise that.</p>
<p>Marketing Reps are expensive, and not something that can be afforded from a startup, word of mouth first requires mouths to give word out of. A telephone directory ad would just create phone calls &#8211; I can&#8217;t stress enough how much I dislike a telephone (yes, despite my large usage of SIP / VoIP when developing OzVoIPStatus).</p>
<p>Thinking of marketing, I&#8217;m reminded of that &#8216;thatradiobloke.com&#8217;advertisement, which makes sense &#8211; create a catchy advert and entice the listener to review the website to get the full details. Websites of course offer a LOT of information, more than a 30 second radio ad can convey (not every case applies, stupid flash splash pages for example).</p>
<p>So, back to where I was &#8211; where do I see myself in proceeding with Development? I could continue to try and follow up on creating a development company, and provide solutions to problems faced by IT users. What can I gain from Client Support? Patience and tolerance for the telephone, and the slow paced users on the other end. Not something I want much anyway.</p>
<p>What will my Diploma get me? Not a lot at the moment I imagine, but the future can hold many oppourtunities, so it&#8217;s important to keep doors open and ensure I have the capabilities to be dynamic (and have a dynamic, but extensive skillset). IT is a dynamic marketplace as well, new technologies replacing old (and I&#8217;ve used Windows Vista an approximate total of 1 &#8211; 2 hours).</p>
<p>I enjoy solving problems with programs, and creating solutions to IT problems, it&#8217;s &#8216;fun&#8217;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tocpcs.com/nearly-finished-diploma-studies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Rewarding Feeling</title>
		<link>http://www.tocpcs.com/the-rewarding-feeling/</link>
		<comments>http://www.tocpcs.com/the-rewarding-feeling/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 13:52:37 +0000</pubDate>
		<dc:creator>The Elite Geek</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.tocpcs.com/?p=486</guid>
		<description><![CDATA[I don&#8217;t find the end of a day providing client support rewarding. It&#8217;s actually quiet tiresome. It&#8217;s more fun providing support than it is assisting with product selection and sales enquiries, but client support doesn&#8217;t really leave one feeling the &#8230; <a href="http://www.tocpcs.com/the-rewarding-feeling/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t find the end of a day providing client support rewarding. It&#8217;s actually quiet tiresome. It&#8217;s more fun providing support than it is assisting with product selection and sales enquiries, but client support doesn&#8217;t really leave one feeling the raw feeling of acheivement at the end of a day.</p>
<p>I have just completed an accounting tool that I have been pushing through for a friend recently to assist with online data.</p>
<p>It uses Quickbooks, and interfaces a lot of his data with that provided by customers &#8211; all in the lead up to something bigger to happen later on.</p>
<p>But, as I go through all the bug fixes, and complete all the features and see the application form from a simple blank line of code to what is now.. 1006 lines of code, which helps with performing the tasks required in a very efficient manner &#8211; it saves on manual entry, I feel somewhat rewarded from the effort that has gone into it.</p>
<p>Sometimes it isn&#8217;t money that is the reward, but rather, seeing the completion of a development. </p>
<p>I enjoy developing, and that&#8217;s in the full sense of the term, from theoretical, through to the stages of development, information flow, and programming, and then UI design. It excites me, and then you find the feeling of accomplishment at the end, after you have pushed through all the issues, and made something from &#8211; nearly &#8211; nothing, and of course, it works. Naturally, no item of software is bug free &#8211; even Notepad has a bug, but development and testing show this is pretty well completed &#8211; I test a lot of code as I go, to ensure bugs are identified quickly. It slows development &#8216;slightly&#8217;, because if you get it right, then you are wasting marginal amounts of time testing to ensure perfection, but, then, if you later have to dig through the code to identify your bug, then  you&#8217;ll be in a different mindset and stuck reading through the code.</p>
<p>I guess that might somewhat apply to open source as well, when you have multiple developers, they&#8217;ll have to read through another developers code and wonder &#8216;what on earth was he thinking there&#8217;&#8211; naturally, typos, and logic errrors &#8211; or in the case of phones &#8211; train of thought interuptions can cause errors!</p>
<p>I&#8217;m still feeling happy with the completion of that, because it now signifies the possible start of the next stage, which is more web based, and I enjoy web development the most (yes, ignore OzVoIPStatus, it isn&#8217;t exactly the most developped website I have).</p>
<p>Oh, some &#8211; like Sydney &#8211; may be wondering where my views on Telstra, Optus, &#8220;Fox&#8221; Terria, the G9, and Broadband are. Currently, I&#8217;m avoiding those topics for a little bit, I have the new job to keep with, TAFE studies, and where I can fit items in, development &#8211; if only I could turn that into a full time, well paid job like my client support job.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tocpcs.com/the-rewarding-feeling/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Developer SDK</title>
		<link>http://www.tocpcs.com/developer-sdk/</link>
		<comments>http://www.tocpcs.com/developer-sdk/#comments</comments>
		<pubDate>Sat, 21 Jun 2008 02:48:00 +0000</pubDate>
		<dc:creator>The Elite Geek</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.tocpcs.com/?p=482</guid>
		<description><![CDATA[I&#8217;m currently developping an application, to allow for fast import of data, which is going to stem from a larger project to allow for better online service delivery. The accounting application used is one of the known brands of accounting &#8230; <a href="http://www.tocpcs.com/developer-sdk/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently developping an application, to allow for fast import of data, which is going to stem from a larger project to allow for better online service delivery.</p>
<p>The accounting application used is one of the known brands of accounting applications &#8211; there&#8217;s only two in Aus, and it&#8217;s not MYOB.</p>
<p>The company who develops or on-sells this international application to Australian users has it&#8217;s international version SDKs &#8211; pretty much a requirement for developping targetted applications to interoperate with their software &#8211; the SDK for US, UK, CA, and Online are available freely, online. Register, download a file, install it, SDK access in your browser in just moments.</p>
<p>The Australian version however, doesn&#8217;t differ significantly from the US and UK versions, with one exception. Tax. There is a feature built into the application to allow for a transaction to be entered as amounts &#8216;include&#8217;tax, or, if not ticked / or in SDK terms &#8216;specified&#8217;&#8211; then it assumes it isn&#8217;t tax inclusive and adds tax.</p>
<p>So, I dug through the SDK, found a &#8220;IsTaxIncluded&#8221; option related to non US versions &#8211; sweet, plug that option in, run an import and we should have tax inclusive accounting &#8211; it&#8217;d make it presented better when they are &#8216;printed&#8217;.</p>
<p>That didn&#8217;t work, the result from my XML request was a rather standard reply, showing it successfully took my request, processed it, and in my request, I specified &#8220;IsTaxIncluded&#8221; with a true parameter.</p>
<p>In the result, I read through, saw that it had added tax, and it simply ignored my &#8220;IsTaxIncluded&#8221; parameter. I&#8217;ve looked at the SDK information for what I am importing, and if I was running the UK version or the CA version, this would probably work without question, tax included.</p>
<p>The problem with the Australian version is the company that distributes in Australia charges $1999 to register as a developer, and the API is available, for a fee of $199, or the SDK for $499.</p>
<p>Interesting, I want to develop a rather small application that will simply interoperate with this companies bulk, slow processing peice of junk &#8211; and they want to rip my wallet out for $500 to provide only SDK access so I can see if there is a feature that can do it. Of course, I&#8217;m not going to pay that to see if such a TaxIncluded feature is on offer in their new SDK. Get stuffed. Why would I pay for information that the parent or development company provides freely for all other international versions, and the Australian company are simply stifling the development options?</p>
<p>I understand businesses are in business to make money, but fair dinkum, this company really don&#8217;t want to encourage users to take up their offering, there are alternatives which simply don&#8217;t require outlays of funds to do such a simple task.</p>
<p>It&#8217;d be OK to charge for SDK if they exposed the object via a query for a specific item- so let&#8217;s say I pushed through a query with a &#8220;Describe&#8221; option, it would give me back XML with all possible properties that can be set for that specific transaction &#8211; but nope &#8211; empty.</p>
<p>Even more so, this same company offers an Idiot Interchange File format (IIF). The file format has to be one of the worst. It&#8217;d have been easier to offer XML as an IMPORT method rather than work on a file format which has many, many flaws and restrictions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tocpcs.com/developer-sdk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>eWay Payment Gateway Issues</title>
		<link>http://www.tocpcs.com/eway-payment-gateway-issues/</link>
		<comments>http://www.tocpcs.com/eway-payment-gateway-issues/#comments</comments>
		<pubDate>Tue, 11 Mar 2008 14:19:38 +0000</pubDate>
		<dc:creator>The Elite Geek</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.tocpcs.com/eway-payment-gateway-issues/</guid>
		<description><![CDATA[Today I was fixing a credit card gateway issue with someones website. What seemed to be the case was that a cart system was purchased, and just on the fly someone decided to break away one of the existing payment &#8230; <a href="http://www.tocpcs.com/eway-payment-gateway-issues/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today I was fixing a credit card gateway issue with someones website.</p>
<p>What seemed to be the case was that a cart system was purchased, and just on the fly someone decided to break away one of the existing payment modules and slap something together which would work with eWay.</p>
<p>The system was passed back to them in &#8216;apparently&#8217;working condition.</p>
<p>When I looked at it today, I was surprised that such sloppy coding existed.</p>
<p>I saw an SQL query formed, referencing a nonexistent array (as in, no array was created whatsoever on that page). This problem was producing 500 errors for customers, and whilst the system was happily charging the credit cards, the SQL query formed after it was broken, so orders weren&#8217;t getting marked as paid.</p>
<p>The array not existing at all, but being referenced suggested that they had ported code from a previous module, which did include the array, and simply didn&#8217;t error handle or even test this (an array which isn&#8217;t declared throws a types exception when it doesn&#8217;t exist).</p>
<p>So, the fix naturally was to adjust the SQL query to suit the situation and get that live, but I can see immediately that most of the cart is a mess from what I&#8217;ll call &#8216;chop coding&#8217;&#8211; rather than develop the solution properly, buy someone elses and chop and slice til it works and the customer pays up (princely too, $3000+ for crap).</p>
<p>Lately I&#8217;ve been keeping occupied with finishing a project. You know, each time I get near that &#8220;it&#8217;s gotta be done&#8221; point, I find there is a little more to go. Still need to draft up some good old content pages for this, and then get some more behind the scenes stuff done. Then I can probably call it &#8220;Done&#8221; and set it live.</p>
<p>I could have it done tomorrow, thinking of it tonight, but when you hit that favourite stage, known as testing, you generally do find something needs to be fixed up and corrected so it performs nicely. It&#8217;s all part of the fun of creation though. Look at it, if it&#8217;s still not right, go back and fix it, repeat until satisfied.</p>
<p>I&#8217;m sort of excited to some extent. I want to see how it will go, but, I also want to make sure it&#8217;s done right, and done well to ensure that we don&#8217;t have any hiccups.</p>
<p>It&#8217;s taken a bit of time, but it is enjoyable at the same time. It&#8217;s something I can enjoy putting together, and something that will work well.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tocpcs.com/eway-payment-gateway-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stop spammers!</title>
		<link>http://www.tocpcs.com/stop-spammers/</link>
		<comments>http://www.tocpcs.com/stop-spammers/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 13:12:42 +0000</pubDate>
		<dc:creator>The Elite Geek</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.tocpcs.com/stop-spammers/</guid>
		<description><![CDATA[One of the reasons I can see spammers continually trying to connect to a server, is because they get rejected quickly, and have more than one bot to go and retry. I think the better solution to this issue (and &#8230; <a href="http://www.tocpcs.com/stop-spammers/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of the reasons I can see spammers continually trying to connect to a server, is because they get rejected quickly, and have more than one bot to go and retry.</p>
<p>I think the better solution to this issue (and issues related to SMTP auth attacks, and 550 errors), are having an error counter in the mail server software, and if they hit a number of errors, the connection is then blocked and the IP is firewalled (denied a connection) any further.</p>
<p>This is rather easy to implement, because most servers can choose whether they accept or deny a connection, and in the case I am thinking, it should be a matter of looking in an array, seeing if the address is firewalled, if it is, then the connection attempt simply isn&#8217;t allowed and the server doesn&#8217;t open it at all.</p>
<p>That, will in turn make spam attempts like the 550 &#8216;guess&#8217;ineffective, and ultimately destroy the spam attempts, getting closer to eliminating the needless waste of bandwidth the attacks on mail servers.</p>
<p>Spammers who try methods such as address guessing will find themselves unable to connect to many servers, and could perhaps consider a new career, perhaps as garbage collection, to repay for all the garbage they spit out.</p>
<p>As it stands, it is possible to analyse an army of logs I have now, and calculate the spammer IPs and place those in a database, which will be loaded by the server on startup and stored in an array.</p>
<p>The server then on connect attempt, will search that array for the address, and if it finds that it is in that list, then connections are denied.</p>
<p>Adminstrators of the server can then go and check a list of addresses and see if any are of interest or not, and if necessary remove them.</p>
<p>Most good configured mail servers which find they are disconnected will retry for days after, so reviewing a list of addresses (sorted by date added) should be a painless task to do.</p>
<p>This feature would be used in conjunction with greylisting for example, which already tells senders to try again later.</p>
<p>The IPs banned would be those which score 5 errors in a single connection, as these are typically the problem connections, from 221 and 89 IP ranges (but I&#8217;m not racist, or is it &#8216;IP-ist&#8217;?), so won&#8217;t block full countries of IPs.</p>
<p>This isn&#8217;t a complete solution to the identified issue, but, it&#8217;s a start at making it even less effective.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tocpcs.com/stop-spammers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nearly Diploma Certified</title>
		<link>http://www.tocpcs.com/nearly-diploma-certified/</link>
		<comments>http://www.tocpcs.com/nearly-diploma-certified/#comments</comments>
		<pubDate>Fri, 22 Feb 2008 12:37:32 +0000</pubDate>
		<dc:creator>The Elite Geek</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.tocpcs.com/nearly-diploma-certified/</guid>
		<description><![CDATA[At the end of last year, I concluded that I would want my Diploma in IT, and was certain to acheive that. I enrolled into the course then, and have found that I have a total of 800 hours (in &#8230; <a href="http://www.tocpcs.com/nearly-diploma-certified/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>At the end of last year, I concluded that I would want my Diploma in IT, and was certain to acheive that.</p>
<p>I enrolled into the course then, and have found that I have a total of 800 hours (in TAFE terms) of study to complete to get my Diploma in IT.</p>
<p>The hours are a little packed up, but those 800 hours are spread over around 23 seperate modules, and many of them aren&#8217;t really complex. With names such as &#8220;Design A Server&#8221;, and &#8220;Configure an Internet Gateway&#8221;, you can easily see that it isn&#8217;t really a packed up task.</p>
<p>When I started IT courses, during a slow period here on the Central Coast, I decided that I would study for a while, and see what doors opened later on.</p>
<p>I completed as far as the campus I was studying at was prepared for, of my Certificate III in IT, and despite not completing it 100%, completed a great deal of the course and then enrolled into a Cert IV afterwards with a different arena.</p>
<p>Throughout my studies of Certificate III, it was constantly drummed into us, that IT isn&#8217;t actually working with computers.</p>
<p>IT, is in fact reporting on technology. And a lot of reports are generated for some simple things.</p>
<p>Build a network for example, and the requirement is several pages of text detailing what the network should be capable of, and what expectations and maintenance requirements it will have.</p>
<p>And, of course, what business will gain from the network.</p>
<p>You look at that and you think, what a big waste of time, reporting on what essentially are obvious recommendations obtained through observation and benchmarking the network in place.</p>
<p>None the less, the concept of IT is writing reports on what will happen if this plug is pulled, and what will happen if this much money is spent.</p>
<p>Does management actually read such reports with interest? Or do they simply call the IT Guru in and stare amazingly at his wisdom that the business has yet again been able to produce a pretty pie graph on a wall?</p>
<p>Reporting isn&#8217;t that bad though, it&#8217;s always a constant look at what technology is doing for a business, and keeps everyone on top of the technology. A new CPU is released, the average professional would buy the CPU, turn the machine off, pull the old CPU out, plug the new one in, turn it on and see what magic they can do.</p>
<p>In Business, this is changed dramatically, prior to purchasing the CPU, a report is written on what the current system is capable of, what the new CPU will acheive, what performance benefits will be delivered, what sort of service effects it will have, what it will cost, and what enhancements can come in the future.</p>
<p>Then, if that&#8217;s approved, you would buy the CPU either using a purchase order which might involve a few emails and calls to the &#8216;Financing&#8217;department, then,  you would get the CPU.</p>
<p>With the CPU in hand, you must then, write up an implementation report, and get the implementation approved by management, to make sure they are fully aware of what is happening, what will happen if something goes bang, what if the CPU does not work and is faulty, essentially covering the details from start to finish.</p>
<p>Then, with that implemenation report approved, you can actually proceed with the implementation. Essentially, wait til after work hours, turn the server off, remove it&#8217;s cover, take off the fan, remove the CPU, install the new CPU, add a bit of cooling paste, install the fan, place the cover back on the server, power it on, and test to ensure there is no problems, and also test to see if the claimed performance gain is realised.</p>
<p>Then, yep, there&#8217;s more. You would write up a post implementation report, stating whether implementation was effective, what gains have been realised, and if any thing should be documentated about the installation.</p>
<p>And that&#8217;s how you install a CPU into a server in a real business environment, according to my Cert III studies. I have some doubts this is somewhat realistic, because I just don&#8217;t think business would pay someone to write 3 reports for 15 minutes work, but, it could happen.</p>
<p>The diploma is more a theory course then anything from what I gather, as it is a lot about how you would approach a situation, how you would design a server for example, or how you would ensure client privacy (yep, that&#8217;s one of them).</p>
<p>Not only do you &#8220;Design A Server&#8221;, but you also &#8220;Build and Configure a server&#8221;, and &#8220;Build a security shield for a network&#8221;.</p>
<p>From my previous studies, a lot of the IT Systems Admin arena is focussed on Active Directory networks, setting up Windows Domains, monitoring them, making sure they tick like clockwork, and upgrading them when required, securing them.</p>
<p>Writing reports isn&#8217;t really a big issue with IT, it&#8217;s great to some extent, as you gather a lot of data in a report, that can clear the water a little more, and you by research (required for many items), you naturally stay on top of the latest technology. You probably shouldn&#8217;t have a personal preference for any specific item, so that you can compare both side by side and always pick the best item, and know why you are picking it &#8211; something not always common with the &#8216;gamer&#8217;style CPU purchase, where they might buy a CPU because it has 4 cores, of which 2 are actually used.</p>
<p>It nearly all focuses on networking, ranging from managing a project, to gathering data for business, and translating business needs into technical needs, and after that, it&#8217;s maintaining system security, securing a network, ensuring user privacy, and so forth</p>
<p>Interesting, but not entertaining.</p>
<p>I estimate that if I actually got stuck in every day for a solid day, the course could reasonably be completed within 6 months.</p>
<p>I don&#8217;t get stuck in every day of course, because I simply just don&#8217;t get motivated much to get stuck into it (or anything else really). It&#8217;s sort of annoying that I can&#8217;t get buzzed into completing items like I used to be able to, it&#8217;s just so hard to get started on something, but, once I start something, I can generally follow it through to finish.</p>
<p>The start is the hardest, once started, the finish is nearly always insight. This same situation applies to OzVoIPStatus for example, where I have started a new layout, new design, and new pages for the site, and they are there waiting completion. One of the new pages has been sitting there for a while, waiting for me to code the rest of the &#8220;Provider URL&#8221; line that I had started weeks ago. It&#8217;s just &#8220;HARD&#8221; to get started.</p>
<p>TAFE work is easier, because it&#8217;s new and unstarted, once I start something though, and walk away from it, coming back to it another date isn&#8217;t interesting, but I do get there.</p>
<p>Maybe this is related to my arrangement of the room, or maybe something else, I&#8217;m not much for Feng Shui for example, I&#8217;m not 100% sure what&#8217;s dropped me off the regular motivation that I used to have to dig into and complete things, like I used to! I&#8217;m sure it&#8217;s something that can be sorted though by finding out what makes me comfortable when I was able to get stuck into things.</p>
<p>Maybe it&#8217;s just that firefox window with Whirlpool open that&#8217;s distracting me from what I&#8217;d usually do.. hard to tell.</p>
<p>Networking, gotta love it.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tocpcs.com/nearly-diploma-certified/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>That&#8217;s why they call it windows.</title>
		<link>http://www.tocpcs.com/thats-why-they-call-it-windows/</link>
		<comments>http://www.tocpcs.com/thats-why-they-call-it-windows/#comments</comments>
		<pubDate>Thu, 07 Feb 2008 15:01:36 +0000</pubDate>
		<dc:creator>The Elite Geek</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.tocpcs.com/thats-why-they-call-it-windows/</guid>
		<description><![CDATA[We took the car to the auto electrician today, and low and behold, the parts recycler gave us the wrong dang size electric window mechanism. So, tomorrow is going to be spent tracking down the right part, and then seeing &#8230; <a href="http://www.tocpcs.com/thats-why-they-call-it-windows/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We took the car to the auto electrician today, and low and behold, the parts recycler gave us the wrong dang size electric window mechanism.</p>
<p>So, tomorrow is going to be spent tracking down the right part, and then seeing if they can supply, if not, venturing a little further south to find one!</p>
<p>The auto electrician backed up my thinking that $75 was a bit rich to pay for it, but, they were cheaper then the other mob, who were both deceitful and rude.</p>
<p>Hopefully, they&#8217;ll be able to exchange it, if not, then, they can probably go find us rear spoiler LED brake lights.. I think that&#8217;d be pretty cool to get working again.</p>
<p>Anyway, more time and money spent fixing a window that should really have been tested before they passed the pink slip when it was sold. Bugger.</p>
<p>The other issue, was the speakers in the back need connecting properly, I&#8217;m able to do that, we just thought of a better way. Tape the new wires to the old, pull the old through, and remove the old, leaving the new one in the right place! Fantastic idea, hopefully it works in practice (so as long as the wires aren&#8217;t anchored anywhere).</p>
<p>In other news (sorry Sydney, not going to do the FTTH vs FTTN scenario tonight), I was fixing a laptop today, and discovered it had a rootkit on it.</p>
<p>You won&#8217;t generally know a laptop has a rootkit when you see it first off, mainly because it looks, acts and feels like normal most of the time, that is, until the ISP disconnects the dial up connection obviously due to SMTP activity (great idea this, if a customer is sending out spam &#8211; easily tracked, then chop the connection, repeat until they leave or its fixed).</p>
<p>The rootkit was a difficult issue to find and solve, mainly because it really didn&#8217;t seem to have many problems in testing, and all did look good, but I did indeed check for viruses, and PC-Cillin missed it entirely!</p>
<p>So, I had a poke at netstat -bno (this lists the binary that started it, numerical IPs to save on dns resolution, and the other option shows process ID as well).</p>
<p>Anyway, after looking at that, it was very clear the system itself was trying to spawn SMTP connections, and this was all from services.exe, so not something you can just &#8220;End Task&#8221; on.</p>
<p>The local computer shop wanted to charge the young girl $300 to fix the issue. Well, local computer shop, you better employ better technicians, because that issue cost no where near $300 to fix.</p>
<p>It was complex, it was a little out of the ordinary, but by no means did, well, we call technician time at .. $33 an hour for instore? So, 10 hours of work. No where near that. I had it for perhaps 2 hours or so, and it runs fine. No strange connections, no more foreign process running, all looks good.</p>
<p>The intention behind the rootkit was to find and collect mail servers, and package these and send to the admin of the IRC based bot net, so that they could use the network to spam.</p>
<p>The idea further was to go in undetected, so that they could escape detection (and it pretty much did escape every regular test I&#8217;d have done to find it, except netstat, which showed SMTP connections, and trend bitching about scanning outbound mail).</p>
<p>Trend failed to detect it as well, which is strange, the activity seemed pretty regular for an SMTP virus. Generally opens multiple connections to different servers in a short timeframe.</p>
<p>A regular PC user generally only opens one or two SMTP connections to one or two servers.</p>
<p>The fact this was trying to talk to 10 or so (I have a router I can block access to, and did so), mail servers alone was a big hint to perhaps it being virus activity.</p>
<p>Anyway, that&#8217;s why they call it windows. The both versions of windows can be annoying, and a little difficult to fix.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tocpcs.com/thats-why-they-call-it-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Indexes are your friend!</title>
		<link>http://www.tocpcs.com/mysql-indexes-are-your-friend/</link>
		<comments>http://www.tocpcs.com/mysql-indexes-are-your-friend/#comments</comments>
		<pubDate>Sun, 03 Feb 2008 14:06:56 +0000</pubDate>
		<dc:creator>The Elite Geek</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.tocpcs.com/mysql-indexes-are-your-friend/</guid>
		<description><![CDATA[I host a trivia room (well, two) on an IRC network, it gets a few visitors, and has a host of regulars and is a great room. I don&#8217;t have much involvement in it, it&#8217;s just running there, my partner &#8230; <a href="http://www.tocpcs.com/mysql-indexes-are-your-friend/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I host a trivia room (well, two) on an IRC network, it gets a few visitors, and has a host of regulars and is a great room.</p>
<p>I don&#8217;t have much involvement in it, it&#8217;s just running there, my partner does more with it then I do.</p>
<p>The trivia room runs off a MySQL database (primarily due to a redesign decision to give it more uumph then flat files), and I was just looking in their on an &#8216;occassional&#8217;view, and noticed that the answers were coming through quickly, but the messages that follow, that tell the user the score, etc, were taking seconds to come through, possibly frustrating players with the extended delay that follows (ie waiting on a new question).</p>
<p>Anyway, I was pondering whether it was the query causing the high load, or whether it was something external to that, or something else (when it comes to databases, the issues are either bad queries or bad design).</p>
<p>The query was an extended union all query, which I thought wasn&#8217;t going to do much benefit like that, so I changed the code base to instead execute single queries to see if that was the performance issue (its more work to union results together then just fetch more).</p>
<p>It didn&#8217;t work as planned and I was then thinking, wait, I wonder if this table has any indexes or keys. Turns out it doesn&#8217;t.</p>
<p>So, I added indexes on username, username and date, and date and id fields on the database.</p>
<p>Amazingly, after it took its time saving those, the performance when from slug, to super fast in seconds.</p>
<p>So, an index is important, as your database grows to millions of rows, you need to have an index for high speed data access (and it really does give you high speed data access).</p>
<p>How indexes work ? Essentially they are small files of data pointing to full row record positions, so that way when data is needed to be found, less scanning of the full table is needed (just go ask the index).</p>
<p>Setting them up depends on what you use in your question. I used username and date fields because they are predominantly what the where queries are based off, we ask where are all the fields with this username, or where are all the fields with this username and date.</p>
<p>It&#8217;s a lot quicker to fetch that way, because we now know all the positions with that information, so its just fetching, and then getting the data together into a recordset.</p>
<p>The server load should be better off now too due to that issue causing it to see MySQL slug down to a crawl to fetch points for a specific user.</p>
<p>In unrelated news, it seems like we might be stuck with our unstable ADSL2+ service, simply because the Optus DSL ports have restrictions on the profiles they allow to be set, I&#8217;m told a 1500/256k service is possible, as is a 8192/384 service, and finally, an ADSL2+ service with a limit of 20,000 / 820 is possible.</p>
<p>So, we are having drop outs primarily due to our attenuation being too low then the service can handle reliably, continuously, so, the fix is to put a profile somewhere in the middle on, something that delivers us around 8Mbit with 820kbps up.</p>
<p>Unfortunately, the Optus ADSL1 limited profile is 8192/384- exactly the crap I had from Telstra Wholesale, and the reason I moved away (faster upload speed, cheaper service, no STUPID artificial limits).</p>
<p>Anyway, I already know that the 8192/384 service was stable on my line, and free of drop outs, and if I was going to get the same on the Optus port, then we might as well as just go back to ADSL2+ mode and see what else can be done for the drop outs.</p>
<p>It seems however, we are stuck with them, they aren&#8217;t really much of a problem anyway, except if they happen during the day on a VoIP call. I don&#8217;t care if I&#8217;m asleep and it drops out for one minute and comes back, doesn&#8217;t really affect much.</p>
<p>I would rather a stable service, but, it seems, we can&#8217;t move address due to the 12 month contract on the DSL service, but also, it&#8217;s just recently emerging that the exchange is all out of ports (wow, they filled up fast).</p>
<p>So, hopefully, over the next 12 months, something happens to make our service stable (ie. technician fixes a fault, something gets done to fix the drop out situation if its crosstalk at the exchange, etc), or, we simply work around it, and see what alternatives pop up after 12 months (ie. Change address for stable service, or, change internet service if new technology emerges that provides equivilent benefits).</p>
<p>I wonder how many ports Optus do deploy in their roll outs compared to customers they have. It can&#8217;t be too many, because they do seem to fill up quickly.</p>
<p>Our ADSL1 contract wasn&#8217;t supposed to be up til February, I was pondering waiting the 2 months for it to finish, but concluded this situation might happen, and watching neighbouring Gosford, I was right, they filled fast, and no new ports have been added to cause Gosford to become available.</p>
<p>I can work with drop outs, they don&#8217;t affect us much at night anyway (though they do happen at 9pm as well).</p>
<p>I&#8217;ll see how the second line works out too, which is going to get a ADSL2+ modem eventually too!</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tocpcs.com/mysql-indexes-are-your-friend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Analytics: Useful data?</title>
		<link>http://www.tocpcs.com/google-analytics-useful-data/</link>
		<comments>http://www.tocpcs.com/google-analytics-useful-data/#comments</comments>
		<pubDate>Sat, 02 Feb 2008 14:56:47 +0000</pubDate>
		<dc:creator>The Elite Geek</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.tocpcs.com/google-analytics-useful-data/</guid>
		<description><![CDATA[Google Analytics is a great Google service (from the company of &#8220;Do No Evil&#8221;), but, how useful is it really? They don&#8217;t seem to have much in the way of Adwords integration with Analytics for testing a complete visit from &#8230; <a href="http://www.tocpcs.com/google-analytics-useful-data/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Google Analytics is a great Google service (from the company of &#8220;Do No Evil&#8221;), but, how useful is it really?</p>
<p>They don&#8217;t seem to have much in the way of Adwords integration with Analytics for testing a complete visit from click on search engine through to complete sale, and even then, they don&#8217;t report adequately on the path a sale took, or how long the sale spent on the different pages.</p>
<p>A more useful report would be one that could categorise the conversion failures, so that they are easily identified and able to be worked against.</p>
<p>Or, if that&#8217;s anti-Google (and therefore Google doing evil) then perhaps an alternative is ideal, a report that takes out all non converting traffic, so you can see the detailed sales statistics of where a sale originated, and how it finished (did they read everything, or just 10 seconds?).</p>
<p>Those reports could be used by e-marketers to determine what keywords work best, what doesn&#8217;t work at all, and what is ideal for use on a regular basis, and what has short term good or bad effects.</p>
<p>Essentially, the tool is a great tool for analyising traffic, but it doesn&#8217;t meet the standard required for isolating traffic which isn&#8217;t sales related, meaning the data is inflated, and doesn&#8217;t isolated clicks wasted on Google Adwords (where the viewer didn&#8217;t actually view content, or where they didn&#8217;t wait for page load).</p>
<p>The reason behind this is, 560 clicks registered in Google Adwords, yet only 455 visits from that keyword registered in Google Analytics place the statistics in a question of accuracy (the numbers should match, right?).</p>
<p>I&#8217;d like to see someway of them improving the accuracy of statistics so that there is accuracy, and where a click on an ad doesn&#8217;t hit the site, credit applied for such cases (they obviously have the ability to detect such activity if you have Analytics running).</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tocpcs.com/google-analytics-useful-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Development: $3500 and still not right.</title>
		<link>http://www.tocpcs.com/web-development-3500-and-still-not-right/</link>
		<comments>http://www.tocpcs.com/web-development-3500-and-still-not-right/#comments</comments>
		<pubDate>Fri, 01 Feb 2008 12:59:51 +0000</pubDate>
		<dc:creator>The Elite Geek</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.tocpcs.com/web-development-3500-and-still-not-right/</guid>
		<description><![CDATA[I&#8217;m amazed when I see this sort of items appear in front of me. Some one paying thousands of dollars for a &#8216;web site&#8217;and getting what amounts to automatically generated rubbish, or unplanned scripting errors and the like. The business &#8230; <a href="http://www.tocpcs.com/web-development-3500-and-still-not-right/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m amazed when I see this sort of items appear in front of me.</p>
<p>Some one paying thousands of dollars for a &#8216;web site&#8217;and getting what amounts to automatically generated rubbish, or unplanned scripting errors and the like.</p>
<p>The business today I spoke to had an issue with a website they paid $3,500 for, and over the course of a few years, apparently near $5000. It&#8217;s nothing too flash, a bit of a flash entry page, then a template CMS overlayed with CSS, and a cart system added from an outsourced company bundled together for the sum of $3,500.</p>
<p>Amazing, right?</p>
<p>Well, the developer of the website refuses to support it any more, and the issue presented to me was the check out process was broken, and taking credit cards wasn&#8217;t working.</p>
<p>So, I got into action later on, working from the ground through the process, isolating the error, and then finding a fix for it.</p>
<p>The first issue was a lack of recognition of currency, the cart thought &#8220;AU&#8221;, where as the actual is &#8220;AUD&#8221; (matched in database).</p>
<p>So, I overrode its detection and coded it for AUD, and that works for that bit.</p>
<p>Fixed in moments.</p>
<p>Then, came the second issue, eWay payments not being processed. Not a tricky one, considering the error message told us all anyway. The system uses an XML sheet POST / Response request to send and receive data from eWay, and it was not able to resolve www.eway.com.au . No biggy, that&#8217;s easily solved with coding the IP into the system instead.</p>
<p>Well, I was wrong, the SSL certificate needs to match the domain name for XML HTTP, so that meant the hard way about it, getting DNS resolution working on the Intaserve web hosting.</p>
<p>I contacted the company and advised DNS resolution wasn&#8217;t working on one of the servers they have, and the response I got back consisted of a ping attempt to the computer name of the server.</p>
<p>Gee, I didn&#8217;t say I couldn&#8217;t resolve it, I said IT couldn&#8217;t resolve.</p>
<p>Anyway, I tested moments later after sending them an email that they needed to investigate DNS resolution on the server itself, and after testing, discovered the issue was fixed (probably from the client contacting the host directly).</p>
<p>So, that was all well and good. Fixed. Website works A-OK.</p>
<p>The question remains however, will I get paid my fee for fixing that? They claim they shouldn&#8217;t pay, because they&#8217;ve paid $3,500 to someone to fix it.</p>
<p>By pure co-involvement with the developer (not developing however), he believes that he shouldn&#8217;t pay as he paid for it when the site was established.</p>
<p>My counter argument here is that I didn&#8217;t develop the site, I merely suggested I fix the website, and I get paid if I fix it.</p>
<p>The site is fixed, hey, I thought they&#8217;d have no issue paying my minor suggested fee, and I&#8217;m a productive person anyway, I use my time wisely, while they are considering whether to pay me, I have the job done, they pay.</p>
<p>I&#8217;m not destructive either, so, if they don&#8217;t pay, essentially it&#8217;s just $33.00 lost (my fee for fixing it, took about 30 minutes to an hour).</p>
<p>I&#8217;m still amazed at the $3,500 charged, for something with such an issue (it&#8217;s an inconsistency issue), and the other issue being a DNS issue.</p>
<p>But, I&#8217;m now amazed at the businesses apparent refusal to cough up $33.00 for the time I spent on fixing the website, which they claimed they so badly needed (even resorting to threatening the co-associate with legal action, he doesn&#8217;t actually develop any more).</p>
<p>It&#8217;s $33.00. If you are losing as many sales as you claim you are, the $33.00 will be easily found in the profits of future sales.</p>
<p>It&#8217;s not really bothering me, and I won&#8217;t name names here (except the webhost, they should have their own gear in order and make sure DNS resolution is possible for customers by having multiple DNS servers), it&#8217;s not really a big issue, it&#8217;s just amazing that they spent so much on what amounts to around half that in actual presentable work, and the reluctance to pay for something they were claiming cost them sales, and were ready to launch legal action to try and solve anyway.</p>
<p>I should up my development prices, if there are suckers out there paying so much for so little, I should start profiting. It&#8217;s in my best interests to do so.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tocpcs.com/web-development-3500-and-still-not-right/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Virtual Disk Space fixed!</title>
		<link>http://www.tocpcs.com/virtual-disk-space-fixed/</link>
		<comments>http://www.tocpcs.com/virtual-disk-space-fixed/#comments</comments>
		<pubDate>Wed, 30 Jan 2008 15:30:00 +0000</pubDate>
		<dc:creator>The Elite Geek</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.tocpcs.com/virtual-disk-space-fixed/</guid>
		<description><![CDATA[I fixed my virtual hard drive . Now has a brillant (yet imaginary) 116GB of Free Space. Fantastic. The fix was to simply run resize2fs with it mounted in read/write mode, I kept assuming it&#8217;d need them not mounted, so &#8230; <a href="http://www.tocpcs.com/virtual-disk-space-fixed/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I fixed my virtual hard drive . Now has a brillant (yet imaginary) 116GB of Free Space. Fantastic.</p>
<p>The fix was to simply run resize2fs with it mounted in read/write mode, I kept assuming it&#8217;d need them not mounted, so was trying to resize it, when it wasn&#8217;t existing.</p>
<p>I got some sweet speeds on the Exetel mirror today too, leeching CentOS 5 ISO (650MB) in just 12Mins  (around 998KB/sec).</p>
<p>The line drop out situation isn&#8217;t improving however, and I&#8217;m not certain I want to drop the speed profile down to the ADSL2 or ADSL1 mode for the sake of making the connection stay up more. A drop out every 24 hours or so is OK, sure, its better to have none, but, well, that&#8217;s not gonna happen sometime soon, here&#8217;s why.</p>
<p>A news article today reveals Telstra technicians have resorted to taping cables together with plastic bags to keep them dry, due to staff shortages resulting from the sacking of 12,000 Telstra employees (says the union).</p>
<p>So, what will happen when the plastic bags cop a good dose of lightning, and end up welded to the copper wire (or welding copper wires together). Will Telstra accept responsibility for the crossed wires and pay compensation due to breach of privacy on some mass scale (all those copper wires being welded together by lightning would result in much a case of people listening to other peoples conversations).</p>
<p>Who knows&#8230;  What will be the result of all this plastic bag repair work? What happens when the destruction comes too much to bear and the copper cables start requiring full replacement?</p>
<p>Or, is this some elaborate plan to derail the PSTN network to make FTTN a near requirement?</p>
<p>I found the news story amazing, at the same time disturbing, shouldn&#8217;t they have their cabling licenses removed for doing unsatisfactory work (surely, plastic bag repairs aren&#8217;t AUSTEL certified).</p>
<p>It&#8217;s a good thing we don&#8217;t live in Sydney though, where most of this seems to be the problem!</p>
<p>As per usual though, it pays to keep a second service (mobile phone) on standby incase of phone line issues, etc.</p>
<p>The Virtual Server issue being fixed meant that I could proceed to getting the next task on the list done,  updating it, which went through nicely, and allowed me to do something else, get asterisk running on it &#8211; yes, probably heaps quicker to setup a second VM, but I wanted one machine for many reasons, server load is one.</p>
<p>Our juice bill came today, and it was a good result, with the bill dropping on average 4KWH/day.</p>
<p>We just removed our off peak hot water systems equivilent load from the bill, and after todays measurement, looks like it could be dipping down some more with the new washing machine in place (larger washer, but less loads needed to meet demand).</p>
<p>I&#8217;m happy with the results, and hopefully we can see a natural progression in the drop for another bill, before we might either dip to the bottom, or find new ways to reduce consumption even further.</p>
<p>It&#8217;s good at least, that we have removed the equivilent of a hot water system from our bill. For the savings, we could be running 2 split system air conditioners (or, keep the savings).</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tocpcs.com/virtual-disk-space-fixed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The right way, the wrong way, and.. the backward way.</title>
		<link>http://www.tocpcs.com/the-right-way-the-wrong-way-and-the-backward-way/</link>
		<comments>http://www.tocpcs.com/the-right-way-the-wrong-way-and-the-backward-way/#comments</comments>
		<pubDate>Sun, 27 Jan 2008 14:09:52 +0000</pubDate>
		<dc:creator>The Elite Geek</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.tocpcs.com/the-right-way-the-wrong-way-and-the-backward-way/</guid>
		<description><![CDATA[There are 3 ways to do things. Homer: The right way, the wrong way, and the Max Power way. Bart: Isn&#8217;t that just the wrong way, but faster. Homer: Yes. I&#8217;m reminded of that episode of The Simpsons each time &#8230; <a href="http://www.tocpcs.com/the-right-way-the-wrong-way-and-the-backward-way/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There are 3 ways to do things.</p>
<p>Homer: The right way, the wrong way, and the Max Power way.<br />
Bart: Isn&#8217;t that just the wrong way, but faster.<br />
Homer: Yes.</p>
<p>I&#8217;m reminded of that episode of The Simpsons each time I hear of someone trying to do something where something else is already available to do the task at hand rather simply, or where they could have done it quicker if they thought things out differently.</p>
<p>I generally try and find the best possible solution for any issues I come across, I consider the quickest approach, the effects of that, the cost (if any), and whether alternatives exist that will promote future technology choices.</p>
<p>The balance of these generally means the decision made is closest to the right decision where possible (of course, I did myself make wrong decisions, one of that was the layout of OzVoIPStatus, not the easiest for maintenance).</p>
<p>But, I&#8217;m deeply amused at someone taking the HTTP protocol and using sockets coding to simply use sockets and clean up all the HTTP request data on a program they are writing.</p>
<p>I would almost certainly have chosen to use the IE COM object, or fetched the URL using a HTTP Request and then took advantage of the DOM object.</p>
<p>Or, even, using XML for the request and response.</p>
<p>The amusing part focuses on the fact they chose to talk to the application using sockets, which means flushing out all the server crap, and what happens when they change HTTP server? Or they add an extra application that adds more header lines?</p>
<p>The application could easily break and would require more maintenance, then it would if a standard was used.</p>
<p>Funny, sure, but it&#8217;s a little backward and counter productive when you look at the alternatives.</p>
<p>More likely, they weren&#8217;t aware of the alternatives, and are great at sorting problems out in a different way, rather then finding a solution to the problem, they make a new solution to a problem best solved with different technology.</p>
<p>&#8220;A different approach&#8221;.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tocpcs.com/the-right-way-the-wrong-way-and-the-backward-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Virtual Machines &#8211; Lowering the rise.</title>
		<link>http://www.tocpcs.com/virtual-machines-lowering-the-rise/</link>
		<comments>http://www.tocpcs.com/virtual-machines-lowering-the-rise/#comments</comments>
		<pubDate>Wed, 23 Jan 2008 15:23:56 +0000</pubDate>
		<dc:creator>The Elite Geek</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.tocpcs.com/virtual-machines-lowering-the-rise/</guid>
		<description><![CDATA[Virtual Machines are a great way at hosting multiple services, and keeping your overall costs low. Computers have become very much so beefed up that the grunt they have spends a lot of time idle, and only peak loads when &#8230; <a href="http://www.tocpcs.com/virtual-machines-lowering-the-rise/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Virtual Machines are a great way at hosting multiple services, and keeping your overall costs low.</p>
<p>Computers have become very much so beefed up that the grunt they have spends a lot of time idle, and only peak loads when you are doing intensive tasks, even then, they generally keep within 50% of the processors full capacity.</p>
<p>Game play will use more of that processor usage, but that doesn&#8217;t really come into question in the server environment.</p>
<p>So, just about many of the servers out there are very capable of having additional virtual servers added to them, and with the price of disk space falling, virtualization technologies are very much viable.</p>
<p>I run Virtual Server here at my home, and it hosts my linux test environment, this is to save me booting between OS and also allows me to have computing resources available to me simultaneously.</p>
<p>So, I don&#8217;t need a second server running, I don&#8217;t need to pay for extra hardware, power, or anything like that, when I want to run the linux machine (and we use it often enough anyway).</p>
<p>One common issue with Virtual Server Linux Virtual Machines is the clock being out of sync and audio style resources skipping ahead or behind in the established virtual machine.</p>
<p>The fix to that is a combination of setting &#8216;clock=pit&#8217;as a boot parameter, and also installing virtual machine additions.</p>
<p>If you run a CentOS distro though, installing Virtual Machine additions as recommended doesn&#8217;t work as expected.</p>
<p>The reason for this is, the ./install.sh script looks for a string in the /etc/redhat-release file.</p>
<p>The string it is looking for is the third one. So, on Red Hat (where CentOS is derived) it would be &#8220;release&#8221; - Red Hat Release.</p>
<p>On CentOS however, it is &#8220;final&#8221; &#8211; CentOS release final.</p>
<p>The fix to this? Couldn&#8217;t be simpler.</p>
<p>nano into /etc/redhat-release, and between CentOS, add a space, so it might read Cent OS release.</p>
<p>Make sure you have the kernel sources (yum install kernel-devel), and that will allow the virtual machine additions to install, and once installed, leave as is, or just change it back.</p>
<p>Use Virtual Machines, there really isn&#8217;t much going against them, they save power, they allow you to have the extra resource available (ie. Linux system) as well as your Windows machine.</p>
<p>And, Virtual Server is one of Microsoft&#8217;s good releases, it&#8217;s a great setup for virtualization, nothing silly like VMWare, just straight forward virtual machines.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tocpcs.com/virtual-machines-lowering-the-rise/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

