Skip to content

Commit

Permalink
Merge pull request #76 from zhengtianbao/master
Browse files Browse the repository at this point in the history
Use Getpagesize replace hard-coded page size
  • Loading branch information
f41gh7 authored Jun 17, 2024
2 parents 5e5f209 + 7b14975 commit 464c46d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion process_metrics_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func writeProcessMetrics(w io.Writer) {
WriteCounterUint64(w, "process_major_pagefaults_total", uint64(p.Majflt))
WriteCounterUint64(w, "process_minor_pagefaults_total", uint64(p.Minflt))
WriteGaugeUint64(w, "process_num_threads", uint64(p.NumThreads))
WriteGaugeUint64(w, "process_resident_memory_bytes", uint64(p.Rss)*4096)
WriteGaugeUint64(w, "process_resident_memory_bytes", uint64(p.Rss)*uint64(os.Getpagesize()))
WriteGaugeUint64(w, "process_start_time_seconds", uint64(startTimeSeconds))
WriteGaugeUint64(w, "process_virtual_memory_bytes", uint64(p.Vsize))
writeProcessMemMetrics(w)
Expand Down

0 comments on commit 464c46d

Please sign in to comment.