Newbie's problems understanding how Cron works

Re: Newbie's problems understanding how Cron works

Postby Fuddyduddy » Wed Sep 17, 2014 12:59 pm

Thanks Jocko.

I'm afraid I failed to spot that warning. I will now follow your instructions.
Fuddyduddy
Donator VIP
Donator VIP
 
Posts: 162
Joined: Thu Mar 14, 2013 9:00 am
Location: Åland Islands

Re: Newbie's problems understanding how Cron works

Postby Fuddyduddy » Tue Sep 23, 2014 12:47 pm

Hi Jocko

(Gave myself a few days off ;) )

I followed the procedure, after checking showed no offset.

But it hasn't worked. Checking still shows no offset (I tried twice!)
Code: Select all
root@(none):/ # date;hwclock; php -r 'echo date("r")."\n";'
Tue Sep 23 13:30:52 UTC 2014
Tue Sep 23 13:30:52 2014  0.000000 seconds
-sh: php: not found
Here's a screenshot of 'Setup'. As you'll see it sets the time for Helsinki to one hour earlier than it should be.

Any suggestions?
You do not have the required permissions to view the files attached to this post.
Fuddyduddy
Donator VIP
Donator VIP
 
Posts: 162
Joined: Thu Mar 14, 2013 9:00 am
Location: Åland Islands

Re: Newbie's problems understanding how Cron works

Postby Jocko » Tue Sep 23, 2014 4:53 pm

Hi Fuddyduddy,

your post is very amazing.

1/ There is no reason that the php command fails because the path /usr/bin should be set in the PATH variable
Code: Select all
 echo $PATH
/usr/bin:/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:/opt/sbin:/opt/usr/bin:/opt/usr/sbin:/opt/lib
:scratch

but you can get around this difficulty by using the command
Code: Select all
date;hwclock;/usr/bin/php -r 'echo date("r")."\n";'

