OSF DCE Administration Guide--Core Components

Managing DCE Host Services and Host Data
/.../my_cell.goodco.com/hosts/bronze/config/hostdata/cell_name \
-data {/.../my_cell.goodco.com}}
9.3.3 Manipulating Data in Other Host Files
While the hostdata object is useful for changing cell name and cell alias information, it
has a broader use too; you can use it to add, change, and remove data from any file that is
accessible on a DCE host.
One useful example is adding a new CDS attribute. Every DCE host has its own CDS
attributes file (cds_attributes) where it stores object IDs for each CDS attribute. You
could use the local host’s editor to add the attribute and then copy the new file to each
host. But this method requires you to log into each host. A simpler method would be to
use the hostdata object to add the new attribute to the CDS attributes file. Place the
operation within a foreach loop that reexecutes it for each host in the cell.
1. Make the CDS attributes file accessible as an object of the hostdata object. First,
use the hostdata object to create a CDS entry representing the CDS attributes file.
Set the storage attribute to be the host filename of the CDS attributes file. The
following example assumes the CDS attributes file is in the default location:
dcecp> hostdata create /.:/hosts/silver/config/hostdata/cds_attr \
-storage /opt/dcelocal/etc/cds_attributes -entry
2. The hostdata object modifies data in files by replacing all the data in the file with
new data that you specify. The following example shows one way to do this.
First, retrieve and store all the lines as dcecp list elements in a variable. Then
create a new variable by using the attrlist command to add the new line as a list
element to the variable. Finally, copy the new variable back to the file.
dcecp> set val [hostdata show /.:/hosts/silver/config/hostdata/cds_attr]
dcecp> set newval [attrlist add $val -member {NEW_ATTR 1.2.3.4}]
dcecp> hostdata modify /.:/hosts/silver/config/hostdata/cds_attr \
-data $newval
9.4 Routing Serviceability Messages
The DCE serviceability mechanism is designed to be used mainly for server
informational and error messaging—that is, for messages that are of interest to those who
are concerned with server maintenance and administration (in the broadest sense of these
terms). The essential idea of the mechanism is that all server events that are significant
for maintaining or restoring normal operation should be reported in messages that are
made to be self-documenting. As a result (assuming that all events have been correctly
identified and reported), users and administrators will always be able to learn what action
124243 Tandem Computers Incorporated 97