Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for CPUCount (0.08 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 {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Jun 01 05:16:24 UTC 2024
    - 6.3K 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)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Jul 24 23:30:33 UTC 2024
    - 17.2K 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
    	if ts != nil {
    		tot := ts.User + ts.System + ts.Idle + ts.Iowait + ts.Nice + ts.Steal
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Jun 20 17:55:03 UTC 2024
    - 3K bytes
    - Viewed (0)
Back to top