Solstice Enterprise Agents 1.0 User Guide

Chapter 7 DMI Command Line Utilities

7.1 DMI Command Line Utilities Overview

The Desktop Management Interface(DMI) Protocol command line interface consists of two utilities that retrieve DMI Service Provider (SP) information:

7.1.1 The dmi_cmd Utility

The dmi_cmd utility provides the ability to:

7.1.2 The dmiget Utility

The dmiget utility retrieves the table information of a specific component in the DMI SP.

7.2 Using the dmi_cmd Command

dmi_cmd [-s hostname]
-h |
-V |
-W config |
-X |
-CI mif_filename |
-CL [-c compId] [-r reqMode] [-d] [-p] [-m maxCount] |
-CD -c compId |
-GI schema_filename -c compId |
-GL -c compId -g groupId [-r reqMode] [-d] [-p] [-m maxCount] |
-GM -c compId [-m maxCount] |
-GD -c compId -g groupId |
-NI schema_filename -c compId |
-NL -c compId |
-ND -c compId -l language_string |
-AL -c compId -g groupId [-a attrId] [-r reqMode] [-d] [-p]

[-m maxCount]

The command line arguments for dmi_cmd are shown in Table 7-1.

Table 7-1 dmi_cmd Command Line Arguments

Argument 

Description 

-s hostname

Specifies the host machine that dmisp is running on; the default host is the local host

-h

Prints usage information 

-V

Retrieves version information about the DMI SP 

-W config

Sets the configuration specified in config to dmisp

-X

Retrieves configuration information describing the current language in use 

-CI mif_filename

Installs the component specified in mif_filename

-CL [-c compId] [-r reqMode] [-d] [-p] [-m maxCount]

Lists components 

-CD -c compId

Deletes the component specified by compId

-GI schema_filename -c compId

Installs the group schema specified in schema_filename

-GL -c compId -g groupId [-r reqMode] [-d] [-p] [-m maxCount]

Lists the groups for a specified component 

-GM -c compId [-m maxCount]

Lists class names for a specified component 

-GD -c compId -g groupId

Deletes specified groups for a specified component 

-NI schema_filename -c compId

Installs the language schema specified in schema_filename

-NL -c compId

Lists language mappings for a specified component 

-ND -c compId -l language_string

Deletes language mapping for a specified component 

-AL -c compId -g groupId [-a attrId] [-r reqMode] [-d] [-p] [-m maxCount]

Lists attributes for a specified component 


Note -

The values for compId, groupId, attrId, and maxCount are positive integers. The default value is 0.


The valid integer values for reqMode are:

7.2.1 dmi_cmd Examples

7.2.1.1 Example 1

The following command lists the component ID, name, and description of up to 5 components, starting from component 3 in the dmispd running on the host snowbell, by using the default request mode (DMI_UNIQUE).

%dmi_cmd -s snowbell -CL -d -c 3 -m 5

Connecting to dmispd on the snowbell...

CompId: 	4
Comp Name:	DMTF Developers -  Direct Interface Version
Description:	A list of the people who actually wrote the code.

CompId: 	5
Comp Name:	DMTF Developers -  Direct Interface Version
Description:	A list of the people who actually wrote the code.

CompId: 	6
Comp Name:	DMTF Developers -  Direct Interface Version
Description:	A list of the people who actually wrote the code.

CompId: 	7
Comp Name:	DMTF Developers -  Direct Interface Version
Description:	A list of the people who actually wrote the code.

CompId: 	8
Comp Name:	DMTF Developers -  Direct Interface Version
Description:	A list of the people who actually wrote the code.

7.2.1.2 Example 2

The following command lists the ID, name, storage, access mode, date type, and maximum size of all attributes in group 1 of component 1 in the dmispd running on local host, by using default request mode (DMI_UNIQUE). No description is displayed, and no limitation is set for max count.

%dmi_cmd -AL -g 1 -c 1

Connecting to dmispd on the localhost...

12 attrs listed for group 1 of comp 1

Attr Id:	1
Name:		Manufacturer
Storage:	MIF_COMMON
Access:		MIF_READ_ONLY
Type:		MIF_DISPLAYSTRING
maxSize:	64

Attr Id:	2
Name:		Product
Storage:	MIF_COMMON
Access:		MIF_READ_ONLY
Type:		MIF_DISPLAYSTRING
maxSize:	64

Attr Id:	3
Name:		Version
Storage:	MIF_COMMON
Access:		MIF_READ_ONLY
Type:		MIF_DISPLAYSTRING
maxSize:	64

Attr Id:	4
Name:		Serial Number
Storage:	MIF_SPECIFIC
Access:		MIF_READ_ONLY
Type:		MIF_DISPLAYSTRING
maxSize:	64

