|
From: Buchan M. <bg...@st...> - 2010-09-06 08:20:11
|
On Saturday, 4 September 2010 03:53:32 Glenn Attwood wrote:
> I'm working on a template for a bunch of my 3com (now HP I guess)
> switches that are stacked together, specifically the 5500G-EI is what
> I'm working on right now. The data I'm getting from the different
> repeaters matches up, except that the leaf number is not the same, e.g.,
> 0 = 65536, 1=131072; or more generally n=(m+1)*65536.
This is a bit brain-dead ...
> As well there is
> no accessible leaf, branch, or table that lists this mapping. How can I
> modify the leaf number of one repeater to match up with the leaf number
> of another repeater so that all the data can be displayed in one table?
>
> Sample data... Enumerate the stack (i.e. how many units)
> hwLswFrameIndex.0 = INTEGER: 0
> hwLswFrameIndex.1 = INTEGER: 1
> hwLswFrameIndex.2 = INTEGER: 2
>
> So far so good what do the cpu "total" OIDs look like?
> hwCpuCostRate.65536 = Gauge32: 84
> hwCpuCostRate.131072 = Gauge32: 59
> hwCpuCostRate.196608 = Gauge32: 57
>
> And the memory?
> hwMemFree.65536 = Gauge32: 41651576
> hwMemFree.131072 = Gauge32: 35982132
> hwMemFree.196608 = Gauge32: 36261272
>
> The table I have (for memory) is:
> {mem_used} ({mem_used_per}%)|{mem_free} ({mem_free_per}%)|{mem_total}
>
> The table I'd like to have is:
> unit{unit_number}|{mem_used} ({mem_used_per}%)|{mem_free}
> ({mem_free_per}%)|{mem_total}
>
> That way I can seewhich unit is having a problem, and graph the
> cpu/memory/other on a per unit basis.
You should be able to 1)get the index with INDEX, 2)do some math with the
index, then 3)use CHAIN to get back:
hwLswFrameIndexIndex : INDEX {hwLswFrameIndex} # 0,1,2 ....
hwLswFrameIndexMatch : MATH : ({hwLswFrameIndexIndex} +1) x 65536 #
65536,131072
hwCpuCostRateFrame : CHAIN {hwCpuCostRate} {hwLswFrameIndexMatch}
hwMemFreeFrame : CHAIN {hwMemFree} {hwLswFrameIndexMatch}
Now you should have something like this:
hwCpuCostRateFrame.0 = Gauge32: 84
hwCpuCostRateFrame.1 = Gauge32: 59
hwCpuCostRateFrame.2 = Gauge32: 57
hwMemFreeFrame.0 = Gauge32: 41651576
hwMemFreeFrame.1 = Gauge32: 35982132
hwMemFreeFrame.2 = Gauge32: 36261272
You may want to use devmon from svn for this, I think there were some small
bugfixes in the INDEX operator.
Regards,
Buchan
|