On 2011-01-26 19:05, Jeff Ross wrote:
On 01/26/11 10:44, Leslie Jensen wrote:
Abel Abraham Camarillo Ojeda skrev 2011-01-26 16:39:
On Wed, Jan 26, 2011 at 3:56 AM, Leslie Jensen<les...@eskk.nu> wrote:
Hello list.

I'm quite new to Openbsd, have used Freebsd for a while.

I have a newly installed Openbsd system.
OpenBSD machine01.no-ip.org 4.8 GENERIC.MP#335 amd64

Upon installation of noip I ran the command noip2 -C to configure it.

I want noip to run a script every 30 minutes that sends a mail to me
at the
end of the updating of the address.

So I choose the settings accordingly when configuring noip.

I've put the following in my /etc/rc.local

------------------------------------------
# Add your local startup actions here.

/usr/local/sbin/noip2&

echo '.'
------------------------------------------

When the machine is booted I get the mail, but I do not get the updates
every 30 minutes as I should.

I cannot see if the the daemon starts because the line at the startup
screen
shows only "starting local daemons:,"

The command:
# ps -aux | grep noip

Gives

_noip B B 6013 B 0.0 B 0.2 B 428 B 916 ?? B Is B B 10:04AM B
B 0:00.01
/usr/local/sb

Top shows the process
6013 _noip B B B 2 B B 0 B 428K B 916K idle B B B select B B 0:00
B 0.00% noip2

If I kill that process and start noip2 from the command line it also
sends
the mail at start up but not after the following 30 minutes.

I'm not sure whether noip is running every 30 minutes I've been tailing
/var/log/messages and I cannot see anything related to noip there.

Can anyone on this list point me in the right direction?

Thanks

/Leslie



cron(8), maybe?

It is supposed to work as a daemon with no need for cron!
/L


!DSPAM:4d405e91283431811913398!


ktrace the process.

man ktrace and pay attention to how to stop the ktrace process

and

man kdump to see how to read the output.

Hope that helps!

Jeff

I tried ktrace and I could see that things happened with the update interval on noip2 set to 2 minutes.

Unfortunately I'm no master at interpreting the output ;-)

Here's an output from ktrace:

------------------------------
# kdump
 11273 noip2    EMUL  "native"
 11273 noip2    RET   select 0
 11273 noip2    CALL  gettimeofday(0x7f7ffffc1960,0)
 11273 noip2    RET   gettimeofday 0
 11273 noip2    CALL  gettimeofday(0x7f7ffffc1960,0)
 11273 noip2    RET   gettimeofday 0
 11273 noip2    CALL  stat(0x20fbe0076,0x7f7ffffc1a00)
 11273 noip2    NAMI  "/etc/resolv.conf"
 11273 noip2    RET   stat 0
 11273 noip2    CALL  gettimeofday(0x7f7ffffc1910,0)
 11273 noip2    RET   gettimeofday 0
 11273 noip2    CALL  open(0x20fbdd713,0,0x1b6)
 11273 noip2    NAMI  "/etc/hosts"
 11273 noip2    RET   open 1
 11273 noip2    CALL  fstat(0x1,0x7f7ffffc1d50)
 11273 noip2    RET   fstat 0
 11273 noip2    CALL  mprotect(0x205729000,0x1000,0x3)
 11273 noip2    RET   mprotect 0
 11273 noip2    CALL  mprotect(0x205729000,0x1000,0x1)
 11273 noip2    RET   mprotect 0
 11273 noip2    CALL  read(0x1,0x208422000,0x4000)
 11273 noip2    GIO   fd 1 read 310 bytes
       "#       $OpenBSD: hosts,v 1.12 2009/03/10 00:42:13 deraadt Exp $
        #
        # Host Database
        #
        # RFC 1918 specifies that these networks are "internal".
        # 10.0.0.0      10.255.255.255
        # 172.16.0.0    172.31.255.255
        # 192.168.0.0   192.168.255.255
        #
        127.0.0.1       localhost
        ::1             localhost
        172.18.0.1      machine01.no-ip.org machine01
       "
 11273 noip2    RET   read 310/0x136
 11273 noip2    CALL  read(0x1,0x208422000,0x4000)
 11273 noip2    RET   read 0
 11273 noip2    CALL  close(0x1)
 11273 noip2    RET   close 0
 11273 noip2    CALL  gettimeofday(0x7f7ffffc18c0,0)
 11273 noip2    RET   gettimeofday 0
 11273 noip2    CALL  gettimeofday(0x7f7ffffc1050,0)
 11273 noip2    RET   gettimeofday 0
 11273 noip2    CALL  gettimeofday(0x7f7ffffc0bd0,0)
 11273 noip2    RET   gettimeofday 0
 11273 noip2    CALL  gettimeofday(0x7f7ffffc0ac0,0)
 11273 noip2    RET   gettimeofday 0
 11273 noip2    CALL  gettimeofday(0x7f7ffffc1090,0)
 11273 noip2    RET   gettimeofday 0
 11273 noip2    CALL  getpid()
 11273 noip2    RET   getpid 11273/0x2c09
 11273 noip2    CALL  getpid()
 11273 noip2    RET   getpid 11273/0x2c09
 11273 noip2    CALL  getpid()
 11273 noip2    RET   getpid 11273/0x2c09
 11273 noip2    CALL  getpid()
 11273 noip2    RET   getpid 11273/0x2c09
 11273 noip2    CALL  getpid()
 11273 noip2    RET   getpid 11273/0x2c09
 11273 noip2    CALL  gettimeofday(0x7f7ffffc1080,0)
 11273 noip2    RET   gettimeofday 0
 11273 noip2    CALL  gettimeofday(0x7f7ffffc08b0,0)
 11273 noip2    RET   gettimeofday 0
 11273 noip2    CALL  socket(0x2,0x2,0)
 11273 noip2    RET   socket 1
 11273 noip2    CALL  connect(0x1,0x20ff1c918,0x10)
 11273 noip2    RET   connect 0
 11273 noip2    CALL  sendto(0x1,0x7f7ffffc11f0,0x25,0,0,0)
 11273 noip2    GIO   fd 1 wrote 37 bytes
