Writing your own program
149
Other points to note about user-defined attribute lookup programs:
■
If your program exits prematurely, for example, it crashes, then the
Traffix Service stops. Therefore you must ensure that your program is
reliable.
■
Your program must startup within 30 seconds. This means that your
program must call
GetNextLookup
within 30 seconds. If 30 seconds
is not long enough for your program, then you can control this
time-out by setting a system environment variable
TFX_ATTRSTART_TIME
to a number of seconds, for example,
60
. Once
your machine has been rebooted, this new time-out takes effect.
■
Your program must complete the lookup of attributes for a device
within 30 seconds. After 30 seconds any attribute values your
program assigns are ignored. Note that this time-out can also be
controlled by setting a system environment variable
TFX_ATTRLOOK_TIME
to a number of seconds. Once your machine has
been rebooted this new time-out takes effect.
Testing Attribute
Lookup Programs
If you want to test your attribute lookup program or test a data file for
one of the standard attribute lookup programs before adding it to the
user-defined attribute program configuration file, there is a very simple
utility provided which allows you to do this. This utility can only test
GetAttribute
Should be called sometime after GetNextLookup. Takes an
attribute name as an argument. Returns the currently
assigned value of that attribute for the current device as a
string. Returns an empty string if the specified attribute is not
assigned.
SetAttribute
Should be called sometime after GetNextLookup. Takes an
attribute name and an attribute value as arguments. Assigns
the specified attribute value for the current device.
IsAttributeSet
Should be called sometime after GetNextLookup. Takes an
attribute name as an argument. Returns an integer/Boolean.
Returns 1/True if the named attribute is currently assigned for
the current device and 0/False if the named attribute is not
currently assigned for the current device.
LogError,
LogInfo
These functions take a string as an argument. The string is
logged to the Traffix Manager Event List directory, such that it
can be viewed in the Traffix Manager Event List. LogError logs
an error message, while LogInfo logs a normal informational
message.
Table 21
Functions available to lookup programs in the attripc DLL library
Function
Description
Содержание Traffix Transcend Traffix Manager
Страница 10: ......
Страница 18: ......
Страница 24: ...24 CHAPTER 1 TRAFFIX MANAGER OVERVIEW ...
Страница 33: ...II HOW TRAFFIX MANAGER WORKS Chapter 3 Collecting Data Chapter 4 Grouping Network Devices in the Map ...
Страница 34: ......
Страница 46: ...46 CHAPTER 4 GROUPING NETWORK DEVICES IN THE MAP Figure 6 Groupings dialog box ...
Страница 48: ......
Страница 56: ...56 CHAPTER 6 CONFIGURING AGENTS FOR DATA COLLECTION ...
Страница 70: ...70 CHAPTER 8 DISPLAYING TRAFFIC IN GRAPHS ...
Страница 88: ...88 CHAPTER 10 VIEWING EVENTS ...
Страница 114: ......
Страница 120: ...120 APPENDIX A TROUBLESHOOTING TRAFFIX MANAGER ...
Страница 152: ...152 APPENDIX F SUPPORTED RMON 2 DEVICES ...
Страница 156: ...156 APPENDIX G CONFIGURING 3COM STANDALONE RMON 2 AGENTS ...
Страница 160: ...160 APPENDIX I USING RMON 1 AGENTS ...
Страница 168: ......
Страница 184: ...184 INDEX ...