Attr Id:	5
Name:		Installation
Storage:	MIF_SPECIFIC
Access:		MIF_READ_ONLY
Type:		MIF_DATE
maxSize:	0

Attr Id:	6
Name:		Verify
Storage:	MIF_SPECIFIC
Access:		MIF_READ_ONLY
Type:		MIF_INTEGER
maxSize:	0

Attr Id:	7
Name:		ComponentId
Storage:	MIF_SPECIFIC
Access:		MIF_READ_ONLY
Type:		MIF_INTEGER
maxSize:	0

Attr Id:	8
Name:		ComponentName
Storage:	MIF_SPECIFIC
Access:		MIF_READ_ONLY
Type:		MIF_DISPLAYSTRING
maxSize:	256

Attr Id:	9
Name:		ComponentDesc
Storage:	MIF_SPECIFIC
Access:		MIF_READ_ONLY
Type:		MIF_DISPLAYSTRING
maxSize:	256

Attr Id:	10
Name:		GroupId
Storage:	MIF_SPECIFIC
Access:		MIF_READ_ONLY
Type:		MIF_INTEGER
maxSize:	0

Attr Id:	11
Name:		GroupName
Storage:	MIF_SPECIFIC
Access:		MIF_READ_ONLY
Type:		MIF_DISPLAYSTRING
maxSize:	256

Attr Id:	12
Name:		LanguageName
Storage:	MIF_SPECIFIC
Access:		MIF_READ_ONLY
Type:		MIF_DISPLAYSTRING
maxSize:	256

7.2.1.3 Example 3

The following command installs namedir.mif in dmispd running on localhost. The file namedir.mif is located in the directory specified in the configuration file.

%dmi_cmd -CI namedir.mif

Connecting to dmispd on the localhost...

"namedir.mif" is installed as comp 21.

7.2.1.4 Example 4

The following command uninstalls component 5 in dmispd running on localhost.

%dmi_cmd -CD -c 5

Connecting to dmispd on the localhost...

comp 5 is uninstalled.

7.2.1.5 Example 5

The following command displays the version of dmispd running on the snowbell machine.

%dmi_cmd -s snowbell -V

Connecting to dmispd on the snowbell...

dmispd version:	Dmi2.0
description:	This is a DMI2.0 based on ONC RPC

7.3 Using the dmiget Command

dmiget [-s hostname]

-h |

{-c compId [-g groupId] [-a attrId]}

The command line arguments for dmiget are described in Table 7-2.

Table 7-2 dmiget Command Line Arguments

Argument 

Description 

-s hostname

Specifies the host machine that dmisp is running on; the default host is the local host

-h

Prints usage information 

-c compId

Displays all the table information for a specified component 

-g groupId

Displays the group information for a component specified with the -c argument

-a attrId

Displays the attributes for the component specified with the -c argument

7.3.1 dmiget Examples

7.3.1.1 Example 1

The following command displays the table information in group 2 of component 3.

%dmiget -c 3 -g 2

Connecting to dmispd on the localhost...

For group 2 of component 3:

Id: 10,		10
Id: 20,		developer1
Id: 30,		SunSoft
Id: 40,		Solaris 2.6

Id: 10,		20
Id: 20,		developer2
Id: 30,		SunSoft
Id: 40,		Solaris 2.6

Id: 10,		30
Id: 20,		developer3
Id: 30,		SunSoft
Id: 40,		Solaris 2.6

7.3.1.2 Example 2

The following command displays the table information for component 3.

%dmiget -c 3

Connecting to dmispd on the localhost...

For group 1 of component 3:

Id: 1,		SunSoft
Id: 2,		DMTF Demonstration
Id: 3,		Version 1.0
Id: 4,		1.00000
Id: 5,		1994 06 03 09 00 00
Id: 6,		0
Id: 7,		0
Id: 8,
Id: 9,
Id: 10,		0
Id: 11,
Id: 12,

For group 2 of component 3:

Id: 10,		10
Id: 20,		developer1
Id: 30,		SunSoft
Id: 40,		Solaris 2.6

Id: 10,		20
Id: 20,		developer2
Id: 30,		SunSoft
Id: 40,		Solaris 2.6

Id: 10,		30
Id: 20,		developer3
Id: 30,		SunSoft
Id: 40,		Solaris 2.6

For group 42 of component 3:

Id: 1,		Circus
Id: 2,		4.0a

Id: 1,		Disk Blaster
Id: 2,		2.0c

Id: 1,		Oleo
Id: 2,		3.0

Id: 1,		Presenter
Id: 2,		1.2

7.3.1.3 Example 3

The following command displays table information for attribute 20 in group 2 of component 3.

%dmiget -c 3 -g 2 -a 20 -s snowbell

Connecting to dmispd on the snowbell...

For group 2 of component 3:

Id: 20,			developer1

Id: 20,			developer2

Id: 20,			developer3