CA SDM PDM Database Commands

                                                    This article contains the following topics:
casm173
This article describes the following topics:
HID_CA_SDM_PDM_Database_Commands
pdm_replace--Replace a Database Table
pdm_replace deletes a table in a CA SDM database and replaces it with a table from a temporary file you specify with the -f option; the data from the input file is the only data that is in that table after running pdm_replace. Back up your table before running pdm_replace.
As part of its processing, pdm_replace first shuts down the daemons (Non-Windows) or services (Windows).
pdm_replace accepts a text file as input, which is the same file format used by pdm_userload. You can create an input file for pdm_replace using pdm_extract; however, you cannot use the output of pdm_backup as input to pdm_replace.
Be sure to name your input file with a name different from the table name you are attempting to replace. For example, if you are replacing a table named ca_contacts and you name the input file ca_contacts.dat, after you execute the pdm_replace command to point to the input file (ca_contacts.dat), it deletes the file after execution because it has the same name as the table.
Restrictions
  • pdm_replace can be run only on the following servers, depending on your CA SDM configuration:
    • Conventional: Primary server
    • Advanced availability: Background server
      Ensure that you have stopped all application and standby servers before running this command on the background server.
  • Only the privileged user or root can run pdm_replace.
  • Do not run pdm_replace when users are logged in to CA SDM.
Syntax
This command has the following format:
pdm_replace [-v] -f filename
-v
Specifies verbose mode.
-f
filename
Specifies an ASCII file with the following format:
TABLE table_name fieldname1 fieldname2 . . . . fieldnameN { "value11", "value12", . . . "value1N" } { "value21", "value22", . . . "value2N" } . . . { "valueN1", "valueN2", . . . "valueNN" }
This format is the same file format used by pdm_userload. You can create an input file for pdm_replace using pdm_extract; however, you cannot use the output of pdm_backup as input to pdm_replace.
pdm_restore--Restore a Database
pdm_restore stops CA SDM and then deletes all records from a CA SDM database and replaces them with records from a file you specify with the -f option. The data from the input file is the only data that will be in the CA SDM database after running pdm_restore.
The input file must be created using pdm_extract or pdm_backup, or otherwise formatted for pdm_restore. pdm_backup can back up non-database data, and pdm_restore can restore this data also. pdm_backup and pdm_restore are not recommended when other backup and restoration tools are available.
As part of its processing, pdm_restore first shuts down the daemons (Non-Windows) or services (Windows).
Syntax
This command has the following format:
pdm_restore [-d] [-g] [-n] [-w] [-v] - f filename
Restrictions
pdm_restore can be run only on a CA SDM server. Only the privileged user or root can run pdm_restore. The following restrictions are applicable if you are using the advanced availability configuration:
If you are restoring the database, run the pdm_restore command only on the background server.
  • Ensure that you have stopped all servers (application, background, and standby) before you run the pdm_restore command.
Use pdm_restore only with a full database backup created by pdm_backup, because your current database is deleted and replaced by the backup file. Do not run pdm_restore when users are logged in to CA SDM.
  • -d
    Specifies that only database data is restored.
  • -g
    Specifies that only non-database data be restored. Only windows (forms) and other non-database data are restored.
  • -n
    Specifies that NX.env is restored if restoring non-database data. By default, NX.env is not restored. We recommend that the NX.env file not be restored unless the restore is to the same server the backup came from. Restoring an incorrect NX.env can affect unintended databases.
  • -w
    Specifies that web.cfg is restored if restoring non-database data. By default, web.cfg is not restored.
  • -v
    Specifies verbose mode.
