On 03/26, Johnson, Andrew N. via Tech-talk wrote:
> The only place IOC code should be using printf() or fprintf(stderr,
> …) is when reporting errors from initialization commands that were
> run in a startup script or from the command-line (those should not
> use errlog() because the output gets out of sync since it has to pass
> through the logging system before being printed).
Hi, Andrew!
A problem I often see on VxWorks VME crate IOC consoles is that output
is corrupted. It looks as if two or more threads or processes are
writing to the console at the same time. Does your suggestion about
where you consider it appropriate to use printf and fprintf include this
situation? How can this be avoided?
I would really like a solution that does not result in corrupted output
on the console because I would like to use log monitoring software such
as Logstash to monitor my logs. But I can't reliably write any kind of
filters if the console output can be corrupted in an arbitrary way.
Below is an example of the corruption I'm talking about at boot time on
the console of a VxWorks VME crate IOC. This happens before iocInit is
called in the st.cmd file. The corruption starts on the eighth line
where it should read
value = 0 = 0x0
but it actually reads
value = 0 = 0xsave_restore:mo0
And then the corruption continues as the subsequent comment lines are
corrupted with output presumably from some other thread or process.
Thanks!
Lewis
----
# File permissions used to create new .sav files
save_restoreSet_FilePermissions(0664)
save_restore: File permissions set to 0664
value = 43 = 0x2b = '+'
# specify where save files should be
set_savefile_path("/srv/vxwfs/autosave", "17idb")
value = 0 = 0xsave_restore:mo0
###
# specify what save files should be restored. Note these files must beunt
FileSystem:successf# in the directory specified in set_savefile_path(), or, if that functionully mo
unted '/srv/vxwfs/a# has not been called, from the directory current when iocInit is invokedutosave
/17idb'
set_pass0_restoreFile("auto_positions.sav")
value = 0 = 0x0
----
- Replies:
- Re: Filtering messages print on the IOC shell console J. Lewis Muir via Tech-talk
- References:
- Filtering messages print on the IOC shell console Paduan Donadio, Marcio via Tech-talk
- Re: Filtering messages print on the IOC shell console Johnson, Andrew N. via Tech-talk
- Navigate by Date:
- Prev:
Re: Filtering messages print on the IOC shell console Ben Franksen via Tech-talk
- Next:
Re: Filtering messages print on the IOC shell console Konrad, Martin via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
<2020>
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Filtering messages print on the IOC shell console Ben Franksen via Tech-talk
- Next:
Re: Filtering messages print on the IOC shell console J. Lewis Muir via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
<2020>
2021
2022
2023
2024
|