To assign a set of tags to a device, you need to run the klscflag utility on the client device to which you want to assign tags.
The klscflag utility overwrites the existing tags assigned to the device. This means that you can add or remove tags by specifying the desired set of tags in the command. The utility does not have separate commands for adding or removing individual tags. Instead, you modify the entire set of tags.
When specifying tag names in commands such as klscflag, it is recommended to use a consistent-case approach, such as all caps. Using all caps can help avoid potential issues with tags that differ only in case, depending on the DBMS configuration.
To assign tags to your device by using the klscflag utility:
klscflag -ssvset -pv 1103/1.0.0.0 -s KLNAG_SECTION_TAGS_INFO -n KLCONN_HOST_TAGS -sv "[\"
TAG NAME 1
\",\"
TAG NAME 2
\",\"
TAG NAME 3
\"]" -svt ARRAY_T -ss "|ss_type = \"SS_PRODINFO\";"
where [\"
TAG NAME 1
\",\"
TAG NAME 2
\",\"
TAG NAME 3
\"]
is the list of tags you that want to assign to your device.
If you leave the square brackets empty, this will remove all tags from the device:
klscflag -ssvset -pv 1103/1.0.0.0 -s KLNAG_SECTION_TAGS_INFO -n KLCONN_HOST_TAGS -sv "[]" -svt ARRAY_T -ss "|ss_type = \"SS_PRODINFO\";"
klscflag -ssvset -pv 1103/1.0.0.0 -s KLNAG_SECTION_TAGS_INFO -n KLCONN_HOST_TAGS -sv "[\"
NEW TAG NAME
\",\"
TAG NAME 1
\",\"
TAG NAME 2
\",\"
TAG NAME 3
\"]" -svt ARRAY_T -ss "|ss_type = \"SS_PRODINFO\";"
where NEW TAG NAME
is the name of the tag that you want to assign to your device and TAG NAME 1
, TAG NAME 2
, TAG NAME 3
are the names of the tags already assigned to the device.
For example, if your current tags are TAG NAME 1
, TAG NAME 2
, TAG NAME 3
and you want to remove TAG NAME 2
, run the following command:
klscflag -ssvset -pv 1103/1.0.0.0 -s KLNAG_SECTION_TAGS_INFO -n KLCONN_HOST_TAGS -sv "[\"
TAG NAME 1
\",\"
TAG NAME 3
\"]" -svt ARRAY_T -ss "|ss_type = \"SS_PRODINFO\";"
The klscflag utility assigns the specified tags to your device. To make sure that the klscflag utility has assigned the specified tags successfully, view tags assigned to the device.
Alternatively, you can assign device tags manually.
Page top