-f
filename
Specifies an input file that contains a full backup created by pdm_backup.
pdm_load--Add, Update, and Delete Database Records
Using pdm_load can be destructive so always back up your database before you perform a pdm_load, and use pdm_userload unless instructed to use pdm_load.
pdm_load updates a CA SDM database using an input file you specify, up to a maximum of 112 attributes.
Whenever you upload tickets (such as requests or issues), your ticket number should include a unique prefix or suffix in its string. CA SDM views this number as a string of characters not as a sequential number, and thus cannot guarantee that it will assign a unique number to the uploaded tickets. As long as you assign a unique prefix or suffix using awk or another text processor, you can upload tickets without CA SDM writing over previously assigned numbers.
Syntax
This command has the following format:
pdm_load [-c] [-h] [-m] [-r] [-u] [-v] - f filename
The input file entries follow this format:
TABLE table_name fieldname1 fieldname2 . . . . fieldnameN { "value11", "value12", . . . "value1N" } { "value21", "value22", . . . "value2N" } . . . { "valueN1", "valueN2", . . . "valueNN" }
table_name
is the name of the table to be loaded, as listed in the CA SDM database schema file, which is located in $NX_ROOT/site/sch/schema.sch (Non-Windows) or
installation-directory
\site\sch\schema.sch (Windows). $NX_ROOT or
installation-directory
is the directory where you installed CA SDM.
-f
filename
Specifies an input ASCII file.
-c
Checks the input file against the database and reports on the updates that would be made, but does not make the updates.
-m
Specifies mass update. Specify when you are using pdm_load to add or delete a large number of records. This option suppresses all client notifications of updates and sends a cache refresh message for a table when pdm_load finishes processing the table.
-r
Removes database records that match input records.
Make a backup copy of the database before running pdm_load with this option. After old database records are removed, you must restore the CA SDM database with this backup copy if you want to recover any deleted records.
-u
Updates existing records, but does not insert new records into the database.
CA SDM PDM Daemon Commands
pdm_halt--Terminate Daemons or Stop Services
pdm_halt cleanly terminates all CA SDM daemons (Non-Windows) or the System Server Service (Windows) on the system from which pdm_halt is executed. The pdm_halt utility usually takes about 30 seconds to complete. If it hangs for more than two minutes, press Ctrl+C to stop pdm_halt, and try again.
Syntax
This command has the following format:
pdm_halt [-w] [-a] [time]
  • -w
    Waits for the daemons to stop.
  • -a
    Stops all proctors defined in the pdm_startup file.
  • [time]
    Specifies the number of seconds to wait until the command executes.
Restrictions
pdm_halt can be run on a CA SDM server or a CA SDM Non-Windows client. You must be the privileged user to run pdm_halt.
pdm_init--Start Daemons
Applies to Non-Windows only
pdm_init starts all CA SDM automatic processes on the system from which pdm_init is executed. These automatic processes are called
daemons
and run continually in the background while you work. Not all of the daemons are started; some are applicable only to certain operating systems.
Use pdm_d_refresh to start daemons that failed to start the first time after remedying the problem that caused them not to start initially. In most cases you do not need to terminate the daemons running to start ones that initially failed.
Syntax
pdm_init
Restrictions
pdm_init can be run on a CA SDM server or a CA SDM Non-Windows client. You must be the privileged user to run pdm_init.
pdm_d_refresh--Start Failed Daemons
The pdm_d_refresh command line utility is used primarily for remote daemon configurations. It tells the daemon manager to try to start daemons that have failed to start ten times and that the daemon manager has flagged as "not runnable.". Running this utility flags all daemons as able to run and resets the restart counter. Then, the daemon manager tries to start all stopped daemons.
Syntax
This command has the following format:
pdm_d_refresh
On Non-Windows, 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_status--Show Status of Daemons or Processes
pdm_status shows the status of all CA SDM daemons (Non-Windows) or processes (Windows) on the system from which the command is executed.
Output is displayed in this format:
DAEMON STATUS HOST PID SLUMP CONNECT TIME ------------------------------------------------------------------------------- Agent anthill Running anthill 455 Tue Feb 17 17:55:12 Ddict_rd (ddictrd) Completed anthill Data Dictionary (ddictbuild) Completed anthill ... User Validation (boplgin) Running anthill 456 Tue Feb 17 17:55:21
Syntax
This command has the following format:
pdm_status
uniconv--Start Non-Windows CA NSM Event Converter Daemon
Applies to Non-Windows only
When CA SDM is integrated with CA NSM, you can use uniconv to send generic event data to filter daemons in CA SDM. uniconv is used in a message action in CA NSM Event Management.
Syntax
This command has the following format:
uniconv - h &opnode - e &'text' [-n & nodeid] [-u &userid] [-d &datem] [-t &' time']
Restrictions
uniconv must be run from $NX_ROOT/bin on Non-Windows. Your site must be integrated with CA NSM to use this utility.
  • -h &opnode
    Specifies the node name of the machine on which you are executing uniconv (required).
  • -e &'text'
    Specifies the full text of the message (required).
  • -n &nodeid
    Specifies the node name from which the message originated (required).
  • -u &userid
    Specifies the login ID of the person who originated the message.
  • -d &datem
    Specifies the system date in
    mm
    /
    dd
    /
    yy
    format.
  • -t &'time'
    Specifies the system time.
