Class: IStats::Cpu
Class Method Summary collapse
-
.all ⇒ Object
Call all functions (stats).
-
.cpu_temperature ⇒ Object
Print CPU temperature with sparkline.
-
.delegate(stat) ⇒ Object
Delegate CLI command to function.
Methods included from CPU_STATS
Class Method Details
.all ⇒ Object
Call all functions (stats)
24 25 26 |
# File 'lib/iStats/cpu.rb', line 24 def all cpu_temperature end |
.cpu_temperature ⇒ Object
Print CPU temperature with sparkline
30 31 32 33 34 |
# File 'lib/iStats/cpu.rb', line 30 def cpu_temperature t = get_cpu_temp thresholds = [50, 68, 80, 90] puts "CPU temp: #{t}#{Symbols.degree}C " + Printer.gen_sparkline(t, thresholds) end |