Geek Speak

TIME_WAIT perfmon counters

I’ve built a small Windows Service which exposes perfmon counters to track sockets in TIME_WAIT state. It can be downloaded from the links later in this post. Back in 2011 I was helping a client look for issues in their systems caused by having too many sockets in a TIME_WAIT state (see here for why this can be a problem). This was affecting their connectivity. Rather surprisingly there seemed to be no way to track the number of sockets in TIME_WAIT using perfmon as there didn’t seem to be a counter exposed.

Visual Studio 2013 Preview - isprint() incorrectly classifies ' ' as printable for 'C' locale.

It seems that `isprint() is broken. The following program demonstrates the problem. In VS20013 it prints “test failed” in all previous versions of visual studio it prints “test passed”. From this reference: http://en.cppreference.com/w/cpp/string/byte/isprint it seems that VS2013 is broken. I’ve opened a Microsoft Connect issue for this. #include <ctype.h> #include <iostream> int main() { int c = 9; if (isprint(c)) { std::cout << "test failed" << std::endl; } else { std::cout << "test passed" << std::endl; } return 1; }

The perils of 'home office' RAID 5

I’ve had a little stand alone RAID device for several years now. It’s a Netgear ReadyNAS NV+ and it works quite nicely. I’m sure I could have something better but, I haven’t yet upgraded it apart from adding some memory and changing drives every now and then. I have a second ReadyNAS at my dad’s office and my office backs up critical data to that via rsync and a VPN; the one at his end does the same, though most data flows from me to him.

OpenSSL 1.0.1c key files are not compatible with OpenSSL 0.9.8x

A note to myself and my clients more than anything else… It seems that when you generate a key using a 1.x version of the openssl utility the blob looks like this: -----BEGIN ENCRYPTED PRIVATE KEY----- MIIFDjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQI7BZmHKzGwtQCAggA etc... T+CaOPXRod3cKwZEgp0vkM+gpsLw0C6WVEdV01ZrgUsJ2DceYXaenHCjfZ7jwy84 LKk= -----END ENCRYPTED PRIVATE KEY----- whereas when you generate a key in exactly the same way with an 0.9.8 version of the utility the blob looks like this: -----BEGIN RSA PRIVATE KEY----- Proc-Type: 4,ENCRYPTED DEK-Info: DES-EDE3-CBC,061B6446EB96A47B OFE9asOb689P0l6++Nwz0HYop4KdgKh6NFCzZV/kjp03VL2RW6beii2x70ikTLjs etc.

Building OpenSSL for x86 and x64 on Windows for side by side deployment

The Server Framework’s OpenSSL Option Pack integrates OpenSSL with my high performance server tool kit and gives you an IOCP based client or server that can handle many thousand concurrent connections with very few threads. The OpenSSL Option Pack has been around for over 10 years now and, as well as the SChannel Option Pack provides an easy way to add SSL or TLS to your clients and servers. Updated 26th April 2023 The latest scripts for OpenSSL 3.

Drivers for Windows Server 2012 RC for Intel 10 Gigabit AT2 adapter

As I mentioned yesterday, I’m running Windows Server 2012 RC with my Intel 10 Gigabit AT2 adapters. I’ve had several emails asking me where I got the drivers from as the latest Intel drivers do not install. Whilst it’s true that you can’t currently run the downloaded driver exe, PROWinx64.exe on Windows Server 2012 RC (or anything later than Win7). You CAN unzip the exe (it’s just an executable zip file) and then simply use the device manager to update the driver and then browse to the directory that you unzipped the exe into.

Unexpected causes of poor datagram send performance

I’m still working on my investigation of the Windows Registered I/O network extensions, RIO, which I started back in October when they became available with the Windows 8 Developer Preview. I’ve improved my test system a little since I started and now have a point to point 10 Gigabit network between my test machines using two 2 Intel 10 Gigabit AT2 cards wired back to back. My test system isn’t symmetrical, that is I have a much more powerful machine on one end of the link than on the other.

C++ 11, Concurrency

I’ve been watching Bartosz Milewski’s C++ 11 Concurrency videos and they’re a pretty good way to get up to speed on the new threading support in the latest C++ standard. They start off nice and slowly, for people who haven’t been doing concurrency for years, and explain the various new features provided by the language. It’s good stuff. I’ve been reading Anthony Williams’ C++ Concurrency In action which is a great way to understand the details of what you’ll see in the videos.