Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for CPUCount (0.31 sec)

  1. cmd/metrics-realtime.go

    				m.Errors = append(m.Errors, fmt.Sprintf("%s: Expected one CPU stat, got %d", byHostName, len(cm)))
    			}
    		}
    		cpuCount, err := c.Counts(true)
    		if err != nil {
    			m.Errors = append(m.Errors, fmt.Sprintf("%s: %v (cpuCount)", byHostName, err.Error()))
    		} else {
    			m.Aggregated.CPU.CPUCount = cpuCount
    		}
    
    		loadStat, err := load.Avg()
    		if err != nil {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Apr 10 16:28:08 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  2. cmd/metrics-resource.go

    					updateResourceMetrics(cpuSubsystem, cpuLoad15, ls.Load15, labels, false)
    					if hm.CPU.CPUCount > 0 {
    						perc := math.Round(ls.Load1*100*100/float64(hm.CPU.CPUCount)) / 100
    						updateResourceMetrics(cpuSubsystem, cpuLoad1Perc, perc, labels, false)
    						perc = math.Round(ls.Load5*100*100/float64(hm.CPU.CPUCount)) / 100
    						updateResourceMetrics(cpuSubsystem, cpuLoad5Perc, perc, labels, false)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Apr 23 23:56:12 GMT 2024
    - 17.4K bytes
    - Viewed (0)
  3. cmd/metrics-v3-system-cpu.go

    	cpuMetrics, _ := c.cpuMetrics.Get()
    
    	if cpuMetrics.LoadStat != nil {
    		m.Set(sysCPULoad, cpuMetrics.LoadStat.Load1)
    		perc := cpuMetrics.LoadStat.Load1 * 100 / float64(cpuMetrics.CPUCount)
    		m.Set(sysCPULoadPerc, math.Round(perc*100)/100)
    	}
    
    	ts := cpuMetrics.TimesStat
    	tot := ts.User + ts.System + ts.Idle + ts.Iowait + ts.Nice + ts.Steal
    	cpuUserVal := math.Round(ts.User/tot*100*100) / 100
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Apr 23 23:56:12 GMT 2024
    - 3K bytes
    - Viewed (0)
Back to top