VxWorks RTC time giving wrong value at random times


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers VxWorks RTC time giving wrong value at random times
# 1  
Old 01-30-2015
VxWorks RTC time giving wrong value at random times

I am seeing a scenario where in if the TIMEZONE environment variable value is set to nothing i.e. putenv "TIMEZONE=" the hardware clock is +1 to software clock.Pasted below the results displayed:

Code:
-> envShow 
(global environment) 
0: TSC_TIME_FROM_RESET=420150.971529 seconds 
1: RTAC_OS_LABEL=RTAC9_VXOS2.0.2 
2: RTAC_OS_VERSION=Wind River Systems - vxWorks 6.8.3 
3: RTAC_OS_DATE=May  6 2014, 17:00:30 
4: BIOS_VENDOR=American Megatrends Inc. 
5: BIOS_ID1=080015 
6: BIOS_DATE=01/23/2014 
7: BIOS_VERSION=125WXQ13 
8: BIOS_ID2=**** PCE-5125W BIOS Q1.10 (01/ 
9: CPU_FREQUENCY=3066000000 
10: BOARD_TYPE=GITANEMEM 
11: IP_BOARD_TYPE=DIPB 
12: ETHERNET_BOARD=GEI 
13: FCIB_BOARD=FCIB 
14: RTAC_MEMORY_SIZE=1913 
15: ATA_SERIAL_NUMBER=            Z3TKB9KD 
16: ATA_REVISION_NUMBER=KC45 
17: ATA_MODEL_NUMBER=ST250DM000-1BD141 
18: NETWORK_IF_NAME=gei0 
19: SUB_BOARD_TYPE=GITANE9 
20: GITANE_FPGA_LEN=166965 
21: GITANE_FWFILE=gitane9.hex 
22: GE_PCI_DEVICE_ID=21555 
23: GE_PCI_VENDOR_ID=6070 
24: GITANE_PCI_FW=Rev.57 
25: LOAD_CONFIG_FILE=1 
26: SET_IP_ADDRESS=1 
27: SUBNET_MASK=0xffff0000 
28: BROADCAST_ADDRESS=3.204.255.255 
29: LOAD_APPLICATIONS_FILE=1 
30: TIMEZONE= 
31: GMT::0:0:0 
32:  TIMEZONE=CSTCDT::360:0:0

Code:
value = 0 = 0x0 
->

Code:
-> printLocalTime 
Current Software time is: MON JAN 19 14:01:51 2015

Code:
value = 6532128 = 0x63ac20 = ' ' = std::cout 
-> printRTTime 
Current Hardware time is: MON JAN 19 15:01:53 2015 

value = 6532128 = 0x63ac20 = ' ' = std::cout

But after reboot I ma seeing both hardware and software clock are same even though I am setting the TIMEZONE environment variable to nothing. Below is the output I got after reboot:

Code:
-> envShow 
(global environment) 
0: TSC_TIME_FROM_RESET=853965.694892 seconds 
1: RTAC_OS_LABEL=RTAC9_VXOS2.0.2 
2: RTAC_OS_VERSION=Wind River Systems - vxWorks 6.8.3 
3: RTAC_OS_DATE=May  6 2014, 17:00:30 
4: BIOS_VENDOR=American Megatrends Inc. 
5: BIOS_ID1=080015 
6: BIOS_DATE=01/23/2014 
7: BIOS_VERSION=125WXQ13 
8: BIOS_ID2=**** PCE-5125W BIOS Q1.10 (01/ 
9: CPU_FREQUENCY=3066000000 
10: BOARD_TYPE=GITANEMEM 
11: IP_BOARD_TYPE=DIPB 
12: ETHERNET_BOARD=GEI 
13: FCIB_BOARD=FCIB 
14: RTAC_MEMORY_SIZE=1913 
15: ATA_SERIAL_NUMBER=            Z3TKB9KD 
16: ATA_REVISION_NUMBER=KC45 
17: ATA_MODEL_NUMBER=ST250DM000-1BD141 
18: NETWORK_IF_NAME=gei0 
19: SUB_BOARD_TYPE=GITANE9 
20: GITANE_FPGA_LEN=166965 
21: GITANE_FWFILE=gitane9.hex 
22: GE_PCI_DEVICE_ID=21555 
23: GE_PCI_VENDOR_ID=6070 
24: GITANE_PCI_FW=Rev.57 
25: LOAD_CONFIG_FILE=1 
26: SUBNET_MASK=0xfffffc00 
27: SET_IP_ADDRESS=1 
28: BROADCAST_ADDRESS=3.204.31.255 
29: LOAD_APPLICATIONS_FILE=1 
30: TIMEZONE=

Code:
value = 0 = 0x0 
-> putenv "TIMEZONE=" 
value = 0 = 0x0 
-> printRTTime 
Current Hardware time is: TUE JAN 20 19:54:45 2015

Code:
value = 6532128 = 0x63ac20 = ' ' = std::cout 
-> printLocalTime 
Current Software time is: TUE JAN 20 19:54:51 2015 

value = 6532128 = 0x63ac20 = ' ' = std::cout

why is there a discrepancy in hardware clock for the same value set for TIMEZONE environment variable.
why is the hardware clock considering the TIMEZONE as it should display UTC.

Any suggestions in this reagrd will be of great help.

Thanks,
Sneha

Last edited by Don Cragun; 01-30-2015 at 04:30 AM.. Reason: Add CODE tags.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Number comparison in ksh on mac with -lt is giving wrong answer

I am trying to run following script in ksh on darwin 11.4.2: freeSpace=2469606195 spaceNeeded=200 ] && echo "no space" || echo "space available" ] && echo "no space" || echo "space available" "-lt" is giving wrong answer as "no space" Whereas '<' works fine. When I change the freespace... (4 Replies)
Discussion started by: sabitha
4 Replies

