Class NSDiagnosticsAgent

Diagnostics, usage data collection, caches, and flushing

Examples

NSDiagnosticsAgent agent;
agent.callMethod(arg1, arg2);

Constructors

NSDiagnosticsAgent()

Diagnostics, usage data collection, caches, and flushing

Declaration

NSDiagnosticsAgent

Examples

NSDiagnosticsAgent agent;
agent.callMethod(arg1, arg2);

Methods

AddWebAppUsage(NSWebAppUsage[])

Adds WebApp usage to existing log.

Declaration

Void AddWebAppUsage(NSWebAppUsage[] webAppUsages)

Parameters

Type Name Description
NSWebAppUsage[] webAppUsages

Returns

Type Description
Void

ChangeLogSettings(Bool,Bool,Bool,Bool,Bool,Bool,Bool,Bool)

Changes NetServer log settings.

Declaration

Void ChangeLogSettings(Bool logWarning, Bool logInformation, Bool logSuccessAudit, Bool logFailureAudit, Bool logToEventLog, Bool logToSuperOffice, Bool logToFile, Bool logToTrace)

Parameters

Type Name Description
Bool logWarning
Bool logInformation
Bool logSuccessAudit
Bool logFailureAudit
Bool logToEventLog
Bool logToSuperOffice
Bool logToFile
Bool logToTrace

Returns

Type Description
Void

CollectDataAdditions()

Collects and transmits usage statistics: Database Additions. If opted-out then this call does nothing. The call returns immediately (starting a background thread), and updates CS scheduler table to set the next run time.

Declaration

Void CollectDataAdditions()

Examples

NSDiagnosticsAgent agent;
agent.CollectDataAdditions();

Returns

Type Description
Void

CollectTableSizes()

Collects and transmits usage statistics: Table Sizes. If opted-out then this call does nothing. The call returns immediately (starting a background thread), and updates CS scheduler table to set the next run time.

NSDiagnosticsAgent agent;
agent.CollectTableSizes();

Declaration

Void CollectTableSizes()

Examples

NSDiagnosticsAgent agent;
agent.CollectTableSizes();

Returns

Type Description
Void

CollectWebUsage()

Collects and transmits usage statistics: Web-based clients Usage. If opted-out then this call does nothing. The call returns immediately (starting a background thread), and updates CS scheduler table to set the next run time.

Declaration

Void CollectWebUsage()

Examples

NSDiagnosticsAgent agent;
agent.CollectWebUsage();

Returns

Type Description
Void

CollectWinUsage()

Collects and transmits usage statistics: Windows CRM Client Usage. If opted-out then this call does nothing. The call returns immediately (starting a background thread), and updates CS scheduler table to set the next run time.

NSDiagnosticsAgent agent;
agent.CollectWinUsage();

Declaration

Void CollectWinUsage()

Examples

NSDiagnosticsAgent agent;
agent.CollectWinUsage();

Returns

Type Description
Void

FlushCaches()

Flushes all NetServer caches

Declaration

Void FlushCaches()

Returns

Type Description
Void

FlushCachesByName(String[])

Flushes all NetServer caches named

Declaration

Void FlushCachesByName(String[] cacheNames)

Examples

NSDiagnosticsAgent agent;
String[] cacheNames;
agent.FlushCachesByName(cacheNames);

Parameters

Type Name Description
String[] cacheNames

Returns

Type Description
Void

GetCacheNames()

Gets the name of the caches that can be flushed

Declaration

String[] GetCacheNames()

Examples

NSDiagnosticsAgent agent;
String[] res = agent.GetCacheNames();

Returns

Type Description
String[]

GetWebAppUsagesForPeriod(DateTime,DateTime,String)

Gets all WebAppUsages for a given period, that match an optional search term

Declaration

NSWebAppUsage[] GetWebAppUsagesForPeriod(DateTime fromDate, DateTime toDate, String searchTerm)

Parameters

Type Name Description
fromDate
toDate
String searchTerm

Returns

Type Description
NSWebAppUsage[]

LogViewState(String)

Logs a change in view state.

Declaration

Void LogViewState(String viewState)

Parameters

Type Name Description
String viewState

Returns

Type Description
Void

PerformTasksAfterUpgrade()

After upgrading to a new file set, there may be tasks that need to be done. Fpr example, import new TypicalSearches, if present. Tasks performed here need to be idempotent and independent of the actual upgrade jump (what was the previous version). They should complete in a reasonable time, not more than a few minutes maximum.

Declaration

String PerformTasksAfterUpgrade()

Examples

NSDiagnosticsAgent agent;
String res = agent.PerformTasksAfterUpgrade();

Returns

Type Description
String

ResyncUsers()

Resynchronizes user information with SuperOffice Community, if opted-out then this call does nothing. The call returns immediately (starting a background thread), and updates CS scheduler table to set the next run time.

Declaration

Void ResyncUsers()

Examples

NSDiagnosticsAgent agent;
agent.ResyncUsers();

Returns

Type Description
Void

WebAppUsageExistsInPeriod(Integer,String,DateTime)

Checks if viewState has been clicked at least once since a date.

Declaration

Bool WebAppUsageExistsInPeriod(Integer associateId, String viewState, DateTime fromDate)

Examples

NSDiagnosticsAgent agent;
Integer associateId;
String viewState;
DateTime fromDate;
Bool res = agent.WebAppUsageExistsInPeriod(associateId, viewState, fromDate);

Parameters

Type Name Description
Integer associateId
String viewState
fromDate

Returns

Type Description
Bool true if viewState has been clicked at least once since FromDate, if asscoiateId < 0 or FromDate is DateTime.MinValue no restriction given for those parameters.