"\M^N\M^B\^A\0\0\^A\0\0\0\0\0\0 dynupdate\^Eno-ip\^Ccom\0\0\^A\0\^A"
 11273 noip2    RET   sendto 37/0x25
 11273 noip2    CALL  poll(0x7f7ffffc0f30,0x1,0x1388)
 11273 noip2    RET   poll 1
11273 noip2 CALL recvfrom(0x1,0x20b070000,0x10000,0,0x7f7ffffc0f60,0x7f7ffffc0f58)
 11273 noip2    GIO   fd 1 read 223 bytes
"\M^N\M^B\M^A\M^@\0\^A\0\^A\0\^E\0\^E dynupdate\^Eno-ip\^Ccom\0\0\^A\

\0\^A\M-@\f\0\^A\0\^A\0\0\^E\M^_\0\^D\M-L\^P\M-|O\M-@\^V\0\^B\0\^A\0\

\^A\^XT\0\^F\^Cns2\M-@\^V\M-@\^V\0\^B\0\^A\0\^A\^XT\0\^F\^Cns3\M-@\^V\

\M-@\^V\0\^B\0\^A\0\^A\^XT\0\^F\^Cns4\M-@\^V\M-@\^V\0\^B\0\^A\0\^A\^XT\

\0\^F\^Cns5\M-@\^V\M-@\^V\0\^B\0\^A\0\^A\^XT\0\^F\^Cns1\M-@\^V\M-@\M^I\

\0\^A\0\^A\0\0P\M^Y\0\^D\M-L\^P\M^?7\M-@A\0\^A\0\^A\0\0P\M^Y\0\^D\M-L\

\^P\M-~\^F\M-@S\0\^A\0\^A\0\0\M-,\^D\0\^D\M-L\^P\M-}!\M-@e\0\^A\0\^A\0\
        \^A3?\0\^DKf<.\M-@w\0\^A\0\^A\0\^AC\M-H\0\^DKf;R"
 11273 noip2    RET   recvfrom 223/0xdf
 11273 noip2    CALL  close(0x1)
 11273 noip2    RET   close 0
 11273 noip2    CALL  socket(0x2,0x1,0)
 11273 noip2    RET   socket 1
 11273 noip2    CALL  setitimer(0,0x7f7ffffc1f40,0x7f7ffffc1f20)
 11273 noip2    RET   setitimer 0
 11273 noip2    CALL  connect(0x1,0x7f7ffffc1fa0,0x10)
 11273 noip2    RET   connect 0
 11273 noip2    CALL  setitimer(0,0x7f7ffffc1f40,0x7f7ffffc1f20)
 11273 noip2    RET   setitimer 0
 11273 noip2    CALL  setitimer(0,0x7f7ffffc1f20,0x7f7ffffc1f00)
 11273 noip2    RET   setitimer 0
 11273 noip2    CALL  write(0x1,0x80c6c0,0x4d)
 11273 noip2    GIO   fd 1 wrote 77 bytes
       "GET http://ip1.dynupdate.no-ip.com/ HTTP/1.0\r
        User-Agent: Linux-DUC/2.1.9\r
        \r
       "
 11273 noip2    RET   write 77/0x4d
 11273 noip2    CALL  setitimer(0,0x7f7ffffc1f20,0x7f7ffffc1f00)
 11273 noip2    RET   setitimer 0
 11273 noip2    CALL  setitimer(0,0x7f7ffffc1f20,0x7f7ffffc1f00)
 11273 noip2    RET   setitimer 0
 11273 noip2    CALL  read(0x1,0x80c6c0,0x3ffe)
 11273 noip2    GIO   fd 1 read 167 bytes
       "HTTP/1.1 200 OK\r
        Date: Mon, 31 Jan 2011 13:25:27 GMT\r
        Server: Apache/2\r
        Content-Length: 14\r
        Connection: close\r
        Content-Type: text/html; charset=UTF-8\r
        \r
        "I.have.removed.the.ip.address"
 11273 noip2    RET   read 167/0xa7
 11273 noip2    CALL  setitimer(0,0x7f7ffffc1f20,0x7f7ffffc1f00)
 11273 noip2    RET   setitimer 0
 11273 noip2    CALL  setitimer(0,0x7f7ffffc1f20,0x7f7ffffc1f00)
 11273 noip2    RET   setitimer 0
 11273 noip2    CALL  read(0x1,0x80c767,0x3f57)
 11273 noip2    RET   read 0
 11273 noip2    CALL  setitimer(0,0x7f7ffffc1f20,0x7f7ffffc1f00)
 11273 noip2    RET   setitimer 0
 11273 noip2    CALL  close(0x1)
 11273 noip2    RET   close 0
 11273 noip2    CALL  select(0x1,0,0,0,0x7f7ffffc1fe0)
#

------------------------------

Reply via email to