CA SDM PDM Server Commands
pdm_proctor_init--Start Proctor on Secondary Servers
Applies to Non-Windows only
Use pdm_proctor_init to start the proctor on secondary servers. All secondary servers should be started prior to starting the daemons from the primary server. After all daemons have been stopped from the primary server, use pdm_halt on the secondary server to stop this proctor.
Do not use pdm_proctor_init on the primary server.
Syntax
This command has the following format:
pdm_proctor_init
pdm_server_control Utility--Identify Servers
The pdm_server_utility commands identify the server as background or standby in an advance availability configuration.
Execute the following command from the command prompt:
pdm_server_control -h | -b | -q interval [-s server_name] | -t | -c [-server_name]
  • -h
    Displays the help page.
  • -b
    Notifies a local standby server to become the background server. The standby server must be running. If the server is not running, it is started but no failover is performed. To start a failover, run the command again.
  • -q interval [-s server_name]
    Notifies a local or remote application server to quiesce in a specified time interval. This interval is the number of seconds before the server shutdowns. When using this option without a server_name, the local server is notified to quiesce. This option cannot be used for a background or a standby server.
  • -t
    Displays the type of this CA SDM advance availability Server.
  • -c [-s server_name]
    Notifies a local or remote application server to cancel the previous quiesce the request.
pdm_rest_util – Manage the CA SDM RESTful Web Services Application
CA SDM uses this utility automatically. You can run it manually if you require the utility, such as after an unexpected error occurs. This REST web services utility deploys the REST services web application. This utility deploys the REST application to the dedicated REST Tomcat instance. A batch file in the NX_ROOT\bin directory (pdm_rest_util.bat for Windows or ./pdm_rest_util.sh for Non-Windows) lets you invoke the utility.
This command has the following formats and options:
pdm_rest_util - h | [-deploy] | [-undeploy]
  • -h
    Prints command-line help.
  • -deploy
    Generates, compiles, and deploys all Majic factories.
  • -undeploy
    Undeploys REST Web Services on the local server.
Undeploy the REST Web Services Application
You can undeploy the REST Web Services application with the pdm_rest_util utility. For example, you want to perform CA SDM maintenance and prefer to undeploy REST during this operation.
Follow these steps:
  1. Open a command prompt.
  2. Execute the following command:
    pdm_rest_util -undeploy
    The REST Web Services application is undeployed.
If you undeploy the REST application with this utility, REST can redeploy automatically when CA SDM restarts. We recommend that you use the CA SDM configuration to disable REST indefinitely.
pdm_k_reindex -- Knowledge Re-Index Utility
The Knowledge reindex utility, pdm_k_reindex.exe, is located under the Knowledge Management installation directory.
Reindexing the documents in the knowledge base can be a time-consuming operation, depending upon the size of your database. We recommend that you run the Knowledge Reindex utility after all the changes have been added. For advanced availability configuration, you cannot execute the knowledge re-index utility during failover.
On Non-Windows, 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 ...".
Follow these steps:
  1. Open the command prompt.
  2. Enter the following command at the command prompt to run the knowledge reindex:
For example:
pdm_k_reindex
The following options are available with this command.
  • -D
    Defines the debug mode, such as printing to the command window.
  • -v
    Defines the verbose mode, such as printing to the stdlog file.
  • -i
    Does not create table indexes in the reindex table after reindexing.
Parameters with a dash as a prefix, such as " - D", must precede other parameters that do not have this prefix.
The other option is as follow:
  • File
    :reindex.txt
    Documents are reindexed to the specified file.
  • +i
    Creates the indexes of the reindexed table only, which is the search table after reindexing. The old indexes are dropped before reindexing.
  • +t
    Switches the names of search and reindex tables only.
A “+” prefix denotes only this parameter applies.
  • sdtout
    Defines the frequency of statistic appearing in the command window. By default the knowledge reindex utility provides statistics into the command window for every 1000 documents processed. However, sometimes statistics are required to be provided more often. Use the following parameter:
    pdm_k_reindex -i sdtout:10
    In this case, statistics display in the command window for every ten documents.
