 |
Software > Tivoli > Products > IBM Tivoli Monitoring >
|
 |
 |
 |
UA Scale and Precision Maximum Value
|
| | | Question | | How to set maximum-size when using scale and precision in the UA. | | | | | | Cause | UA6.2 User's Guide states
"To enable this capability(floating ppint numbers), specify SCALE{<nn>} PRECISION{<mm>} to the right of an attribute definition.
For example,
FloatAttr1 C 999999 SCALE{2} PRECISION {5} SCALE and PRECISION parameter values must be enclosed inside curly braces.
IMPORTANT NOTE: To ensure correct scaling results, you must set the Maximum Size in metafiles for numeric types as greater than 32,767 (32K).
For example,
FloatAttr2 C 99999 SCALE{1} PRECISION{5}
Otherwise, data values are displayed incorrectly in the portal. Alternatively, you may choose to specify SCALE{<nn>} PRECISION{<mm>} in a derived attribute.
For example,
PktReceivedPerSec C 1000000
PktDiscardedPerSec C 1000000
DiscardedRatio (PktDiscardedPerSec / PktReceivedPerSec) SCALE{3} PRECISION{6}
The maximum allowed SCALE value is 10 and the maximum allowed PRECISION value is 12. However, when set FloatValue C 99999 SCALE{3} PRECISION{5}
For values less than 10000, the monitoring result is correct. For values larger than 9999, the value is wrong.
11111 | 1111.000
99999 | 9999.000
It seems 9999.999 is the largest value for this metafile, but actually, the maximum -size is set to 99999. | | | | | Answer | The maximum size value declared for a Counter or Gauge type
IntValue1 C 9999 <-- will handle integer 0..9999
IntValue2 C 32767 <-- will handle integer 0..32767
IntValue3 C 32768 <-- will handle integer 0..32768
IntValue4 C 99999 <-- will handle integer 0..99999
Now, there is an important threshold for maximum size value when you introduce SCALE feature, for supporting and formatting floating point numbers.
IntValue2 C 32767 <- internal type is a short,16 bit int
IntValue3 C 32768 <- internal type is a long,32 bit int
So, if I declare ...
FltValue1 C 32767 SCALE{2} PRECISIO {7} let's use a example raw data value received by UA to 327.68.
UA code will take raw data value and in this case apply a SCALE of 2, so we have 327.68 x 100 = 32768 which UA then tries to store in a 2 byte int data type the resulting value will be incorrect.
RULE #1:
=========================================================
Any attribute that declares SCALE must have a maximum size value declared of at least 32768 [ this is because we always need a 32 bit integer type for UA to perform the scaling arithmetic ]
For example -> FltValue2 C 32768 SCALE{2} PRECISION{7}
This declaration will support values from 0.00 to 32768.00
RULE #2:
=========================================================
PRECISION setting must be equal to or greater than the sum ofnumber of digit positions in 'maximum size' value and number of digit positions for declared by SCALE {n} qualifier.
For example -> FltValue2 C 32768 SCALE{2} PRECISION{7}
we have 5 digit positions per the '32768' and 2 digit positions per SCALE{2}, so 5 + 2 = 7, thus PRECISION must declare at least size of 7.
RULE #3:
==========================================================
The 'maximum size' value must be large enough for the largestwhole number portion of the floating point number you wish tomonitor.
For example ->
FltValue2 C 32768 SCALE{2} PRECISION{7}
will not handle larger than 32768.00
FltValue2 C 99999 SCALE{2} PRECISION {7}
will not handle values larger than 99999.00 So for case of customer's data set, per float.txt ...
float.txt
string number
------- -------
1.1111 1.1111
11.111 11.111
111.11 111.11
1111.1 1111.1
11111 11111
111111 111111
9999 9999.000
9999.9 9999.900
9999.999 9999.999
99999 9999.000
- the largest whole number in data set is 111111, so 'maximum size'value must be at least 111111 ( RULE #3 )
- digit count for 'maximum size' is 6, digit count for SCALE is 3,so PRECISION will be 6 + 3 = 9 ( RULE #2 )
- 'maximum size' value for this data set needs to be at least 111111 which is greater than or equal to 32768 ( RULE #1 )
Thus the minimal attribute declaration for the float.txt data set is ...
FltValue C 111111 SCALE{3} PRECISION{9}
Best Practice would advise that one declare ...
FltValue C 999999 SCALE{3} PRECISION{9}
so as to accommodate the largest value of 10 to the 6th power | | | | | | | | |
 |
| IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml. |
 |
 |
 |
| Please take a moment to complete this form to help us better serve you. |
 |
 |
 |
|
|
|
 |
 |
| Product categories: |
 |
| | Software |  |
| | Systems and Asset Management |  |
| | Application Performance & Availability |  |
| | IBM Tivoli Monitoring |  |
 |
| Operating system(s): |
| |
AIX, AIX 64bit, HP-UX, Linux, Solaris, Windows
|
 |
| Software version: |
| |
6.2
|
 |
| Reference #: |
| |
1322639
|
 |
| IBM Group: |
| | Software Group |
 |
| Modified date: |
| | 2009-04-01 |
 |
|