Quantcast
Viewing all articles
Browse latest Browse all 16365

Convert BPS Output to Percentage of Interface Bandwidth

Hi there,

 

I'm using a slightly modified 95th percentile utilization rate report on specific interfaces.  The data output for the Interface is give in bps.  Is there a way to have this number converted to a percentage of the interface bandwidth as specified in solar.

 

For example, one of my interfaces shows a receive bps of 606Mbps.  The Interface bandwidth is 1000Mbps.  Is there a way to use the SQL code to convert this and generate a percentage of 60.6% ?

 

Here's the code

 

=====================================

 

SET NOCOUNT OFF

SET ROWCOUNT 0

 

DECLARE @StartDate DateTime

DECLARE @EndDate DateTime

 

SET @StartDate = DATEADD(d, DATEDIFF(d, 0, DATEADD(m, -1, DATEADD(d, 1 - day(getdate()), getdate()))), 0)

SET @EndDate = DATEADD(ms, -2,DATEADD(d, DATEDIFF(d, 0, DATEADD(d, 1 - day(getdate()), getdate())), 0))

 

SELECT    Interfaces.InterfaceId,

        Nodes.NodeID,

        Nodes.Caption AS NodeName,

        Nodes.VendorIcon AS Vendor_Icon,

        Interfaces.Caption AS Interface_Caption,

        Interfaces.InterfaceIcon AS Interface_Icon,

        Maxbps_In95,

        Maxbps_Out95,

        Maxbps_95

FROM Nodes

INNER JOIN Interfaces ON Nodes.NodeID = Interfaces.NodeID

INNER JOIN (

    SELECT    InterfaceID,

            dbo.GetInBps95th(InterfaceID, @StartDate, @EndDate) AS Maxbps_In95,

            dbo.GetOutBps95th(InterfaceID, @StartDate, @EndDate) AS Maxbps_Out95,

            dbo.GetMaxBps95th(InterfaceID, @StartDate, @EndDate) AS Maxbps_95

    FROM InterfaceTraffic

    WHERE InterfaceTraffic.DateTime >= @StartDate AND InterfaceTraffic.DateTime <= @EndDate AND InterfaceID in (34567,29355,30320)

    GROUP BY InterfaceID

) TrafficStat

ON Interfaces.InterfaceID = TrafficStat.InterfaceID

WHERE ${LIMITATION}

ORDER BY NodeName, Interface_Caption


Viewing all articles
Browse latest Browse all 16365

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>