The documents are reindexed in the knowledge base.
When to Use pdm_k_reindex
Run the pdm_k_reindex utility when one or more of the following search settings were changed:
  • Noise words
  • Synonyms
  • Special terms
  • Language
  • Remove Similar Words
  • Remove Noise Words
  • Valid Character Range
  • Recognize Special Terms
An appropriate message appears on Knowledge node of Administration tab when a change occurs.
Re-Index Tracking
While the re-index is running, you can view the status of the process in the Re-Index Tracking section in the lower half of the page. Each field is described as follows:
  • Document #
    Specifies the number of documents already processed.
  • Average Size (Words)
    Specifies the size of the current documents, calculated by the number of words minus the number of noise words.
  • Rate (Docs/Sec)
    Specifies the number of documents processed, per second.
  • Time from Start
    Indicates the duration of the re-index process since start.
  • Time Remaining
    Specifies the estimated amount of time remaining for the process, based on the current rate and the remaining number of documents.
  • Failures #
    Represents the number of failed documents (maximum=100). When the maximum number of failures is reached, the administrator is prompted to either continue or cancel the process.
    If changes have been made to Noise Words, Special Terms, Synonyms or Parse Settings and you do not re-index, you are prompted the next time you access the Knowledge node of the Administration tab. Changes will take effect only after the Knowledge Re-index utility is run.
Import and Re-Indexing
When pdm_kit.exe is invoked from the command line, the pdm_kit utility imports the documents into the database. After pdm_kit is completed, assuming document indexing or re-indexing has not been disabled using the command-line options, the re-index utility (pdm_k_reindex.exe) is automatically invoked. The status and output of the re-indexing operation is automatically written to the "EBR_REINDEX.LOG" in the $NX_ROOT\log directory.
Index and De-Index Queue Settings for Batch and Instant Processing
Indexing and De-Indexing both run a batch process to include a predefined number of documents at one run. These batch processes are used for performance optimization. If more documents are included in the batch, system performance increases.
The number of documents you can process is limited; the limit depends on the size of the documents and the linked attachments. The document size is calculated based on the pure text and its attachments. Imagine and format elements are not calculated.
You can limit the size of attachments by navigating to Attachments Library, Repositories on the Administration tab and editing the repository to set the File Limit Size (KB).
The recommended batch maximum size is between 2-12 MB (per the EBR_MAX_INDEX_BATCH_SIZE parameter of the NX.env file and the average document size).
  • If the average size of your document (including attachments) is approximately 0.1 MB, keep the default setting in NX.env:
    @EBR_MAX_INDEX_BATCH_SIZE=128 @NX_EBR_INDEX_QUEUE_TIMEOUT=10 @NX_EBR_REINDEX_QUEUE_TIMEOUT=1 @NX_EBR_INDEX_QUEUE_ONLINE=Yes @NX_EBR_NON_KD_INDEX_QUEUE_ONLINE=Yes
    This setting means that one batch processes 128 documents, that batch executions have ten second intervals, and when in reindex, the wait interval between two batches is one second.
  • If the average size of your document (including attachments) is approximately 0.5 MB, keep the default setting in NX.env
    @EBR_MAX_INDEX_BATCH_SIZE=25 @NX_EBR_INDEX_QUEUE_TIMEOUT=10 @NX_EBR_REINDEX_QUEUE_TIMEOUT=10 @NX_EBR_INDEX_QUEUE_ONLINE=No @NX_EBR_NON_KD_INDEX_QUEUE_ONLINE=No
    This setting means that one batch processes 25 documents, that batch executions have ten second intervals, and when in reindex, the wait interval between two batches is ten seconds.
PDM-Discovered Asset Commands
pdm_discupd -- Discovered Asset Update
Batch update of non-CA SDM Discovered Assets. Use this utility to update assets that were imported by the pdm_discimp command.
Syntax
pdm_discupd [-t] [-v] [-d domsrvr]
Where
  • t
    Test
  • v
    Verbose/diagnostic mode.
  • d
    Object manager (domsrvr) to use for processing.
