Monthly Archives: July 2012

I wanted to use BGInfo to display only the IPv4 address(es) of a workstation. BGInfo’s built-in IP address ouput returns both IPv4 and IPv6 formatted addresses, but you can use the output of a VBScript as a data source for a custom field. Starting with the nice script provided in the comments of the TechNet forum thread at: WMI Query to retrieve only active IPv4 address, I’ve made a few aesthetic changes so that the IPv4 addresses of active network adapters are displayed in a single column.

'From http://social.technet.microsoft.com/Forums/et-EE/ITCG/thread/bb74c2eb-eca2-455d-a270-8dd0f3d195e6

strMsg = ""
strComputer = "."
intCounter = 0

Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\" & strComputer & "rootcimv2")
Set IPConfigSet = objWMIService.ExecQuery("Select IPAddress from Win32_NetworkAdapterConfiguration WHERE IPEnabled = 'True'")

For Each IPConfig in IPConfigSet
 If Not IsNull(IPConfig.IPAddress) Then
 For i = LBound(IPConfig.IPAddress) to UBound(IPConfig.IPAddress)
  If Not Instr(IPConfig.IPAddress(i), ":") > 0 Then
	If intCounter > 0 Then
		strMsg = strMsg & vbcrlf & vbtab & IPConfig.IPAddress(i)
	Else
		strMsg = IPConfig.IPAddress(i)
	End If
	intCounter = intCounter + 1
  End If
 Next
 End If
Next

Echo strMsg

Ideally, I’d be able to report whether the IP address was attached to a wired or wireless adapter, but that is beyond the scope of this particular project.

But, in the event that someone wants to do something that sophisticated, Microsoft’s WMI Code Creator v1.0 would be a very good place to start.

The WMI Code Creator tool allows you to generate VBScript, C#, and VB .NET code that uses WMI to complete a management task such as querying for management data, executing a method from a WMI class, or receiving event notifications using WMI.
http://www.microsoft.com/en-us/download/details.aspx?id=8572

Hint: look at the Description property of the Win32_NetworkAdapterConfiguration class.

I wanted to find the fastest SD card for my Raspberry Pi, or at least one that wasn’t so slow that it was going to cause a bottleneck. There are a few threads on the raspberrypi.org forums about performance benchmarks. The prevailing opinion on the “SD Card Benchmarks” thread at raspberrypi.org is that the SanDisk Ultra SDHC 8 GB Class 6 cards have perhaps the best random read/write speeds, which people feel is a good, if theoretical, metric for how the Raspberry Pi will access the card. But at least one Raspberry Pi owner who had done some of the benchmarking that suggested SanDisk Ultra cards would be ideal discovered that the board would not boot from the card.

And there are enough other reports of SanDisk Ultra Class 6 cards not working to convince me to fall back to a regular SDHC Class 4 card.

With so much uncertainty around which cards will work, I’m keeping an eye on the growing list of known-good and known-bad SD cards for the Raspberry Pi at elinux.org.

Of the Class 4 SanDisk Ultra cards, SanDisk Ultra 4GB SDHC Class 4 Flash Memory Card SDSDH-004G-U46 is reported to work, but it requires that the power be disconnected and the card allowed to sit for a minute or two before it will reboot. That may be acceptable for a use case where the Raspberry Pi is sitting on my desk, but not one where it will be tucked behind other equipment.

I happened to be near a Walmart over the weekend, so I stopped in and picked up a SanDisk 4GB SDHC Class 4 Flash Memory Card SDSDB-4096-AW11. I benchmarked it with CrystalDiskMark, and found it to underperform my target of random write speeds of 1 MB/s.

-----------------------------------------------------------------------
CrystalDiskMark 3.0.1 x64 (C) 2007-2010 hiyohiyo
                           Crystal Dew World : http://crystalmark.info/
-----------------------------------------------------------------------
* MB/s = 1,000,000 byte/s [SATA/300 = 300,000,000 byte/s]

           Sequential Read :    12.281 MB/s
          Sequential Write :    11.721 MB/s
         Random Read 512KB :    12.548 MB/s
        Random Write 512KB :     2.475 MB/s
    Random Read 4KB (QD=1) :     4.713 MB/s [  1150.7 IOPS]
   Random Write 4KB (QD=1) :     0.024 MB/s [     5.9 IOPS]
   Random Read 4KB (QD=32) :     4.977 MB/s [  1215.0 IOPS]
  Random Write 4KB (QD=32) :     0.025 MB/s [     6.2 IOPS]

  Test : 50 MB [H: 0.0% (0.0/3773.5 MB)] (x5)
  Date : 2012/06/01 20:34:28
    OS : Windows 7  SP1 [6.1 Build 7601] (x64)

Assuming it boots and reboots normally, I’ll probably use it until the community settles on a real-world benchmark that run on the Raspberry Pi.

And just for posterity, the proper way to format an SD card and ensure optimal performance is to use the SD Formatter software from the SD Association.

I want the SparkFun VC830L multimeter, to replace a $10, no-name multimeter that I’ve had for a few years (and it still works, but the probes are falling apart).

SparkFun VC830L multimeter

SparkFun VC830L multimeter

This is for all those starving students that need to buy their first good, low-cost multimeter. This meter has really impressive overall feel for being so low-cost. We’ve played with a lot of cheap-o DMMs and found that this unit’s function selector has a great, solid, clicking feel to it. This unit has good continuity (rare for low-cost units), and decent probes.
http://www.sparkfun.com/products/9141

And while I’m at it, I’d also like a GE 50957 GFCI Tester. I’m weird about plugging a multimeter into an outlet in order to test for incorrect wiring.

GE 50957 GFCI Tester

GE 50957 GFCI Tester