Create performance counters on the server - HxGN SDx - Update 64 - Administration & Configuration

Administration and Configuration of HxGN SDx

Language
English
Product
HxGN SDx
Search by Category
Administration & Configuration
SmartPlant Foundation / SDx Version
10

The performance counters are created using a PowerShell script that is delivered with HxGN SDx in the following location:

[installation location]\SPFServerManager\UsersAndPermissionsScripts\SpfPerfmonSetup.ps1

The following example usage includes the required argument -action create and the optional argument -logfile followed by a fully qualified location and file name where a log file is to be written:

powershell.exe .\SpfPerfmonSetup.ps1 -action create -logfile 'c:\SpfPerfmonSetupLog.txt'

This command must be run from a Windows command line with administrator privileges. Also, in order to run the installation script, the PowerShell execution policy on the server must be set to unrestricted. To determine the execution policy on your server:

  1. Open the PowerShell command window with administrator privilege.

  2. Type Get-ExecutionPolicy at the command prompt.

  3. If the policy is not set to unrestricted, change it using this command: Get-ExecutionPolicy unrestricted

If you change the execution policy, it's important to reset it to its original value after you have completed the installation procedure.

  • The argument -action is required and must be set to create as shown.

  • The argument -logfile provides diagnostic information but is not required. If missing, the script attempts to write to the file c:\SpfPerfmonSetupLog.txt.

  • If the script is run when the counters already exist, it returns an error.

  • For further help with using the command, type powershell.exe .\SpfPerfmonSetup.ps1 -action help

Sample log file content is shown below:

CounterSetName : SmartPlant Foundation
MachineName : .
CounterSetType : SingleInstance
Description : SmartPlant Foundation Server custom counters
Paths : {\SmartPlant Foundation\ProcessRequest: # requests executed, \SmartPlant Foundation\ProcessRequest: average time per request, \SmartPlant Foundation\Database: # requests executed}
PathsWithInstances : {}
Counter : {\SmartPlant Foundation\ProcessRequest: # requests executed, \SmartPlant Foundation\ProcessRequest: average time per request, \SmartPlant Foundation\Database: # requests executed}