Thursday, October 6, 2016

High Physical Memory Usage Issue


I investigated an issue where a new Hyper-V virtual machine running Windows 7 would consume most of the physical memory after exactly 5 minutes of uptime.  This would occur even if no applications were running.


I tried using the Windows Task Manager "Processes" tab to look at the memory being used but none of the processes listed (mostly services) had anywhere close to the amount of physical memory (8 GB) allocated.

After some initial searching I found this great SysInternals utility called RAMMap:

Running RAMMap utility indicated that most of the memory was "Driver Locked".  Using a Google search, I found this post:

I found that the Windows 7 virtual machine was specified to use "Dynamic Memory".


After shutting down the virtual machine, I unchecked the "Enable Dynamic Memory" option in the Memory Settings for the virtual machine and set the startup memory to my fixed size.  After restarting the virtual machine, I found that the physical memory usage no longer grew after 5 minutes.

Monday, October 3, 2016

Useful TypeScript Links

TypeScript is a strongly typed open source language which compiles into JavaScript. TypeScript was originally developed by Microsoft.  The language supports interfaces, classes (including inheritance), generics and modules.

Using TypeScript enables the developer to validate the code contracts at design/compile time instead of waiting until the code is executed in the browser.  This reduces your development and testing costs and results in a more reliable site.

This YouTube video provides a good introduction to the language including how to integrate jQuery with TypeScript: Getting Started with TypeScript

There is a browser based playground at: which you can use to try out the language.

Many TypeScript type definitions (which are very useful when incorporating other JavaScript frameworks such as jQuery) are available on github:

Wednesday, February 3, 2016

Debugging Network File System (NFS) connections


There are a number of useful shell command line utilities that can be used to debug Network File System (NFS) connections.  These utilities are typically available on most Linux or other Unix-variant operating system.


This utility can be used by client computers to find out what services and protocols are supported by a given server.  This is a good starting point to find out if the NFS services are enabled on a given computer.  There are three services typically needed for NFSv3 connections: portmapper, mount and nfs.  The man pages (man rpcinfo) will provide more information about the various options available.


This utility can be used to list what directories have been exported by a given NFS server.  See the man page for the command line options on your system.

Network Protocol Analyzers

There are a number of free utilities which can be used to analyze network transactions: Wireshark, tcpdump. and others.  These utilities allow the user to monitor network traffic between the client and the server and log it.  The analyzers can then be used to review the log to see what individual commands were sent from the client and the response from the server.


On Centos, it is possible to enable logging using rpcdebug:

rpcdebug -m nfsd -s all

will send logging for the nfs server to /var/log/messages


rpcdebug -m nfsd -c all

will disable logging again.  See "man rpcdebug" for more info.

If trying to debug a command like df:

strace df -h

will print out system calls made executing the command.  To output to a file:

strace df -h 2> traceout.txt