Skip to content

Commit 7d770b4

Browse files
committed
collector/cpu: s/cpu_ticks*/cpu_nsec* for solaris
Replace all cpu_ticks_* with cpu_nsec_*, since the former was off my a magnitude of 10e6, and showed incorrect values for node_cpu_seconds_total. Fixes: #1837 Signed-off-by: Pranshu Srivastava <[email protected]>
1 parent 32ac7f4 commit 7d770b4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

collector/cpu_solaris.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ func (c *cpuCollector) Update(ch chan<- prometheus.Metric) error {
6060
}
6161

6262
for k, v := range map[string]string{
63-
"idle": "cpu_ticks_idle",
64-
"kernel": "cpu_ticks_kernel",
65-
"user": "cpu_ticks_user",
66-
"wait": "cpu_ticks_wait",
63+
"idle": "cpu_nsec_idle",
64+
"kernel": "cpu_nsec_kernel",
65+
"user": "cpu_nsec_user",
66+
"wait": "cpu_nsec_wait",
6767
} {
6868
kstatValue, err := ksCPU.GetNamed(v)
6969
if err != nil {

0 commit comments

Comments
 (0)