2. Shell Programming and Scripting

awk giving different outputs each time

I have a strange issue. (awk '$3 == "nfs" { cnt++ }; END { print cnt }' /etc/fstab) This is giving different count each time. To test this, tried the one here -bash-3.2$ awk '/nfs/{print $2}' /etc/fstab | wc -l 151 -bash-3.2$ awk '/nfs/{print $2}' /etc/fstab | wc -l 145... (6 Replies)
Discussion started by: sureshmsi
6 Replies

3. Shell Programming and Scripting

Monitoring Sript giving random end result

Hi Guys, I am developing a script to monitor GUI based FileNet Component "Component Manager" which logs it's running status in a log file. Log file is a huge file so in script I put last 300 lines of log file in seperate file and run script every 5 minutes. I am searching the string... (2 Replies)
Discussion started by: dhirajdsharma
2 Replies

4. Solaris

Particular user account shouldn't be locked after entering wrong passwd specfic no. times

Hi all In my system we have implemented user lockout feature after 3 failure attempt if he tries to login directly or if he run the any command through sudo and enter wrong password thrice. Now I have requirement in which particular user account shouldn't be locked when he run the command... (1 Reply)
Discussion started by: sb200
1 Replies

5. UNIX for Advanced & Expert Users

xbindkeys giving wrong mapping information

Hello, I'm having a problem with xbindkeys giving the wrong mapping information, hence I can't get it work at all when trying new mappings from this machine. From another computer, I have some definitions for xbindkeys (made with xbindkeys-config). These key codes work correctly on this... (0 Replies)
Discussion started by: Narnie
0 Replies

6. Shell Programming and Scripting

tr command giving wrong output

Hi All, i have a file which have many fields delimited by ,(comma) now i have to show only few fields and not all. the sample text file looks like this: TYPE=SERVICEEVENT, TIMESTAMP=05/06/2009 11:01:40 PM, HOST=sppwa634, APPLICATION=ASComp, FUNCTION=LimitsService, SOU... (8 Replies)
Discussion started by: usha rao
8 Replies

7. Shell Programming and Scripting

Sort command giving wrong output

Hi all, I have a problem with sort command. i have a file which looks like this: "file1 1073 java/4 1073 java/180 1073 java/170 1073 java/176 1073 java/167 1073 java/40 1073 java/33 1073 java/136 28988 java/76 28988 java/73 28988 java/48 28988 java/26" and i want to sort... (8 Replies)
Discussion started by: usha rao
8 Replies

8. UNIX for Dummies Questions & Answers

AWK command giving wrong input

Hi all, I have a problem with qwk command. i have to check process status and for that i am using command prstat -mvL 1 1 and it gives me the entire output but when i use this command with awk like this: prstat -mvL 1 1 | awk -F" " '{print $1,$15}' to get first and 15th arguments. ... (3 Replies)
Discussion started by: usha rao
3 Replies

9. AIX

Shared memory giving wrong value

Hi , I am working on AIX 5.3 server.I have small program which stores the from database to a particaular shared memory.But while retreiving the valus from the same shared memory, i am getting wrong values. Please help..... (1 Reply)
Discussion started by: ajaysahoo
1 Replies

10. Shell Programming and Scripting

Script giving wrong results....

hi, I have this script which gives me the result... #! /usr/bin/sh set -x cd /home/managar a=1 while true do if then echo " File log.txt exists in this directory " exit 0 fi echo " File has not arrived yes..." sleep 3 let a=a+1 if then (1 Reply)
Discussion started by: mgirinath
1 Replies
Login or Register to Ask a Question