Previous Topic: pdm_load--Add, Update, and Delete Database Records

Next Topic: pdm_proctor_init--Start Proctor on Secondary Servers

pdm_logfile--Change stdlog Cutover Size

pdm_logfile lets you change your stdlog.x cutover size. The cutover can occur after a specified number of bytes are written. On UNIX, this value is reset with each pdm_init. On Windows, the settings are retained with each pdm_halt and pdm_init.

Syntax

This command has the following format:

pdm_logfile [-L|-h]

or

pdm_logfile [-g -h] [-b bytes]

Example

To change your stdlog.x files to cutover at 500,000 bytes, issue the following command:

pdm_logfile -f STD -b 500000

-L

Creates a listing of current cutovers.

-q

Runs pdm_logfile in quiet mode.

-b bytes

Specifies the number of bytes written before cutover occurs.

Restrictions

You can run pdm_load while CA SDM is active, but performance can become very slow. It is best to run pdm_load when no one is using CA SDM.

Important! On UNIX, the LIBPATH must be set before running several CA SDM utilities. Use pdm_task to set the LIBPATH before running a utility. For example, input "pdm_task pdm_clean_attachments ...".

pdm_log4j_config Utility--Modify the log4j properties File

The pdm_log4j_config.pl utility lets you configure the log4j properties file of CA SDM, web components, PDM_RPC, Support Automation, Rest, and CMDB Visualizer. Execute the utility batch script that is based on your environment. For Windows, execute pdm_log4j_config from the command line. For UNIX, execute the pdm_log4j_config.sh file.

This command has the following format:

pdm_log4j_config -f <component> -d
pdm_log4j_config -h
pdm_log4j_config -f <component>  [-a | -n <name>] [-l <log level>] [I <max # of log files>] [-s <max size of log files>] [-t <log level threshold>]
-f

Specifies the log4j configuration of CA SDM or the component of CA SDM that you want to change. Enter one of the following values:

SDM_WEB, SDM_RPC, REST, SA, or Viz.

Note: Use the mandatory option along with the other options.

-d

Displays the current log4j.properties configuration.

-h

Displays help for the utility.

-a

Completes all changes to log4j.properties globally.

-n

Specifies that you only want to modify a specific class or package name.

Specify a specific class name, such as bop_logging, or a complete package name, such as com.ca.ServicePlus.

-l

Specifies the log level that you want to set.

Note: Specify the -a or -n option.

-i

Specifies the max file number index that you want to set.

Note: Specify the -a or -n option.

-s

Specifies the max file size that you want to set.

Note: Specify the -a or -n option.

Important! Change the appender in the log4j.properties file of Visualizer to Rolling File Appender before you execute the command with this parameter. If you do not change the appender, MaxFileSize generates logs in the same file.

-t

Specifies the log level threshold.

Note: Specify the -a or -n option.

Utility Usage Examples

The following list provides examples of using the pdm_log4j_config utility:

Important! Use -l, -i, -s, and -t variables together with one of the -a or -n options, Do not use both the options. The -f option is mandatory. The -h and -d options are mutually exclusive to any other option.

Modify the Log File Refresh Interval Manually

Administrators can modify how often CA SDM monitors the log4j.properties file for changes. By default, the refresh interval is set to 60 seconds. CA SDM components including SDM Servlets, PDM_RPC, Support Automation, CMDB Visualizer, and REST use log4j for logging.

Follow these steps:

  1. Open the following directory on the CA SDM server:
    NX_ROOT
    
  2. Open the NX.env file for editing.
  3. Modify the NX_LOG4J_REFRESH_INTERVAL variable with a value in milliseconds.

    Note: If you enter a negative or nonnumeric value, the value defaults to 60 seconds.

  4. Save the NX.env file.

Modify the jsrvr.log Appender

By default, servlets such as PDMContextListener, pdmweb, UploadServlet, and pdm_report log INFO level messages to the jsrvr.log file. You change the threshold level of the jsrvr.log appender to log any messages under the INFO level.

Follow these steps:

  1. Modify the level in the log4j.properties file to the following threshold:
    log4j.appender.jsrvrlog.Threshold=debug
    
  2. Modify the log level of UploadServlet:
    log4j.logger.com.ca.ServicePlus.uploadservlet=debug, jsrvrlog
    
  3. Open the jsrvr.log file.
  4. Confirm that the DEBUG log messages of UploadServlet appear.

Note: If you modify the log level without modifying the threshold level, the DEBUG logs from the servlet do not appear in the file. Not all servlets have explicit loggers attached. For example, the log4j.properties file does include pdmweb, BOServlet, pdm_export, pdm_report, and pdm_cache, which are part of the pdmweb servlet. To see DEBUG logs from these servlets, modify the pdmweb log level.

Modify the jstd.log Appender

All logs from nonwebapp applications dump into the jstd.log file separately. You can display logs for any of these applications, such as pdm_rpc by changing the log level of that specific application.

Follow these steps:

  1. Modify the following log level:
    log4j.logger.com.ca.ServicePlus.pdm_rpc=debug
    
  2. Open log4j.properties and confirm that the log entries appear.