On Non-Windows, 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_discimp -- Discovered Asset Import
Batch registration of non-CA SDM Discovered Assets. Use this to search the MDB for assets that were registered by other software products and register them as CA SDM assets, so they can be used in CA SDM.
Logic is similar to Discovered Assets dialog that can be launched from Asset Search/List web form. That is an interactive and batch process.
This program will query the ca_logical_asset, ca_asset, and ca_logical_asset_property tables, using various parameters, and attempt to register new CA SDM Assets from the discovered values.
Syntax
pdm_discimp [-l label] [-s serial number] [-t asset tag] [-n hostname] [-d dns name] [-m mac address] [-c asset class] [-v] [-r] [-o object manager]
Asset selection criteria (use % for wild card):
  • l
    Match this asset label.
  • s
    Match this serial number.
  • t
    Match this asset tag.
  • n
    Match this hostname.
Asset property selection criteria (use % for wild card):
  • d
    Match this dns name.
  • m
    Match this mac address.
Other options:
  • c
    Asset class to assign when registering new owned assets defaults to Discovered Hardware.
  • v
    Verbose/diagnostic mode.
  • r
    Register assets, otherwise runs in simulate mode.
  • h
    Displays this information.
  • o
    Object manager (domsrvr) to use for processing.
If processing results in a blank Asset Label, the value found for the host name or DNS Name will be used as the Asset Label. Assets must have at least a Label and Asset Class to be registered for use in CA SDM.
Because of the structure of the MDB and CA SDM architecture limitations, two queries are performed to select the appropriate records to process. It is important to understand this as it could affect performance. The first query retrieves the rows from a join between the ca_logical_asset and ca_asset tables that match label, serial number, tag and hostname. Then for each resulting row, a query is performed against ca_logical_asset_property to match dns_name and mac_address. The asset from the first query is chosen for registration if the second query results in rows being returned.
On Non-Windows, 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_text_cmd--Text API Command Line Interface
Use the pdm_text_cmd command for the Text API, which you can use to create and update various objects such as requests, change orders, issues, assets, and contacts.
You cannot use a single or double quote as the parameter of the pdm_text_nxd or bop_cmd commands.
Syntax
This command has the following format:
pdm_text_cmd - t table {-u from_userid - p from_persid} [-o operation] [-f input file] [-T timeout] [-h]
-t
table
(Required) Specifies the table to process. The
table
name can be one of the following values (not case sensitive):
  • Asset
  • Contact
  • Change
  • Issue
  • Request
See the [OPTIONS] section of the text_api.cfg file for a complete list of valid table names.
-u
from_userid
| -p
from_persid
(One option required) Identifies the contact for this operation:
  • -u
    from_userid
    Identifies the contact using the User ID value.
  • -p
    from_persid
    Identifies the contact using the unique object identifier for the contact record.
    from_persid
    must be of the form
    cnt:
    xxxx. xxxx
    is the persistent ID of the object.
The value that you specify with this option is appended to the end of the input for the pdm_text_cmd command using the appropriate keyword, %FROM_USERID or %FROM_PERSID.
-o
operation
Specifies the operation to perform. The
operation
must be one of the following values (not case sensitive):
  • NEW -- Creates an object. This value is the default if no operation is specified.
  • UPDATE | UPD -- Creates an object if not found or updates an existing object if found.
  • UPDATE_ONLY | UPDO -- Updates object if found; otherwise, does nothing.
