4.1 Enabling dynamic logging for a Knowledge Script job

When you run a Knowledge Script and the job fails or encounters an error, you should stop the Knowledge Script job, check out the script, and then modify the PRM_TraceLevel variable to the desired logging level (Off, Fatal, Error, Warn, Info, Debug, or All) to enable tracing. By default, the PRM_TraceLevel variable is Warn. After that the Knowledge Script must be checked in and run again. In the process, the monitoring job gets interrupted and the data is lost.

To avoid the above situation, you can enable dynamic logging for a job while the job is running.

IMPORTANT:The dynamic logging for a Knowledge Script is applicable only when the value of the PRM_TraceLevel variable is Warn.

To enable dynamic logging:

  1. Identify the jobs for which dynamic logging need to be enabled.

  2. Open the Registry Editor.

  3. Go to the following location:

    • For 64-bit agent: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Netiq\AppManager\4.0\NetIQmc\Tracing

    • For 32-bit agent: HKEY_LOCAL_MACHINE\SOFTWARE\Netiq\AppManager\4.0\NetIQmc\Tracing

  4. Right-click inside the Tracing folder and click New > String Value to add a String key.

  5. Specify a name for the String key. The key name should be either the child job ID or SQLServer. If you want to enable dynamic logging for a particular job that has the child job ID as 40, specify 40as the key name. If you specify SQLServer as the key name, the dynamic logging is enabled for the all the SQL Server jobs on the managed client.

    NOTE:You can add String key for each job for which dynamic logging need to be enabled. For example, if you want to enable dynamic logging for three jobs only that have child IDs 50, 55, and 62, create three separate String keys as 50, 55, and 62 respectively.

  6. Double-click the String key that you have added in step 4 and specify the desired Logging level (Off, Fatal, Error, Warn, Info, Debug, or All) in the Value data field.

    NOTE:

    • If you have added a String key as SQLServer and another String key as 40, the dynamic logging for the job 40 will be in accordance with the logging level specified in the String key 40.

    • If you delete the String key SQLServer and the String key 40, the logging level for the job 40 returns to Warn, which is the default value.