Admin and Monitoring Tools

NCache provides easy to use and powerful tools to let you manage and monitor cache clusters and even cache clients. There are two GUI based tools, NCache Manager and NCache Monitor, to let you achieve these goals. Additionally, NCache provides you command line tools to let you script and automate your routine administration tasks. Visual Studio integration is another quick way to create and configure your cache cluster from Visual Studio.

NCache Visual Studio Extension

The NCache Visual Studio Extension fully integrates NCache management commands in a tool window of Visual Studio. Using this extension allows all functions in NCache Manager to be accomplished within Visual Studio (VS).

Switching between environments is not required to complete cache management functions such as:

  • Create Local/Clustered caches
  • Add/Remove server nodes and client nodes
  • Start/Stop/Restart cache
  • Monitor Status/Stats of all caches and cache clusters

To use NCache Manager in VS, access the VS tool called 'NCache Explorer'.

Installing NCache Explorer in Visual Studio

The NCache Visual Studio Extension is available with NCache Enterprise Edition (64 bit). The NCache Visual Studio Extension (.VSIX file) can be downloaded from the Visual Studio Gallery and can be installed in any version/edition of VS, from 2012 onwards (starting in 2012 Visual Studio supports extensions).

NCache Explorer for Visual Studio

NCache Manager in Visual Studio is called NCache Explorer. So to utilize NCache Manager features from within Visual Studio, first access the NCache Explorer window in Visual Studio. Note: for those familiar with NCache Manager, NCache Explorer in VS works exactly the same way.

To access NCache Explorer, select VIEW > Other Windows > NCache Explorer from the Visual Studio menu bar.

This will open the NCache Explorer tool window, which can then be tabbed, docked or closed just like any other common tool window in visual studio. The window contains a toolbar which lists available operations and a tree-like hierarchical structure showing caches and all related cache nodes.

The root item NCache Explorer lists Clustered Caches and Local Caches. You add named caches under either Clustered Caches or Local Caches as appropriate.

Once NCache Explorer is setup, it looks like this:

NCache Visual Studio Extension

The figure above displays the tree hierarchy containing a Clustered Cache named “myReplicatedCache” and a Local Cache named “myCache”.

As you can see, the Clustered Cache spawns Server Nodes and Client Nodes as children. The Local Cache, on the other hand, will have only one child Local Node.

After activating NCache Explorer, NCache management options can be completed, such as setting up the perfmon counters, cache size and cache data invalidation/expiration. Please refer to NCache Documentation for complete information on using NCache Explorer within Visual Studio.

NCache Management Through PowerShell

Windows PowerShell is a shell developed by Microsoft to automate tasks and configuration management. This powerful shell is based on the .NET framework and it includes a command-line shell and a scripting language.

NCache has a rich set of command line tools (along with powerful GUI-based management tools). With NCache 4.8 and later, all NCache command-line cache management tools are implemented in PowerShell, which easily automates very sophisticated cache management. For example NCache remote tasks can be managed on the network through a single machine using PowerShell scripts.

The NCache PowerShell Provider is used to execute NCache related commands. The NCache PowerShell Provider is only compatible with the NCache Assembly (which comes with the NCache assemblies in the downloaded product).

Following is how to load NCache PowerShell:

  • Search for Windows PowerShell and Run as Administrator if you do not have direct access to the Windows C drive.
  • You will be redirected to the Windows PowerShell Console with PS at the start of the command line.
  • The Set-ExecutionPolicy cmdlet is an option that enables PowerShell scripts to run on your machine. Set the script execution policy to Unrestricted to allow remote execution.

Once Windows PowerShell is set up, NCache commands can be executed. In order to get a list of all the supported functionalities of the NCache module, execute the following Get-Command that runs the ncacheps script provided by NCache:

Get-Command: module ncacheps

This command (module ncacheps) provides a complete list of cmdlets that are supported by Windows PowerShell to automate NCache tasks.

Every cmdlet is further explained by using the Get-Help command of PowerShell (the Get-Help command is available in NCache 4.8 or later).

NCache Monitor

NCache Monitor is a dashboard-style monitoring tool that lets you monitor a lot of detail about your cache cluster and also the cache client machines. Just like NCache Manager, you can run NCache Monitory from a single central location and monitor everything remotely. Some of things you can monitor are:

  • Server dashboard to monitor counters for servers in the cache cluster
  • Client dashboard to monitor counters for remote cache clients (web/app servers)
  • Custom dashboard to create your own dashboard to monitor even non-NCache stuff
  • Counters to monitor cluster health, CPU, Network, Cache size, and much more

NCache Monitoring Tool

NCache Manager

NCache Manager is a graphical tool that you can run from a central location and administer your cache clusters remotely. It has a very easy to understand and follow GUI that allows you to perform pretty much all the administration tasks seamlessly. Some of the operations you can perform are (all for even remote servers):

  • Create and edit clustered caches, client caches, and local caches
  • Create and edit bridges for WAN replication
  • Add/remove cache servers from cluster caches at runtime
  • Register read-thru and write-thru code to cache cluster
  • Monitor cache clusters in PerfMon
  • Much more

NCache Manager

Performance Monitor Counters for Third Party Tools

In additional to providing its own powerful monitoring capabilities, NCache provides a rich set of counters for PerfMon so you can monitor them from any PerfMon compatible third-party tools. This allows you to monitor cache clusters and remote clients from the monitoring environment of your choice and also to consolidate all monitoring in a single place.

Performance Monitor Counters for Third Party Tools

Windows Event Logging

NCache logs important events in the Windows Event Log. This allows you to monitor all such events through Windows Event Viewer or any third party tools for it. Some of the events that are logged included:

  • All errors encountered by cache servers
  • Cache start and stop
  • Cache server joining or leaving a cache cluster
  • Cache size going above a configurable 80% threshold
  • Much more

Windows Event Logging

Email Notifications on NCache Events

Although you can use third party tools to be notified whenever NCache logs certain events in the Windows Event Log, NCache also provides a built-in Email Notification feature. This allows you to be notified via email whenever any of the following happens:

  • Cache started or stopped
  • Cache server joining or leaving the cluster
  • Cache state transfer started and completed
  • Cache size going above configurable 80% threshold

Email Notifications on NCache Events

Command Line Admin Tools

NCache provides a rich set of command line tools to let you script and automate many of the routine administration tasks. Additionally, NCache provides a stress testing tool to let you quickly test NCache performance under stress in your own environment. Here are some of the command line tools provided to you with NCache.

  • Create clustered, client, and local caches
  • Add/remove cache servers from cluster
  • View cluster health
  • Stress testing of cache clusters from multiple client machines
  • Much more

What to Do Next?