Tuesday, April 16, 2013

Finding the data source for a particular device in NPC

Recently, we needed to know which data source was contributing to the report data for a particular device in NPC.  This was fairly easy to find out given a simple query:

mysql -P 3308 -D netqosportal -e "select a.itemname as Device, v6_ntoa(a.address) as Address, b.consolename as DataSource from dst_device as a, data_sources2 as b where a.sourceid=b.sourceid and itemname like '%devicename%' order by a.itemname;"

Simply replace devicename with the device name and execute this at a command prompt on the NPC server.  The result should look something like this:
+------------------------+-----------------+----------------------+
| Device                 | Address         | DataSource           |
+------------------------+-----------------+----------------------+
| center                 | 192.168.100.2   | NetVoyant            |
| nacogdoches            | 192.168.100.3   | NetVoyant            |
| nacogdoches            | 192.168.100.3   | ReporterAnalyzer     |
| houston                | 192.168.100.4   | ReporterAnalyzer     |
| houston                | 192.168.100.4   | NetVoyant            |
| dallas                 | 192.168.100.5   | ReporterAnalyzer     |
| dallas                 | 192.168.100.5   | NetVoyant            |
| sanfelipe              | 192.168.100.6   | ReporterAnalyzer     |
| sanfelipe              | 192.168.100.6   | NetVoyant            |
| austin                 | 192.168.100.7   | ReporterAnalyzer     |
| austin                 | 192.168.100.7   | NetVoyant            |
| elpaso                 | 192.168.100.8   | NetVoyant            |
| brownsville            | 192.168.100.9   | NetVoyant            |
| beaumont               | 192.168.100.10  | NetVoyant            |
| lufkin                 | 192.168.100.11  | NetVoyant            |
| ftworth                | 192.168.100.12  | NetVoyant            |
| ftworth                | 192.168.100.12  | ReporterAnalyzer     |
| tyler                  | 192.168.100.13  | ReporterAnalyzer     |
| tyler                  | 192.168.100.13  | NetVoyant            |
| henderson              | 192.168.100.14  | NetVoyant            |
| amarillo               | 192.168.100.15  | NetVoyant            |
| amarillo               | 192.168.100.15  | ReporterAnalyzer     |
| sanantonio             | 192.168.100.16  | NetVoyant            |
| bexar                  | 192.168.100.17  | NetVoyant            |
+------------------------+-----------------+----------------------+

It would be nice if NPC or the new CAPC had some kind of feature that showed the datasource(s) for a particular object on the device details page.

Thursday, April 4, 2013

Raspberry Pi

Today I joined the latest craze sweeping the Internet.  No, not Vadering (although I should look into how that could be done with the boys).  I bought two brand new computers today.  It cost me a total of $70 + shipping.  Well, actually, I didn't buy the whole computer, I just bought the motherboard, which has the processor, RAM, video card (with HDMI and analog RCA out), audio card, SD card reader, onboard NIC and 2x USB ports.  It's all built into a special little PCB (printed circuit board) that takes advantage of SOC (system on a chip: basically the main guts of a computer all on one chip, similar to most tablets and phones).

It's called Raspberry Pi and is produced by a non-profit organization that designed them to be used in developing countries for education.  Since it's a charity, they designed the board to be extremely cheap and can sell it for $35!  They're currently being distributed through three reseller partners officially.  Each reseller also sells in bulk to other companies so you can find them elsewhere.  The main drive for resellers is the accessories that go a long with it (more about this later).  RS (only in Europe), Allied Electronics, and Element14 (through Newark) are the official resellers.  For more information, check out the video below or read this article.

I ordered two of them today because for a long time both model A and model B were out of stock everywhere.  My dad reminded me last night that they were back in stock so I got one for him and one for me this morning.  Here's a good video to introduce what's really behind it.
It should be here within a few days.  All that actually comes in the box is the board, no case, no cables, no nothing.  So, I'll go dumpster diving into my crates of extra parts in the garage for a 700mA USB power supply (I wonder if the dual USB plug for my portable hard drive would allow this to be powered from my USB hub...), HDMI to VGA converter so I can plug it into my desk monitor, a USB keyboard and a USB mouse (maybe I'll use my Bluetooth dongle and the Logitech diNovo Mini keyboard...), and an SD card.  I think I'll start by running Rasbian Wheezy, just to see how well it performs normal desktop tasks.  After that I'm going to use it as a test bed for XBMC with RaspBMC to potentially replace my current Windows Media Center dependent installation.

Anyway, I'll try to post my progress as things go along.  Eventually, I'll be looking into putting this thing into a case and see what happens.  Here are some of the cases I'm looking at

I might even consider making a competitor to the iMac:
 versus