Set Feature Capacity

Monitor tracks the capacity of licenses in addition to utilization data. This is done so automatically with a periodic job, via the SNAPSHOT_CAPACITY task by loading a snapshot of the capacity of all features every hour by default, comparing the values against what is in the database and if they differ, inserting a new capacity value for each feature. In parallel, a data file also maintains a history of the capacity changes. This data file is useful for multi-site situations to aggregate capacity data to a parent site.

The ftlm_capacity utility is used to show and manage the capacity values in the Monitor database. The utility provides the following functions:
  • Show existing capacity values
  • Reload capacity values
  • Set capacity value for a specific feature for a specific time

Operation

To execute ftlm_capacity, first setup the CLI:

% vovproject enable licmon
After setting up the CLI, the command can be executed:

ftlm_capacity: Usage Message

    Manages feature capacity information in the LicenseMonitor database.

    SYNOPSIS:
    % ftlm_capacity <ACTION> [OPTIONS]

    ACTIONS:
    show                -- Show latest capacity information.
    dump                -- Same as show, only with Unix timestamps.
    clear               -- Clear capacity data from database.

    checkmismatch       -- Check mismatch between latest DB capacity and live
                           data. Requires a tag to be specified with -tag.
    fixmismatch         -- Fix mismatches that are found with checkmismatch.
                           Requires a tag to be specified with -tag.

    load                -- Load information about capacity by parsing the
                           resources logs (in licmon.swd/logs/resources*)
    snapshot            -- Snapshot capacity info using current information.
    snapfromfile <FILE> -- Load snapshot capacity info from file. This action
                           does not work with the tag/feature/start/finish
                           options below.
                           Format of the file: setCapacity TAG FEATURE
                           TOKENS TIMESTAMP
    set <TAG> <FEATURE> <TOKENS> <DATE_SPEC>
                        -- Set a new data point in the capacity table.
    setforward <TAG> <FEATURE> <TOKENS> <DATE_SPEC>
                        -- Same as 'set' but delete all points where the
                           timestamp is greater than the specified timestamp.

    OPTIONS:
    -v                     -- Increase verbosity.
    -all                   -- For show and dump, display all capacities as
                              opposed to the latest only.
    -n                     -- Dry-run mode for write operations.
    -tag     <TAG>         -- Constrain to a specific tag.
    -feature <FEATURE>     -- Constrain to a specific feature.
    -start   <DATESPEC>    -- Specify start for load, show, and dump actions.
    -finish  <DATESPEC>    -- Specify finish for load, show, and dump actions.
    -srcdir  <DIR>         -- Directory with the resources*log files.
                              Default: *.swd/logs
    -wavedir <DIR>         -- Directory where waves should be stored.
                              Default: *.swd/logs/waves
    -force                 -- Prevent redundant point detection for
                              snapfromfile action.

    EXAMPLES:
    % ftlm_capacity show
    % ftlm_capacity dump
    % ftlm_capacity show -feature hspice
    % ftlm_capacity dump -tag EDA -feature hspice -start 20090215
    % ftlm_capacity load
    % ftlm_capacity load -tag EDA
    % ftlm_capacity set EDA hspice 12 "1 year ago"
    % ftlm_capacity setforward EDA hspice 12 "1 year ago"
    % ftlm_capacity clear -tag EDA
    % ftlm_capacity snapshot
    % ftlm_capacity snapfromfile licmon.swd/data/capacity/2011.01.01.cap