none
How to access SQL Server performance counters inside Windows Container? RRS feed

  • Question

  • Hi, I'm running a container from this image: https://hub.docker.com/r/microsoft/mssql-server-windows/

    I would like to track performance counters from within the container. How do I do that? I've tried to attach to the container with Powershell but nothing happened with:

    PS C:\Users\mark> Enter-PSSession -ComputerName lithium

    [lithium]: PS C:\Users\mark\Documents> docker ps -a

    CONTAINER ID        IMAGE                            COMMAND                  CREATED             STATUS              PORTS                   NAMES

    ea0cd540a6a4        microsoft/mssql-server-windows   "cmd /S /C 'powers..."   27 hours ago        Up 5 hours          0.0.0.0:1433->1433/tcp   distracted_austin

    [lithium]: PS C:\Users\mark\Documents> docker attach ea0cd540a6a4

    I tried: docker exec ea0cd540a6a4 powershell get-counter

    docker : get-counter : Object reference not set to an instance of an object.
        + CategoryInfo          : NotSpecified: (get-counter : O...e of an object.:String) [], RemoteException
        + FullyQualifiedErrorId : NativeCommandError

    At line:1 char:1
    + get-counter
    + ~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Get-Counter], NullReferenceEx
       ception
        + FullyQualifiedErrorId : System.NullReferenceException,Microsoft.PowerShe
       ll.Commands.GetCounterCommand
    • Edited by MarkAllison Sunday, November 20, 2016 2:37 PM added get-counter
    Saturday, November 19, 2016 4:15 PM