This documentation refers to a previously released version of BMC Discovery.
See the information on this topic for the latest version (11.3) or version 11.2.

The tw_pattern_management utility enables you to upload pattern modules to the appliance, activate or deactivate pattern modules on the appliance, and remove pattern modules that are no longer required. You can perform these operations on knowledge uploads (Technology Knowledge updates (TKUs)), individual pattern modules, or files.

You can review the functionality provided by the tw_pattern_management utility on the Knowledge management page. This page enables you to better understand and use the knowledge updates and patterns installed on BMC Discovery.

  • Pattern—A sequence of commands written in the Pattern Language (TPL), which contain instructions that identify scanned entities which are then used to create the BMC Discovery data model.
  • Module—A text file written in TPL which contains one or more patterns.
  • Knowledge uploads—Typically, these are TKU zip files that include:
    • Zip archives of patterns
    • HRD files
    • Device RPMs (DRPMS)

Options in the utility specify the actions to be performed on the pattern modules. To use the utility, type the following command:

tw_pattern_management [options] <upload/[upload:]module/file>  


  • upload/[upload:]module/file is a knowledge upload name, a pattern module identifier, or an existing file. The necessary format to specify a pattern module is upload name:pattern module name. You can use shell parameter expansion to upload multiple matching files or all files in the current directory.
  • options are any of the options described in the following table and the common command line options described in Using command line utilities.

Command Line Option



Activate all pattern modules


Activate a specific pattern module


Activate pattern modules within knowledge upload


Deactivate a specific pattern module


Deactivate pattern modules within knowledge upload

-f, --force

Deactivate patterns before they are removed


Install pattern modules within knowledge upload. It does not activate the pattern modules.


Install and activate pattern modules within knowledge upload

-l, --list-uploads

List knowledge uploads


Remove all pattern modules


Remove a specific pattern module


Remove the knowledge upload


Display the progress of the operation


To understand TPL patterns and how they might function in your environment, refer to Configipedia, BMC's community website that facilitates knowledge sharing around TPL patterns. Configipedia also provides visibility of the Technology Knowledge Update release schedule and contents.


If you build your own zip archives of patterns, make sure they comply with the standard zip format. Other formats will not work.

User examples

In the following examples, type the commands on a single line. Line breaks are provided to make the examples easier to read.

Uploading and activating several patterns within a knowledge upload

You can upload and activate several patterns as a knowledge upload by specifying the knowledge upload name and using the --install-activate option. To upload and activate several patterns:

  1. Change to the directory containing the TPL zip archives.

    tideway@appliance01 ~] $ cd tmp
    tideway@appliance01 tmp] $ ls 
  2. Use the utility to upload patterns (providing your password to run the command):

    tideway@appliance01 tmp] $ tw_pattern_management --install-activate *
    Uploaded as knowledge upload "Upload A"
    Uploaded as knowledge upload "Upload B"
    Knowledge uploads "Upload A", "Upload B" activated
    tideway@appliance01 tmp] $ 

Deactivating a pattern module

You can deactivate a pattern module by specifying the pattern module name and using the --deactivate-module option. To deactivate a pattern module, type the following command:

tideway@appliance01 ~] $ tw_pattern_management --deactivate-module "Host.ComputerSystem"
1 pattern module deactivated 
tideway@appliance01 ~] $ 
Was this page helpful? Yes No Submitting... Thank you
  • No labels
© Copyright 2004 - 2019 BMC Software, Inc.
Legal notices