ipmitool dcmi power reading
v1.0.0
เพราะคุณกำลังถามตัวเองว่า "ฉันจะได้รับหมายเลขการใช้พลังงานของฉัน" ได้อย่างไร?
ลิงค์อินเทอร์เน็ต:
ดังนั้นคุณดูเหมือนจะมีสองตัวเลือก:
ฉันใช้วิธี RACADM มานานหลายปีและฉันพบว่ามันช้าและบางครั้งมันไม่ทำงานเพราะเซสชัน IDRAC เปิดอยู่ จากนั้นฉันก็ใช้ ipmitool และมันก็ทำได้ดี แต่มีเอาต์พุตข้อความที่ฉันต้องแยกวิเคราะห์
ดังนั้นฉันจึงเขียนเครื่องมือเดียวกันกับเอาต์พุตข้อความเดียวกันและใช้งานได้ รหัส C ดั้งเดิมสามารถพบได้ที่นี่: ipmitool 1.8.19
ขอขอบคุณเป็นพิเศษสำหรับ Library IPMI-RS ที่ทำให้สิ่งนี้เป็นไปได้
A tool to fetch the power reading with ipmi dcmi
Usage: ipmitool-dcmi-power-reading [OPTIONS]
Options:
-c, --connection-uri <CONNECTION_URI>
The connection URI to use [default: file:///dev/ipmi0]
--timeout-ms <TIMEOUT_MS>
How many milliseconds to wait before timing out while waiting for a response [default: 2000]
--format <FORMAT>
The format to output [default: text] [possible values: text, json]
-h, --help
Print help
-V, --version
Print version
Instantaneous power reading : 212 Watts
Minimum during sampling period : 2 Watts
Maximum during sampling period : 468 Watts
Average power reading over sample period : 184 Watts
IPMI timestamp : 2024-05-05 14:17:17 UTC
Sampling period : 1000 Milliseconds
Power reading state is : activated
{ "grp_id" : 220 , "curr_pwr" : 209 , "min_sample" : 2 , "max_sample" : 468 , "avg_pwr" : 184 , "time_stamp" : 1714918638 , "sample" : 1000 , "state" : 64 }