// updateShimMetrics will update metrics for kata shim process itself
updateShimMetrics will update metrics for kata shim process itself
// updateShimMetrics will update metrics for kata shim process itself
func updateShimMetrics() error {
	proc, err := procfs.Self()
	if err != nil {
		return err
	}
	if fds, err := proc.FileDescriptorsLen(); err == nil {
		katashimOpenFDs.Set(float64(fds))
	}
	if netdev, err := proc.NetDev(); err == nil {
		for _, v := range netdev {
			mutils.SetGaugeVecNetDev(katashimNetdev, v)
		}
	}
	if procStat, err := proc.Stat(); err == nil {
		katashimThreads.Set(float64(procStat.NumThreads))
		mutils.SetGaugeVecProcStat(katashimProcStat, procStat)
	}
	us
	if procStatus, err := proc.NewStatus(); err == nil {
		mutils.SetGaugeVecProcStatus(katashimProcStatus, procStatus)
	}
	if ioStat, err := proc.IO(); err == nil {
		mutils.SetGaugeVecProcIO(katashimIOStat, ioStat)
	}
	return nil
}
func updateShimMetrics ( ) error { proc , err := procfs . Self ( ) if err != nil { return err } if fds , err := proc . FileDescriptorsLen ( ) ; err == nil { katashimOpenFDs . Set ( float64 ( fds ) ) } if netdev , err := proc . NetDev ( ) ; err == nil { for _ , v := range netdev { mutils . SetGaugeVecNetDev ( katashimNetdev , v ) } } if procStat , err := proc . Stat ( ) ; err == nil { katashimThreads . Set ( float64 ( procStat . NumThreads ) ) mutils . SetGaugeVecProcStat ( katashimProcStat , procStat ) } if procStatus , err := proc . NewStatus ( ) ; err == nil { mutils . SetGaugeVecProcStatus ( katashimProcStatus , procStatus ) } if ioStat , err := proc . IO ( ) ; err == nil { mutils . SetGaugeVecProcIO ( katashimIOStat , ioStat ) } return nil }
updateShimMetrics will update metrics for kata shim process itself
updateShimMetrics will update metrics for kata shim process itself
// metrics about open FDs // network device metrics // netdev: map[string]NetDevLine // proc stat // proc status // porc IO stat