109 |
|
// don't try to continue and process, try next disk |
110 |
|
break; |
111 |
|
} |
112 |
< |
|
113 |
< |
// percentage of memory in use |
114 |
< |
double diskInUse = (1 - (diskAvail / diskTotal)) * 100; |
112 |
> |
|
113 |
> |
boolean useValue = false; |
114 |
> |
try { |
115 |
> |
String option = _cp.getProperty("Host." + source, "Monitor." + _name + ".thresholdMeasure"); |
116 |
> |
if (option.equals("VALUE")) { |
117 |
> |
useValue = true; |
118 |
> |
} |
119 |
> |
} catch (PropertyNotFoundException e) { |
120 |
> |
// we default to percentage |
121 |
> |
} |
122 |
> |
|
123 |
> |
// this bit determines if the disk check is a % check |
124 |
> |
// or a kb check |
125 |
> |
double diskInUse; |
126 |
> |
if(useValue) { |
127 |
> |
// kb disk in use |
128 |
> |
diskInUse = diskTotal - diskAvail; |
129 |
> |
} else { |
130 |
> |
// kb disk in use |
131 |
> |
diskInUse = (1 - (diskAvail / diskTotal)) * 100; |
132 |
> |
} |
133 |
> |
|
134 |
> |
|
135 |
> |
|
136 |
|
int newThreshold = checkAttributeThreshold(diskInUse, reg); |
137 |
|
|
138 |
|
// format the memoryInUse to a String |