Community
cancel
Showing results for 
Search instead for 
Did you mean: 
MClif
New Contributor I
1,744 Views

Edison: uptime

Hi,

My version of Edison is: 201606061707

I just rebooted Edison.

uptime shows

16:35pm up 6298 days 20:35, 1 user, load average: 0.50, 0.45, 0.24

Question: Any idea why it says it has been up 6298 days which is over 17 years?

Regards,

Bill

0 Kudos
9 Replies
idata
Community Manager
22 Views

Hello Bill,

 

 

Thank you for interest in the Intel® Edison Breakout Board.

 

 

That output is expected. It happens because you need to synchronize the time after rebooting the board (or after turning the board off https://communities.intel.com/thread/93761 https://communities.intel.com/thread/93761).

 

 

If you are interested in setting the correct time, please check the following thread (make sure you are not behind a proxy or firewall): https://communities.intel.com/thread/56294 https://communities.intel.com/thread/56294.

 

 

You can also check the correct running time using the following command:

 

systemctl status system-timesyncd –l

 

 

One of the outputs is:

 

Active: active (running) since Fri 2017-03-31 10:56:35 PDT; 35min ago

 

 

I hope you find the previous information useful.

 

 

Regards,

 

Andres V.
MClif
New Contributor I
22 Views

Hi Andres,

Short Story:

"systemctl status systemd-timesyncd" and date look ok but uptime is wrong and I don't knowingly exec rdate.

Long Story:

I forgot to state originally that after booting Edison, the date and time are correct. For example, for today:

# date

Sun Apr 2 13:47:40 EDT 2017

But uptime shows

# uptime

13:45pm up 6301 days 17:45, 1 user, load average: 1.03, 0.27, 0.09

6301 days ago was about 1/1/2000.

I read through the pages that you referenced.

I didn't do anything with this because my time is correct and therefore didn't think I needed a battery.

# systemctl status systemd-timesyncd

the "time ago" is ok.

● systemd-timesyncd.service - Network Time Synchronization

Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled)

Active: active (running) since Sun 2017-04-02 13:45:01 EDT; 33s ago

Docs: man:systemd-timesyncd.service(8)

Main PID: 165 (systemd-timesyn)

Status: "Idle."

CGroup: /system.slice/systemd-timesyncd.service

└─165 /lib/systemd/systemd-timesyncd

Dec 31 19:00:13 edison00 systemd[1]: Starting Network Time Synchronization...

Dec 31 19:00:14 edison00 systemd-timesyncd[165]: System clock time unset or ...T

Apr 02 13:45:01 edison00 systemd[1]: Started Network Time Synchronization.

Apr 02 13:45:05 edison00 systemd-timesyncd[165]: Network configuration chang....

Apr 02 13:45:06 edison00 systemd-timesyncd[165]: Network configuration chang....

Apr 02 13:45:07 edison00 systemd-timesyncd[165]: Network configuration chang....

Apr 02 13:45:10 edison00 systemd-timesyncd[165]: Network configuration chang....

Apr 02 13:45:10 edison00 systemd-timesyncd[165]: Network configuration chang....

Apr 02 13:45:12 edison00 systemd-timesyncd[165]: Network configuration chang....

Hint: Some lines were ellipsized, use -l to show in full.

# timedatectl status

The following looks ok except for the RTC which I think I don't care about.

Local time: Sun 2017-04-02 13:49:40 EDT

Universal time: Sun 2017-04-02 17:49:40 UTC

RTC time: Sun 2017-04-02 17:49:40

Time zone: America/New_York (EDT, -0400)

NTP enabled: yes

NTP synchronized: yes

RTC in local TZ: no

DST active: yes

Last DST change: DST began at

Sun 2017-03-12 01:59:59 EST

Sun 2017-03-12 03:00:00 EDT

Next DST change: DST ends (the clock jumps one hour backwards) at

Sun 2017-11-05 01:59:59 EDT

Sun 2017-11-05 01:00:00 EST

Question: given that "systemctl status systemd-timesyncd" and date look ok, any idea why uptime is wrong?

Thanks,

Bill

idata
Community Manager
22 Views

Hello Bill,

 

 

Thank you for sharing your experience with the suggestions provided.

 

 

I'll be needing more time to investigate the issue you are experiencing.

 

 

Could you please tell me the reason you are interested in knowing how long your system has been running?

 

 

As soon as I have relevant information I'll post it here.

 

 

Thank you for your patience.

 

 

Regards,

 

Andres V.
MClif
New Contributor I
22 Views

Hi Andres,

I was curious about how long the system has been running because I have an intermittent problem with Edison reboot for no apparent reason. That led me to uptime saying Edison had been up 6000+ days when I know it had rebooted sometime over night.

I vote that you make this discussion very low priority and take care of others who have real problems.

Thanks for the help,

Bill

idata
Community Manager
22 Views

Hello Bill,

I understand that your question is motivated by curiosity and is not related to a particular issue.

The previous statement doesn't mean that your case is less important to us than other community member's.

That been said, after doing some research in Linux communities and forums, I found very divergent answers, some users claim that the uptime can't be changed, others consider that it can be changed but shouldn't be done, while a few mentioned that it can be safely done (modifying the /var/run/wtmp file or the /var/run/utmp file), but I didn't find an explicit method that could help me corroborate that.

 

When a hardware clocks needs to be accessed in an application, users prefer referring to the information generated by hwclock (which can be easily calibrated http://www.thegeekstuff.com/2013/08/hwclock-examples/%3Futm_source%3Dtuicool http://www.thegeekstuff.com/2013/08/hwclock-examples/?utm_source=tuicool).

If you would like to keep searching for a definite answer, my suggestion is to visit Linux-oriented forums because the question doesn't seem much "Edison-related", perhaps get in touch with the Yocto community (https://www.yoctoproject.org/tools-resources/community https://www.yoctoproject.org/tools-resources/community).

Have a nice day.

Regards,

 

Andres V.
KMill10
Valued Contributor II
22 Views

The root cause of the strange 'uptime' values is that the Edison doesn't have an RTC, therefore it boots up in (what it thinks is) the year 2000, soon after tha the NTP daemon sets the time to the correct time, which results in a leap forward of 17 years

MClif
New Contributor I
22 Views

KMill10
Valued Contributor II
22 Views

Hi Bill

No the documentation is correct, what I meant was there's no RTC running when the power is off (unless, as you say, you connect the battery).

MClif
New Contributor I
22 Views

Hi SpiderKenny,

Thanks for the clarification.

For others stumbling upon this, the correct answer is in the above replies: # 5, # 6 and # 8.

Regards,

Bill