Both UPDATE and UPDATE_ONLY require the %SEARCH keyword in the command input. You can perform only one operation transaction with each invocation of pdm_text_cmd.
-f
input_file
Specifies the full path of the file to process, which is a text file containing valid Text API commands. If you omit this parameter, commands are used from STDIN. The Text API uses the following basic format for input:
%keyword=value
You can issue multiple commands within the input by separating the command request by at least five percent signs (%%%%%).
For more information about valid keywords and about formatting input to the Text API, see the file text_api.cfg.
-T
timeout
Specifies the number of seconds to wait for a response from the server before timing out. The default is 30 seconds.
pdm_text_cmd shows the text-based replies received back from the Text API, which include success or error messages, and the original text sent using the API for processing. pdm_text_cmd returns zero if the command completes successfully without warnings or errors or one if the command completes successfully, but with warnings. Any other return value indicates that an error occurred.
On Non-Windows, 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 ...".
When passing the parameters from command prompt, use Ctrl+Z in Windows and Ctrl+D in POSIX.
Input Examples
pdm_text_cmd is the command line interface for the Text API that you can use to create and update various objects such as requests, change orders, issues, assets, and contacts.
Example: Use an Input File to Create an Issue
The following example demonstrates how to use a pdm_text_cmd input file to create an issue:
%DESCRIPTION=This is my Test. %PRIORITY=3
To process this file, assuming its full path is c:\input.txt, issue the following command:
pdm_text_cmd -t Issue - u user01 -f c:\input.txt
Example: Use an Input File to Update an Issue
The following example demonstrates an input file to update issue 123 to a priority of 2:
%SEARCH=ISSUE_ID %ISSUE_ID=123 %PRIORITY=2
To process this file, assuming its full path is c:\update.txt, issue the following command:
pdm_text_cmd -t Issue -o UPDATE_ONLY - u user01 -f c:\update.txt
Example: Use an Input File to Create Multiple Requests
The following example demonstrates creating multiple requests with one input file. This command can be helpful creating test data on a test system.
%DESCRIPTION=This is Test 1. %PRIORITY=3 %%%%% %DESCRIPTION=This is Test 2. %PRIORITY=2 %%%%% %DESCRIPTION=This is Test 3. %PRIORITY=None
To process this file, assuming its full path is c:\testdata.txt, issue the following command:
pdm_text_cmd -t Request - u user01-f c:\testdata.txt
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 Non-Windows, 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.
    For the -l, -I, -s, and -t parameters, specify the -a or -n option.
  • -i
    Specifies the max file number index that you want to set.
    -s
    Specifies the max file size that you want to set.
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.
Utility Usage Examples
The following list provides examples of using the
pdm_log4j_config
utility:
  • Modify the log verbosity level for all loggers configured in the properties file by using the -l and -a variables.
    For example, set all of the loggers configured in Support Automation to a level of DEBUG:
    pdm_log4j_config - f SA -a -l DEBUG
  • Modify the log verbosity level for a specific logger class or package name in the CA SDM log4j properties file by using the -l and -n variables.
    For example, set the logger for the pdm_rpc package to DEBUG using one of the following code samples:
    pdm_log4j_config - f SDM_RPC -n pdm_rpc -l DEBUG pdm_log4j_config - f SDM_RPC -n com.ca.ServicePlus.pdm_rpc -l DEBUG
  • Modify the maximum number of log files to create for all the appenders (MaxBackupIndex property) by using the -i and -a variables in the log4j properties file of REST.
    For example, set the maximum number of files for all appenders to 9.
    pdm_log4j_config - f REST -a -i 9
  • Modify the maximum number of log files configured in the CA SDM log4j properties file to create for an appender for a specific class or set of classes (MaxBackupIndex property) by using the -i and -n variables.
    For example, set the maximum number of files for bop_logging to 7.
    pdm_log4j_config - f SDM_WEB -n bop_logging -i 7
  • Modify the maximum size of each log file configured in the REST log4j properties file to create for any appender (MaxFileSize property) by using the -s and -a variables.
    For example, set the maximum size of files for all appenders to 9 MB.
    pdm_log4j_config - f REST -a -s 9MB
  • Modify the maximum size of each log file configured in the CA SDM log4j properties file to create for an appender for a specific class or set of classes (MaxFileSize property) by using the -s and -n variables.
    For example, set the maximum size of files for bop_logging to 7 MB.
    pdm_log4j_config - f SDM_WEB -n bop_logging -s 7MB
  • Modify the log level threshold for all the appenders configured in the Support Automation log4j properties file (Threshold property) by using the -t and -a variables.
    For example, set the log level threshold to DEBUG.
    pdm_log4j_config - f SA -a -t DEBUG
    The -t parameter log level threshold overrides the -l parameter log level. If you modify the log level and the threshold level, the DEBUG logs from the servlet do not appear in the file.
  • Modify the log level threshold for an appender for a specific class or set of classes (Threshold property) configured in the CA SDM log4j properties file by using the -t and -n variables.
    For example, set the log level threshold to WARN.
    pdm_log4j_config - f SDM_WEB -n bop_logging -t WARN
  • Execute the following command to view the current logger and appender configuration of the REST log4j properties file:
    pdm_log4j_config - f REST -d
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.
    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.
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.