sensorsd strange tokens values

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

sensorsd strange tokens values

Federico Giannici
I'm using for the first time sensorsd to monitor RAID controller status
and motherboard temperature. A script of mine is called that sends me an
email. System is OpenBSD 4.4 amd64.

The problem is the value of the %2 %3 and %4 tokens passed as arguments
to the command. I thought that they should be (in the same order):
current temperature, low limit and high limit as set in the
sensorsd.conf file.

Indeed here are the values I get:

%2: 46.00
%3: degC
%4: 9223372036581.62

The command I use is "command=/path/scriptname %x %n %l %2 %3 %4".

Is there some bug or I'm missing something?


Thanks.

--
___________________________________________________
     __
    |-                      [hidden email]
    |ederico Giannici      http://www.neomedia.it
___________________________________________________

Reply | Threaded
Open this post in threaded view
|

Re: sensorsd strange tokens values

Constantine A. Murenin
On 27/07/2009, Federico Giannici <[hidden email]> wrote:

> I'm using for the first time sensorsd to monitor RAID controller status and
> motherboard temperature. A script of mine is called that sends me an email.
> System is OpenBSD 4.4 amd64.
>
>  The problem is the value of the %2 %3 and %4 tokens passed as arguments to
> the command. I thought that they should be (in the same order): current
> temperature, low limit and high limit as set in the sensorsd.conf file.
>
>  Indeed here are the values I get:
>
>  %2: 46.00
>  %3: degC
>  %4: 9223372036581.62
>
>  The command I use is "command=/path/scriptname %x %n %l %2 %3 %4".
>
>  Is there some bug or I'm missing something?

%2 can never return "46.00" alone, what it must be returning is "46.00
degC".  Same goes for the rest of the tokens.

So perhaps the invocation of the script has to have some quotes around these.

C.

Reply | Threaded
Open this post in threaded view
|

Re: sensorsd strange tokens values

Federico Giannici
Constantine A. Murenin wrote:

> On 27/07/2009, Federico Giannici <[hidden email]> wrote:
>> I'm using for the first time sensorsd to monitor RAID controller status and
>> motherboard temperature. A script of mine is called that sends me an email.
>> System is OpenBSD 4.4 amd64.
>>
>>  The problem is the value of the %2 %3 and %4 tokens passed as arguments to
>> the command. I thought that they should be (in the same order): current
>> temperature, low limit and high limit as set in the sensorsd.conf file.
>>
>>  Indeed here are the values I get:
>>
>>  %2: 46.00
>>  %3: degC
>>  %4: 9223372036581.62
>>
>>  The command I use is "command=/path/scriptname %x %n %l %2 %3 %4".
>>
>>  Is there some bug or I'm missing something?
>
> %2 can never return "46.00" alone, what it must be returning is "46.00
> degC".  Same goes for the rest of the tokens.
>
> So perhaps the invocation of the script has to have some quotes around these.

You got it!!!

Thank you.


P.S.
Maybe the example in the man page could use the quotes so no other idiot
like me spend time looking for whats wrong....  :-)


--
___________________________________________________
     __
    |-                      [hidden email]
    |ederico Giannici      http://www.neomedia.it
___________________________________________________