MAPSID(1)

NAME
mapsid - Map between sensor names and sensor numbers

SYNOPSIS
  mapsid [--site-config-file=FILENAME] [--print-classes]
        [--print-descriptions]
        [{ <sensor-name> | <sensor-number> } ...]

  mapsid --help

  mapsid --version

DESCRIPTION
mapsid is a utility that maps sensor names to sensor numbers or vice versa depending on the input arguments. Sensors are defined in the silk.conf(5) file.

When no sensor arguments are given to mapsid, the mapping of all sensor numbers to names is printed. When a numeric argument is given, the number to name mapping is printed for the specified argument. When a name is given, its numeric id is printed. For convenience when typing in sensor names, case is ignored.

OPTIONS
Option names may be abbreviated if the abbreviation is unique or is an exact match for an option. A parameter to an option may be specified as --arg=param or --arg param, though the first form is required for options that take optional parameters.

--print-classes
    For each sensor, print the classes for which the sensor collects data. The classes are enclosed in square brackets, "[]".

--print-descriptions
    For each sensor, print the description of the sensor as defined in the silk.conf file (if any).

--site-config-file=FILENAME
    Read the SiLK site configuration from the named file FILENAME. When this switch is not provided, the location specified by the SILK_CONFIG_FILE environment variable is used if that variable is not empty. The value of SILK_CONFIG_FILE should include the name of the file. Otherwise, the application looks for a file named silk.conf in the following directories: the directory specified in the SILK_DATA_ROOTDIR environment variable; the data root directory that is compiled into SiLK (use the --version switch to view this value); the directories $SILK_PATH/share/silk/ and $SILK_PATH/share/; and the share/silk/ and share/ directories parallel to the application's directory.

--help
    Print the available options and exit.

--version
    Print the version number and information about how SiLK was configured, then exit the application.

EXAMPLES
Name to number mapping:

 $ mapsid beta
 BETA ->     1

Number to name mapping:

 $ mapsid 3
     3 -> DELTA

Print all mappings:

 $ mapsid
     0 -> ALPHA
     1 -> BETA
     2 -> GAMMA
     3 -> DELTA
     4 -> EPSLN
     5 -> ZETA
      ....

Print the class:

 $ mapsid --print-classes 3 ZETA
     3 -> DELTA  [all]
 ZETA  ->     5  [all]

Print the class and description:

 $ mapsid --print-classes --print-description 0 1
     0 -> ALPHA  [all]  "Primary gateway"
     1 -> BETA   [all]  "Secondary gateway"

ENVIRONMENT

SILK_CONFIG_FILE
    This environment variable is used as the value for the --site-config-file when that switch is not provided.

SILK_DATA_ROOTDIR
    When the --site-config-file switch is not provided and the SILK_CONFIG_FILE environment variable is not set, mapsid looks for the site configuration file in $SILK_DATA_ROOTDIR/silk.conf.

SILK_PATH
    This environment variable gives the root of the install tree. As part of its search for the SiLK site configuration file, mapsid checks for a file named silk.conf in the directories $SILK_PATH/share/silk and $SILK_PATH/share.

SEE ALSO
rwfilter(1), rwcut(1), silk.conf(5)