prjemian / epics-docker

Provide EPICS IOCs in docker images
9 stars 4 forks source link

TIMEZONE: Illegal INP parm field #30

Closed prjemian closed 3 years ago

prjemian commented 3 years ago

on iocInit

Error (511,511) PV: vm::TIMEZONE devStringinEnvVar (init_record) Illegal INP parm field
prjemian commented 3 years ago
iocxxx> dbpr xxx::TIMEZONE, 9
ACKS: NO_ALARM      ACKT: YES           APST: On Change     ASG :               
ASP : PTR (nil)     BKLNK: ELL 0 [(nil) .. (nil)]           BKPT: 00            
DESC: EPICS_TIMEZONE                    DISA: 0             DISP: 0             
DISS: NO_ALARM      DISV: 1             DPVT: PTR (nil)     
DSET: PTR 0x7f9657583440                DTYP: IOC epics var EVNT:               
FLNK: CONSTANT      INP : INST_IO @EPICS_TIMEZONE           LCNT: 0             
LSET: PTR 0x5631fa24d560                MLIS: ELL 0 [(nil) .. (nil)]            
MLOK: f0 16 2f fa 31 56 00 00           MPST: On Change     NAME: xxx::TIMEZONE 
NSEV: NO_ALARM      NSTA: NO_ALARM      OLDSIMM: NO         OVAL:               
PACT: 0             PHAS: 0             PINI: YES           PPN : PTR (nil)     
PPNR: PTR (nil)     PRIO: LOW           PROC: 0             PUTF: 0             
RDES: PTR 0x5631f9aa2340                RPRO: 0             
RSET: PTR 0x7f965707ac60                SCAN: Passive       SDIS: CONSTANT      
SDLY: -1            SEVR: NO_ALARM      SIML: CONSTANT      SIMM: NO            
SIMPVT: PTR (nil)   SIMS: NO_ALARM      SIOL: CONSTANT      SPVT: PTR (nil)     
SSCN: <nil>         STAT: NO_ALARM      SVAL:               
TIME: 2021-05-13 18:24:18.330057747     TPRO: 0             TSE : 0             
TSEL: CONSTANT      UDF : 1             UDFS: INVALID       VAL :               
prjemian commented 3 years ago
iocxxx> dbgf xxx::TIMEZONE.INP
DBF_STRING:         "@EPICS_TIMEZONE"   
prjemian commented 3 years ago

related to https://github.com/epics-modules/iocStats/issues/37?

prjemian commented 3 years ago

To (choose a value and) set EPICS_TZ, see https://epics.anl.gov/base/R3-15/8-docs/RELEASE_NOTES.html, which says:

The default value for the EPICS_TZ environment parameter is set in the Base configure/CONFIG_SITE_ENV file, which contains example settings for most EPICS sites that use VxWorks, and a link to a page describing the Posix TZ format for any locations that I missed.

Here is the relevant text from that file:

## Time service:
# EPICS_TZ
#       Local timezone rules for vxWorks and RTEMS. The value follows the Posix
#       TZ environment variable's Mm.n.d/h format (see the IBM link below for
#       details). If TZ hasn't already been set when the osdTime timeRegister()
#       C++ static constructor runs, this parameter will be copied into the TZ
#       environment variable. Once the OS clock has been synchronized to NTP the
#       routine tz2timezone() will be run to convert TZ into the TIMEZONE
#       variable format that VxWorks needs.
#               https://developer.ibm.com/articles/au-aix-posix/

# Japan Standard Time, no DST:
#EPICS_TZ = "JST-9"

# Central European (Summer) Time:
#EPICS_TZ = "CET-1CEST,M3.5.0/2,M10.5.0/3"

# Greenwich Mean/British Summer Time:
#EPICS_TZ = "GMT0BST,M3.5.0/1,M10.5.0/2"

# US Eastern Standard/Daylight Time:
#EPICS_TZ = "EST5EDT,M3.2.0/2,M11.1.0/2"

# US Central Standard/Daylight Time:
EPICS_TZ = "CST6CDT,M3.2.0/2,M11.1.0/2"

# US Mountain Standard/Daylight Time:
#EPICS_TZ = "MST7MDT,M3.2.0/2,M11.1.0/2"

# US Pacific Standard/Daylight Time:
#EPICS_TZ = "PST8PDT,M3.2.0/2,M11.1.0/2"

# US Hawaiian Standard Time, no DST:
#EPICS_TZ = "HST10"
prjemian commented 3 years ago

from epicsPrtEnvParams:

iocxxx> epicsPrtEnvParams
EPICS_CA_ADDR_LIST is undefined
EPICS_CA_CONN_TMO: 30.0
EPICS_CA_AUTO_ADDR_LIST: YES
EPICS_CA_REPEATER_PORT: 5065
EPICS_CA_SERVER_PORT: 5064
EPICS_CA_MAX_ARRAY_BYTES: 64010
EPICS_CA_AUTO_ARRAY_BYTES: YES
EPICS_CA_MAX_SEARCH_PERIOD: 300.0
EPICS_CA_NAME_SERVERS is undefined
EPICS_CA_MCAST_TTL: 1
EPICS_CAS_INTF_ADDR_LIST is undefined
EPICS_CAS_IGNORE_ADDR_LIST is undefined
EPICS_CAS_AUTO_BEACON_ADDR_LIST is undefined
EPICS_CAS_BEACON_ADDR_LIST is undefined
EPICS_CAS_SERVER_PORT is undefined
EPICS_CA_BEACON_PERIOD: 15.0
EPICS_CAS_BEACON_PERIOD is undefined
EPICS_CAS_BEACON_PORT is undefined
EPICS_BUILD_COMPILER_CLASS: gcc
EPICS_BUILD_OS_CLASS: Linux
EPICS_BUILD_TARGET_ARCH: linux-x86_64
EPICS_TZ: CST6CDT,M3.2.0/2,M11.1.0/2
EPICS_TS_NTP_INET is undefined
EPICS_IOC_IGNORE_SERVERS is undefined
EPICS_IOC_LOG_PORT: 7004
EPICS_IOC_LOG_INET is undefined
EPICS_IOC_LOG_FILE_LIMIT: 1000000
EPICS_IOC_LOG_FILE_NAME is undefined
EPICS_IOC_LOG_FILE_COMMAND is undefined
IOCSH_PS1: iocxxx> 
IOCSH_HISTSIZE: 50
IOCSH_HISTEDIT_DISABLE is undefined
prjemian commented 3 years ago

In the docker image, the substitutions file is not called, only iocStats-3-1-16/db/iocAdminSoft.db. In that file, change EPICS_TIMEZONE to EPICS_TZ.

gilesknap commented 7 months ago

Hi @prjemian, thanks for writing up this issue. I was just trying to fix it in my own containers and this really helped. See https://github.com/epics-containers/ibek-support/blob/3f69380c62bfade750e67184c71d0c2f9b14f034/iocStats/install.sh#L26-L27

I'm not clear as to why this template is still wrong in the very latests version of iocStats that I'm using?