Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for GetInterfaceNetStats (0.07 sec)

  1. internal/net/net.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package net
    
    import (
    	"fmt"
    
    	"github.com/prometheus/procfs"
    )
    
    // GetInterfaceNetStats - get procfs.NetDevLine by interfaceName
    func GetInterfaceNetStats(interf string) (procfs.NetDevLine, error) {
    	proc, err := procfs.Self()
    	if err != nil {
    		return procfs.NetDevLine{}, err
    	}
    	netDev, err := proc.NetDev()
    	if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jul 17 08:14:01 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  2. cmd/metrics-realtime.go

    	}
    	if types.Contains(madmin.MetricNet) {
    		m.Aggregated.Net = &madmin.NetMetrics{
    			CollectedAt:   UTCNow(),
    			InterfaceName: globalInternodeInterface,
    		}
    		netStats, err := net.GetInterfaceNetStats(globalInternodeInterface)
    		if err != nil {
    			m.Errors = append(m.Errors, fmt.Sprintf("%s: %v  (nicstats)", byHostName, err.Error()))
    		} else {
    			m.Aggregated.Net.NetStats = netStats
    		}
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Jun 01 05:16:24 UTC 2024
    - 6.3K bytes
    - Viewed (0)
Back to top