DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 25th November 2011
mehaj mehaj is offline
Port Guard
 
Join Date: Feb 2010
Posts: 17
Thanked 0 Times in 0 Posts
Default sensorsd configuration

hi,
I’m trying to configure sensorsd deamon to execute sms alert.
To test the deamon I began by executing simple commande, like “shutdown” or writing in file.

Code:
# Chipset temperature (degrees Celsius)
hw.sensors.nsclpcsio0.temp0:high=4C:command= shutdown -r now
Code:
# Chipset temperature (degrees Celsius)
hw.sensors.nsclpcsio0.temp0:high=4C:command= echo "this is my alert" > "hello"
These commande are executed but not in real time ,not automatically ,it takes several secondes.
It is normal ?

For sms alert , I call the command as following , but nothing happens , however my perl script is working fine.
Code:
Chipset temperature (degrees Celsius)
hw.sensors.nsclpcsio0.temp0:high=4C:command= perl root/msg.pl
Reply With Quote
  #2   (View Single Post)  
Old 25th November 2011
J65nko J65nko is online now
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,259
Thanked 182 Times in 149 Posts
Default

Re: perl script

Probably you need to specify the complete path for both perl and the script.
Code:
hw.sensors.nsclpcsio0.temp0:high=4C:command= /usr/bin/perl /root/msg.pl
You can see which environment variables, like PATH, are visible to sensorsd by using:
Code:
hw.sensors.nsclpcsio0.temp0:high=4C:command= /usr/bin/env >variables.env.txt
and check the contents of the file.

The man pages of sensorsd and sensorsd.conf describe why there may be delays, for example the CAVEATS section of sensorsd(8)
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #3   (View Single Post)  
Old 25th November 2011
mehaj mehaj is offline
Port Guard
 
Join Date: Feb 2010
Posts: 17
Thanked 0 Times in 0 Posts
Default

I wonder if we can decrease this delay !!

About the command,i've specified the complete path for both perl and the script without succes but
in the log file i find the following line :
Code:
Sun Dec  4 13:28:52 2011	/root/msg.pl	err	*FAILED* connect on /dev/cuaU0
the PAth in variables.env.txt :
Code:
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin

Last edited by mehaj; 25th November 2011 at 12:46 PM.
Reply With Quote
  #4   (View Single Post)  
Old 25th November 2011
J65nko J65nko is online now
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,259
Thanked 182 Times in 149 Posts
Default

You should have a /dev/cuaU0 which is a USB dial out device. Have you entered a definition for this device in /etc/remote?

Code:
# Sample dial out lines.
#   
cua00|For hp300,i386,mac68k,macppc,mvmeppc,vax:\
        :dv=/dev/cua00:tc=dialup:tc=unixhost:
cuaa|For sparc,mvme68k:\
        :dv=/dev/cuaa:tc=dialup:tc=unixhost:

# USB version for i386
cuaU0|For hp300,i386,mac68k,macppc,mvmeppc,vax:\
        :dv=/dev/cuaU0:tc=dialup:tc=unixhost:
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #5   (View Single Post)  
Old 28th November 2011
mehaj mehaj is offline
Port Guard
 
Join Date: Feb 2010
Posts: 17
Thanked 0 Times in 0 Posts
Default

Hi J65nko,
i've added the definition of cuaU0 in /etc/remote but the perl script still not working.I've tried to call another script perl wich just display a message but nothing.
Thank you for your help
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with PF NAT configuration scrummie02 OpenBSD Security 12 10th November 2011 04:45 AM
PF NAT configuration help ikevinjpdev OpenBSD Security 0 7th August 2010 04:41 PM
PF Configuration for newbie slakic OpenBSD Security 1 20th August 2009 02:35 PM
ssh and PuTTY Configuration rtwingfield FreeBSD Security 4 8th June 2009 09:55 PM
k3b, configuration. maxrussell FreeBSD Ports and Packages 4 3rd March 2009 04:23 AM


All times are GMT. The time now is 01:32 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick