Darwin diskstats reports operation counts divided by block size as sectors
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- go, prometheus
調査の方向性
collector/diskstats_darwin.go の issue でリンクされている2つの式から始め、このファイルにある既存のバイトカウンターのエクスポートと比較してください。issue では、Darwin のセクターメトリクスファミリーを両方削除し、利用側をバイトカウンターに誘導することを提案しています。これらのファミリーに関するプロジェクトのメトリクステストまたは参照を確認してください。誤ったセクターカウンターが削除され、影響を受けるチェックが通れば完了です。利用側は単位の変更を考慮する必要があります。
索引モデルが issue の本文から書いたものです。
説明
The Darwin collector exports node_disk_read_sectors_total and node_disk_written_sectors_total using these expressions in v1.12.1, still present on master at 638ec72c:
float64(stat.NumRead) / float64(stat.BlockSize)
float64(stat.NumWrite) / float64(stat.BlockSize)
iostat.DriveStats defines NumRead and NumWrite as operation counts and BlockSize as bytes. Its Darwin bridge maps these separately from BytesRead and BytesWritten; the IOKit reader reads operation counts, byte counts, and preferred block size from their respective keys. The exported values therefore have units of operations divided by bytes, rather than sectors. The same collector already exports node_disk_read_bytes_total from BytesRead and node_disk_written_bytes_total from BytesWritten (source).
Reproduce the current arithmetic with Python 3:
cases = [("read", 3, 16384, 4096), ("write", 1000, 8192000, 4096)]
for name, operations, byte_count, block_size in cases:
print(f"{name}: actual={operations / block_size:.12g}, sectors_if_512_bytes={byte_count / 512:g}")
read: actual=0.000732421875, sectors_if_512_bytes=32
write: actual=0.244140625, sectors_if_512_bytes=16000
The 512-byte sector value is a comparison convention, not a macOS API contract. Validation: arithmetic reproduction only; native macOS collector tests were not run.
I propose removing the two Darwin sector families and directing consumers to the existing byte counters, following Linux PR #787. Queries, rules, and panels must change their units and thresholds because the byte counters are not numeric replacements for the sector values.
- 主要言語
- Go
- スター
- 13.9k
- フォーク
- 2.7k
- 平均マージ
- 2日 10時間
- マージ済み PR(30日)
- 14
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
prometheus/node_exporter のほかの issue
-
node-mixin: Adjust `memory used` Dashboard to use `MemAvailable`再び着手できるかも @ojasks が 25 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
prometheus/node_exporter#3830 · コメント 3 件 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
prometheus/node_exporter#3823 ·
メンテナーはふだん 2 日以内に返信
-
Fibre Channel collector panics when sysfs statistics counters are missing対応中かも @itjustnathan が 43 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
prometheus/node_exporter#3817 ·
メンテナーはふだん 2 日以内に返信
-
ZFS collector misparses dataset values that occur in the kstat field prefix対応中かも @vigneshakaviki が 84 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
prometheus/node_exporter#3761 ·
メンテナーはふだん 2 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
prometheus/node_exporter#1767 ·
メンテナーはふだん 2 日以内に返信
prometheus/node_exporter の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
JakeChampion/lang#13132 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] deploy.restart_policy without condition drops the restart policy対応中かも @akshat-lakhera が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
docker/compose#14383 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
Azure/azure-storage-fuse#2429 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
AvengeMedia/dank-greeter#39 · コメント 1 件 ·
-
bug: dataplane client ignores SERVER_BASEPATH, so create/delete topic miss the subpath対応中かも @bhataprameya が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
redpanda-data/console#2693 ·
メンテナーはふだん 2 日以内に返信