Using the fileattrs Program 141
Configuration File Example 2
To assign user and operating system information to devices based upon their address:
*KEY:2
*ATT:NL Type, NL Address, User, O/S
IP, 104.240.20.10, Joe Bloggs, Solaris 2.5
IP, 104.240.20.8, Joe Bloggs, Windows 95
IP, 104.240.20.13, John Smith, Solaris 2.5
IP, 104.240.20.14, General Use, AIX 4.1
If the discovered device has the NL Type IP and an NL Address of 104.240.20.13, this matches the key fields of the third entry and assigns values to the User (John Smith) and O/S (Solaris 2.5) attributes.
Running fileattrs The user can have many different configuration files, each running with its own copy of fileattrs and so with its own entry in the
For example, if two configuration files — COUNTRY.TXT and MACHINEINFO.TXT — were contained in c:\data, then you could add the following two lines to the
Country fileattrs.exe c:\data\country.txt | TRUE |
machineinfo fileattrs.exe c:\data\machineinfo.txt TRUE
Attributes would then be assigned to devices based on the contents of these two configuration files.
If you change the contents of the configuration file, then you must restart the Traffix Manager Server for your changes to take effect. If fileattrs detects a syntax error in the configuration file, the Traffix Manager Server stops. You can view any error message in the Event List.
How fileattrs Works When a device is discovered, fileattrs does the following:
1It finds the KEY attribute(s) for that device, and sees if it matches any of the entries listed in the file. If it does, then it assigns the appropriate values for the attributes listed in ATT to that device.
2The special attribute value ’*’ matches any attribute in the key column. If no matching entry is found in the configuration file for a particular device, no attributes are assigned.