Re: What is the command to access the temp sensors in a rpi4?

2021-01-18 Thread Stefan Monnier
> Its armhf Stefan, not wintel.

Shouldn't make any difference, except for the fact that a lot of
development in the ARM world is done in a kind of "cowboy" way: take
some version of the kernel and then hack at it until it does what they
want (with no regards for what will happen in the longer term, no
attention paid to making sure the changes can be folded back into the
official kernel, ...).

> lm_sensors is built for it, and its installled by buster but
> apparently the kernel abi is different.  sensors-detect does not
> detect it.

It works fine on systems using an Allwinner A20 SoC (and I suspect most
other Allwinner chipsets supported by the Linux kernel), so clearly it
can work on `armhf`.


Stefan



Re: What is the command to access the temp sensors in a rpi4?

2021-01-18 Thread Gene Heskett
On Monday 18 January 2021 14:47:03 0...@caiway.net wrote:

> On Sun, 17 Jan 2021 23:47:48 -0500
>
> Gene Heskett  wrote:
> > Greetings all;
> >
> > Cheers, Gene Heskett
>
> cpu=$( temperature: $((cpu/100)) Celsius"   | sed 's/\B[0-9]\{1\}\>/,&/'
>
> This oneliner works on pi3 and pi4
>
>
> I use this oneliner for some color:
> cpu=$( temperature: \e[31m  $((cpu/100)) Celsius \e[0m"   | sed
> 's/\B[0-9]\{1\}\>/,&/'
>
> Or in a script:
>
> #!/bin/bash
> cpu=$( echo -e "CPU temperatuur: \e[31m  $((cpu/100)) Celsius \e[0m" | sed 
> 's/\B[0-9]\{1\}\>/,&/'
> #eof
>
> hope this helps

it does, thanks.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 



Re: What is the command to access the temp sensors in a rpi4?

2021-01-18 Thread 0...@caiway.net
On Sun, 17 Jan 2021 23:47:48 -0500
Gene Heskett  wrote:

> Greetings all;

> Cheers, Gene Heskett

cpu=$(/,&/'

This oneliner works on pi3 and pi4


I use this oneliner for some color:
cpu=$(/,&/'

Or in a script:

#!/bin/bash
cpu=$(/,&/' 
#eof

hope this helps



Re: What is the command to access the temp sensors in a rpi4?

2021-01-18 Thread Gene Heskett
On Monday 18 January 2021 13:55:44 Eduardo M KALINOWSKI wrote:

> On 18/01/2021 15:35, Gene Heskett wrote:
> > On Monday 18 January 2021 12:15:00 Stefan Monnier wrote:
> >>> ISTR there is a "vcg*" sort of thing to read that stuff, but have
> >>> lost it in the fog of time.
> >>
> >> If the kernel is sane, then I think that the following command
> >> should give you this info:
> >>
> >>  sensors
> >
> > This kernel isn't "sane": 4.19.71-rt24-v7l+ #1 SMP PREEMPT RT
> >
> >> it comes from the `lm-sensors` package.
> >
> > Returns a null.
>
> In my RPI4, running stock Debian from https://raspi.debian.net/,
> sensors works:
>
> $ sensors
> cpu_thermal-virtual-0
> Adapter: Virtual device
> temp1:+43.8°C  (crit = +90.0°C)

After running sensors-detect, I get:

rpi_volt-isa-
Adapter: ISA adapter
in0:  N/A

So I assume that module wasn't built. I built that kernel.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 



Re: What is the command to access the temp sensors in a rpi4?

2021-01-18 Thread Miguel A. Vallejo
Do not forget for sensors to work you must first run sensors-detect

Greetings

El lun, 18 ene 2021 a las 20:11, Eduardo M KALINOWSKI
() escribió:
>
> On 18/01/2021 15:35, Gene Heskett wrote:
> > On Monday 18 January 2021 12:15:00 Stefan Monnier wrote:
> >
> >>> ISTR there is a "vcg*" sort of thing to read that stuff, but have
> >>> lost it in the fog of time.
> >>
> >> If the kernel is sane, then I think that the following command should
> >> give you this info:
> >>
> >>  sensors
> > This kernel isn't "sane": 4.19.71-rt24-v7l+ #1 SMP PREEMPT RT
> >
> >> it comes from the `lm-sensors` package.
> > Returns a null.
> >>
> >>
>
> In my RPI4, running stock Debian from https://raspi.debian.net/, sensors
> works:
>
> $ sensors
> cpu_thermal-virtual-0
> Adapter: Virtual device
> temp1:+43.8°C  (crit = +90.0°C)
>
>
>
> --
> Linux é user-friendly e não idiota friendly. Se você não entende isso,
> use o Windows!
>
> Eduardo M KALINOWSKI
> edua...@kalinowski.com.br
>



Re: What is the command to access the temp sensors in a rpi4?

2021-01-18 Thread Eduardo M KALINOWSKI

On 18/01/2021 15:35, Gene Heskett wrote:

On Monday 18 January 2021 12:15:00 Stefan Monnier wrote:


ISTR there is a "vcg*" sort of thing to read that stuff, but have
lost it in the fog of time.


If the kernel is sane, then I think that the following command should
give you this info:

 sensors

This kernel isn't "sane": 4.19.71-rt24-v7l+ #1 SMP PREEMPT RT


it comes from the `lm-sensors` package.

Returns a null.





In my RPI4, running stock Debian from https://raspi.debian.net/, sensors 
works:


$ sensors
cpu_thermal-virtual-0
Adapter: Virtual device
temp1:+43.8°C  (crit = +90.0°C)



--
Linux é user-friendly e não idiota friendly. Se você não entende isso, 
use o Windows!


Eduardo M KALINOWSKI
edua...@kalinowski.com.br



Re: What is the command to access the temp sensors in a rpi4?

2021-01-18 Thread Gene Heskett
On Monday 18 January 2021 13:39:36 Stefan Monnier wrote:

> >> > ISTR there is a "vcg*" sort of thing to read that stuff, but have
> >> > lost it in the fog of time.
> >>
> >> If the kernel is sane, then I think that the following command
> >> should give you this info:
> >> sensors
> >
> > This kernel isn't "sane": 4.19.71-rt24-v7l+ #1 SMP PREEMPT RT
>
> This doesn't say whether it's sane or not.  The question is whether
> the driver for the temp sensor is using the standard kernel
> infrastructure or whether it reinvented the wheel.
>
Its armhf Stefan, not wintel. lm_sensors is built for it, and its 
installled by buster but apparently the kernel abi is different.
sensors-detect does not detect it.

> Stefan


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 



Re: What is the command to access the temp sensors in a rpi4?

2021-01-18 Thread Stefan Monnier
>> > ISTR there is a "vcg*" sort of thing to read that stuff, but have
>> > lost it in the fog of time.
>> If the kernel is sane, then I think that the following command should
>> give you this info:
>> sensors
> This kernel isn't "sane": 4.19.71-rt24-v7l+ #1 SMP PREEMPT RT

This doesn't say whether it's sane or not.  The question is whether the
driver for the temp sensor is using the standard kernel infrastructure
or whether it reinvented the wheel.


Stefan



Re: What is the command to access the temp sensors in a rpi4?

2021-01-18 Thread Gene Heskett
On Monday 18 January 2021 12:15:00 Stefan Monnier wrote:

> > ISTR there is a "vcg*" sort of thing to read that stuff, but have
> > lost it in the fog of time.
>
> If the kernel is sane, then I think that the following command should
> give you this info:
>
> sensors
This kernel isn't "sane": 4.19.71-rt24-v7l+ #1 SMP PREEMPT RT

> it comes from the `lm-sensors` package.
Returns a null.
>
>
Thank you, Stefan


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 



Re: What is the command to access the temp sensors in a rpi4?

2021-01-18 Thread Stefan Monnier
> ISTR there is a "vcg*" sort of thing to read that stuff, but have lost it 
> in the fog of time.

If the kernel is sane, then I think that the following command should
give you this info:

sensors

it comes from the `lm-sensors` package.


Stefan



Re: What is the command to access the temp sensors in a rpi4?

2021-01-18 Thread Anssi Saari
Gene Heskett  writes:

> Greetings all;
>
> ISTR there is a "vcg*" sort of thing to read that stuff, but have lost it 
> in the fog of time.

vcgencmd measure_temp

Or has that changed? I don't have a Pi 4, just a 3B and 3B+.



Re: What is the command to access the temp sensors in a rpi4?

2021-01-18 Thread deloptes
Gene Heskett wrote:

>> vcgencmd get_throttled
> 0x0

means no trottle occured (see below)

>> https://www.raspberrypi.org/forums/viewtopic.php?t=190584
> 
> That "forum" is NOT a list. And I've changed browsers, losing all my
> passwds. So while I can read it, I can't post.
> 

I mean the raspberry pi forum hosted on comp.sys - sorry for misleading you

> And I am wondering where the man page for vcgencmd might be?
> 

from what I see it is not exactly documented

> Searching for that, I found a page that describes it, then found a blog
> by Jeff Geerling on make a pi4 boot from an ssd, which killed a good
> sized tree, but might get me going there.
> 
yes, the usual open source & free software stuff


https://www.8086.net/tools/decode-get_throttled?d=0x0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
| | | | | | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | | | | └ Under-voltage detected
| | | | | | | | | | | | | | | | | | └ Arm frequency capped
| | | | | | | | | | | | | | | | | └ Currently throttled
| | | | | | | | | | | | | | | | └ Soft temperature limit active
| | | | | | | | | | | | | | | └ 
| | | | | | | | | | | | | | └ 
| | | | | | | | | | | | | └ 
| | | | | | | | | | | | └ 
| | | | | | | | | | | └ 
| | | | | | | | | | └ 
| | | | | | | | | └ 
| | | | | | | | └ 
| | | | | | | └ 
| | | | | | └ 
| | | | | └ 
| | | | └ 
| | | └ Under-voltage has occurred
| | └ Arm frequency capped has occurred
| └ Throttling has occurred
└ Soft temperature limit has occurred



Re: What is the command to access the temp sensors in a rpi4?

2021-01-18 Thread Gene Heskett
On Monday 18 January 2021 03:11:56 deloptes wrote:

> Gene Heskett wrote:
> > ISTR there is a "vcg*" sort of thing to read that stuff, but have
> > lost it in the fog of time.
> >
> > Cheers, Gene Heskett
>
> Hi Gene,
> why not ask on the RPI list - I think you are subscribed there.
> Actually at the moment there is a discussion around this topic going
> on.
>
> vcgencmd get_throttled
0x0
> https://www.raspberrypi.org/forums/viewtopic.php?t=190584

That "forum" is NOT a list. And I've changed browsers, losing all my 
passwds. So while I can read it, I can't post.

And I am wondering where the man page for vcgencmd might be?

Searching for that, I found a page that describes it, then found a blog 
by Jeff Geerling on make a pi4 boot from an ssd, which killed a good 
sized tree, but might get me going there.

But first, back to bed, swearing at an electric blanket with a flaky 
stat. I'm having trouble with a perl module that amanda uses, and was up 
to see if the backup actually worked.  It did. Did I mention I hate 
trying to run down an intermittent that takes a notion to work, and 
spits out missleading errors when it doesn't? Gonna need a longer wall 
someday.

Thanks deloptes

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 



Re: What is the command to access the temp sensors in a rpi4?

2021-01-18 Thread deloptes
Gene Heskett wrote:

> ISTR there is a "vcg*" sort of thing to read that stuff, but have lost it
> in the fog of time.
> 
> Cheers, Gene Heskett

Hi Gene,
why not ask on the RPI list - I think you are subscribed there. Actually at
the moment there is a discussion around this topic going on.

vcgencmd get_throttled

https://www.raspberrypi.org/forums/viewtopic.php?t=190584





What is the command to access the temp sensors in a rpi4?

2021-01-17 Thread Gene Heskett
Greetings all;

ISTR there is a "vcg*" sort of thing to read that stuff, but have lost it 
in the fog of time.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page