Commit 347854b2 authored by Muhammad Herdiansyah's avatar Muhammad Herdiansyah

CPU [NetBSD]: Added temp support

parent c3c64049
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
**CPU** **CPU**
- [Linux] Fixed inaccurate output on ARM SoC devices. - [Linux] Fixed inaccurate output on ARM SoC devices.
- [NetBSD] Added support for CPU temperature. (NOTE: This only supports newer Intel processors)
**Terminal** **Terminal**
......
...@@ -934,7 +934,7 @@ get_cpu() { ...@@ -934,7 +934,7 @@ get_cpu() {
# Get CPU temp. # Get CPU temp.
if [[ "$cpu_temp" != "off" ]]; then if [[ "$cpu_temp" != "off" ]]; then
case "$kernel_name" in case "$kernel_name" in
"FreeBSD"* | "DragonFly"*) "FreeBSD"* | "DragonFly"* | "NetBSD"*)
temp="$(sysctl -n dev.cpu.0.temperature)" temp="$(sysctl -n dev.cpu.0.temperature)"
temp="${temp/C}" temp="${temp/C}"
;; ;;
...@@ -3968,7 +3968,7 @@ INFO: ...@@ -3968,7 +3968,7 @@ INFO:
NOTE: This only works on Linux and BSD. NOTE: This only works on Linux and BSD.
NOTE: For FreeBSD-based systems, you need to enable coretemp kernel module. NOTE: For FreeBSD and NetBSD-based systems, you need to enable coretemp kernel module. This only supports newer Intel processors.
--distro_shorthand on/off Shorten the output of distro (tiny, on, off) --distro_shorthand on/off Shorten the output of distro (tiny, on, off)
......
...@@ -51,7 +51,7 @@ Hide/Show cpu temperature. ...@@ -51,7 +51,7 @@ Hide/Show cpu temperature.
.IP .IP
NOTE: This only works on Linux and BSD. NOTE: This only works on Linux and BSD.
.IP .IP
NOTE: For FreeBSD\-based systems, you need to enable coretemp kernel module. NOTE: For FreeBSD and NetBSD\-based systems, you need to enable coretemp kernel module. This only supports newer Intel processors.
.TP .TP
\fB\-\-distro_shorthand\fR on/off \fB\-\-distro_shorthand\fR on/off
Shorten the output of distro (tiny, on, off) Shorten the output of distro (tiny, on, off)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment