website tracking
Logo
Japan
 
My Photo
Name: James Pearce
Location: Perth, WA, Australia

Powered by Blogger

Splunking On A Budget
Wednesday, July 30, 2008
/Splunking/ v, as in "To Splunk", "I was splunking"

Really though, it's a software program. Splunk. It's great - it's like Google for log files :D
It's a resource hog though. The minimum specifications on the Splunk site say 1.4GHz. Well, I installed it on my Via C3 1GHz and it was ok. Then I got interested, and now I have it installed on my K6-2 333Mhz with 128MB of RAM ;)

Actually the RAM is a problem. The machine swaps with only 128M. Badly. The load is steady at about 0.3 though, so the CPU is fine. During a search, it will usually shoot up to 1. The Via machine didn't swap much though, and that only has 384MB of RAM. So the more RAM the better (Splunk do actually mention that that program is very memory-hungry).

I don't have many log files though. A couple of hundred MB all up. Also, I don't intend on keeping more than a months worth of log files in Splunk. Most problems I have with my servers occur within a matter of hours, not weeks! To make Splunk delete files after they get older than 30 days:

vi /opt/splunk/etc/system/local/indexes.conf

And insert the line:

frozenTimePeriodInSecs = 2592600
Gigabyte GA-M61PME-S2
Thursday, July 24, 2008
Just installing Vista on this sucker with a SATA drive. I discovered that if I enable SATA but disable RAID, Vista will not pickup the drive. Even if I download the proper Gigabyte SATA drivers, it just won't detect. This board doesn't have an option to enable IDE-Emulation on the SATA ports.

The fix? Enable SATA RAID. Then hit F10 at boot and define a spanning array, make it bootable. Vista detects it straight away without the need for an additional device driver.
20 + 4 = 20
Tuesday, July 22, 2008


I was recently building a PC box for someone where I was buying the CPU / mainboard new and using other components 2nd hand. That means I had a 2nd hand case and PSU. Now, the 2nd hand components arn't that old, else I wouldn't use them for someone elses PC.

The 1st problem I ran into is that the new AMD X2 board I bought (Gigabyte M6TPME-S2) uses a 24 pin power connector. It took a bit of Googling, but I found a many people saying that you can plug the old 20 pin ATX connector into the 24 pin port. And it's true. Actually it does mention that in the mainboard manaul, right alongside where it says "It is recommended to use a 400W power supply otherwise the system may fail to boot" ;)

The best article on power I found covers some nice history of power in computers. Now, I was going by guide of the 20+4 pin ATX connector that the additional 4 pins are on the left hand side of the connector with the locking mechanism facing away from me. But if you read the section on the 24 pin connector, they have actually adjusted the holes to use a round / square combination so the 20 pin connector will only fit in one way. Thanks!

So even though it's a 300W PSU with the additional 12V ("P4") cable, the system booted. Kind of. It powered on, but would not POST and would not power the video. Guess I need that 400W sigh.
Editing Individual Munin Values
Thursday, July 17, 2008

I recently had a situation where I installed a munin-node on a server, and the first readings it put out were garbled. I mean, that were 10^250 or some such ridiculous value. This was messing up the graphs for the day...and then the week and so on. It also messed up the averages.

I figured there must be an out-lier that was causing this to happen, but I was stuck with the issue of how to remove this single value (or string of values). Munin stores it's values in an RRD stored in /var/lib/munin on Debian. What I had to do was to export each database for the graph I was concerned about - the memory graph has several elements, each one a separate database - into XML. Then edit the XML (just replacing the out-lier with NaN does the trick). Then reimport the XML, forcing overwriting of the existing data to make sure I replace the old value.

cd /var/lib/munin
rrdtool dump server-memory-swap-d.rrd > /home/user/server-memory-swap-d.xml
rrdtool restore /home/user/server-memory-swap-d.xml server-memory-swap-d.rrd -f
Portable DVD Garbage
Monday, July 7, 2008
A while ago I bought a portable DVD player off eBay. Actually, what I was after, was a DIVX player with an optical drive. I bought one of these PA-340A machines, it looks like a discman, but it has the video out capability and plays DIVX and DVD. I've got to say, after owning it for almost 6 months, I'm not very happy with it.

I won't go through the whole drama, but suffice to say, the optical drive is terrible. At first, it would only read some of my discs. And then, it would only play some of the DIVX movies (guess they didn't use a very good decoder chip). Then, it stopped reading any of my data discs (MP3, photos, DIVX, anything!). This is CDR and CDRW (and DVDR) discs. It still played DVD's though.

Eventually I resorted to dumping my movies to a USB key and running them off that. The problem is, when the device reads the USB interface, it produces static on the image. So it's kind of useless as a proper entertainment device.

I did get a USB CDROM and try that, but it refused to interface with the CDROM correctly.

Guess I'm going to go back to a small PC and geexbox. Oh well, at least it will work!