2/ at least the 2 posted lines show that the localtime has no offset (UTC) :scratch Do you sure that you have submitted your change after selecting your timezone (you must click twice on 'accept' buttons : one to close the select window and 2d to submit.
Please could you post the outputs of
Code: Select all
ls -l /etc/localtime
ls  /usr/share/zoneinfo/Europe/H*

You should get
Code: Select all
root@Acrab:/ # date;hwclock; php -r 'echo date("r")."\n";'
Tue Sep 23 19:50:54 EEST 2014
Tue Sep 23 16:50:54 2014  0.000000 seconds
Tue, 23 Sep 2014 19:50:54 +0300
root@Acrab:/ # ls /etc/localtime -l
lrwxrwxrwx  1 root root 35 2014-09-23 19:50 /etc/localtime -> /usr/share/zoneinfo/Europe/Helsinki
root@Acrab:/ # ls  /usr/share/zoneinfo/Europe/H*
/usr/share/zoneinfo/Europe/Helsinki
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Newbie's problems understanding how Cron works

Postby Fuddyduddy » Wed Sep 24, 2014 7:57 am

Jocko wrote:Please could you post the outputs of
Code: Select all
ls -l /etc/localtime
ls  /usr/share/zoneinfo/Europe/H*
Hi Jocko

I get
Code: Select all
root@(none):/ # ls -l /etc/localtime
ls: /etc/localtime: No such file or directory
and
Code: Select all
root@(none):/ # ls  /usr/share/zoneinfo/Europe/H*
ls: /usr/share/zoneinfo/Europe/H*: No such file or directory
Fuddyduddy
Donator VIP
Donator VIP
 
Posts: 162
Joined: Thu Mar 14, 2013 9:00 am
Location: Åland Islands

Re: Newbie's problems understanding how Cron works

Postby Jocko » Wed Sep 24, 2014 8:04 am

Hi fuddyduddy,

With your last output, it seems that your file system is corrupted (same thing with the PATH issue). I don't understand how this could happen. :scratch (but in this case you are lucky that you can get access to the NAS after booting.)

So you need to install again version 15.3 and of course after doing it, set your timezone.
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Newbie's problems understanding how Cron works

Postby Fuddyduddy » Wed Sep 24, 2014 9:30 am

Jocko

I've just reinstalled ver. 15.3. Going to 'Setup' I found timezone still showing Helsinki (which I thought odd, but maybe not...?), and still showing the time wrong (ie fast). I cancelled it and set it to UTC, so as to have a clean baseline for re-setting it to Helsinki. Each time I clicked on 'Accept' in both places.

The time it's showing as UTC is wrong!!! When UTC is 09.28 fvdwsl shows the time as 10.23

I don't know what's going on. Do you?
Fuddyduddy
Donator VIP
Donator VIP
 
Posts: 162
Joined: Thu Mar 14, 2013 9:00 am
Location: Åland Islands

Re: Newbie's problems understanding how Cron works

Postby Jocko » Wed Sep 24, 2014 10:52 am

Ok, but :scratch

Close all putty window (to reset the shell variable environment)
and post again the outputs of
Code: Select all
echo $PATH
date;hwclock;/usr/bin/php -r 'echo date("r")."\n";'
ls -l /etc/localtime
ls  /usr/share/zoneinfo/Europe/H*
To understand the real status of your NAS
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Newbie's problems understanding how Cron works

Postby Fuddyduddy » Wed Sep 24, 2014 12:02 pm

Code: Select all
login as: root
root@192.168.11.5's password:
root@fvdwsl-base:/ # echo $PATH
/usr/bin:/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/op/opt/usr/bin:/opt/usr/sbin:/opt/lib
root@fvdwsl-base:/ # date;hwclock;/usr/bin/php -r 'echo date("r"
Wed Sep 24 12:52:56 UTC 2014
Wed Sep 24 12:52:55 2014  0.000000 seconds
Wed, 24 Sep 2014 12:52:56 +0000
root@fvdwsl-base:/ # ls -l /etc/localtime
lrwxrwxrwx  1 root root 23 2014-09-24 10:14 /etc/localtime -> /uo/UTC
root@fvdwsl-base:/ # ls  /usr/share/zoneinfo/Europe/H*
/usr/share/zoneinfo/Europe/Helsinki
root@fvdwsl-base:/ #
Jocko

This was timed at (approx) 1453. So UDT ought to have been returned as 1153 (approx). Instead it's 12.53 (approx)
Fuddyduddy
Donator VIP
Donator VIP
 
Posts: 162
Joined: Thu Mar 14, 2013 9:00 am
Location: Åland Islands

Re: Newbie's problems understanding how Cron works

Postby Jocko » Wed Sep 24, 2014 1:02 pm

Thank,

I understand better.

This output is wrong
Code: Select all
root@fvdwsl-base:/ # ls -l /etc/localtime
lrwxrwxrwx  1 root root 23 2014-09-24 10:14 /etc/localtime -> /uo/UTC
but I don't understand how you got this symlink :crazy.
if you select UTC as timezone you should get this output
Code: Select all
root@Acrab:/ #  ls -l /etc/localtime
lrwxrwxrwx  1 root root 23 2014-09-24 12:53 /etc/localtime -> /usr/share/zoneinfo/UTC


You need to set rightly this symlink.
So in the setup menu, do :
- open the select timezone window
- click on the delete button (this should close the window)
- open again the select timezone window
- browse into the window to select helsinki timezone
- click on "accept" button (this should close the window)
- click on the main "accept" button to submit your change

Now check if the symlink is ok (post the output) and do again
Code: Select all
date;hwclock;/usr/bin/php -r 'echo date("r")."\n";'
to check if all times are rightly set.
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Newbie's problems understanding how Cron works

Postby Fuddyduddy » Wed Sep 24, 2014 1:25 pm

Code: Select all
login as: root
root@192.168.11.5's password:
root@fvdwsl-base:/ # date;hwclock;/usr/bin/php -r 'echo date("r")."\n";'
Wed Sep 24 17:19:24 EEST 2014
Wed Sep 24 14:19:23 2014  0.000000 seconds
Wed, 24 Sep 2014 17:19:24 +0300
root@fvdwsl-base:/ #
That looks right.

Do you agree?
Fuddyduddy
Donator VIP
Donator VIP
 
Posts: 162
Joined: Thu Mar 14, 2013 9:00 am
Location: Åland Islands

PreviousNext

Return to Lacie Network Space vs2 and max version

Who is online

Users browsing this forum: No registered users and 7 guests