EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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  <20202021  2022  2023  2024  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  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Filtering messages print on the IOC shell console
From: "Johnson, Andrew N. via Tech-talk" <tech-talk at aps.anl.gov>
To: "Rivers, Mark L." <rivers at cars.uchicago.edu>
Cc: EPICS tech-talk <tech-talk at aps.anl.gov>
Date: Thu, 9 Apr 2020 22:46:36 +0000
Sorry guys, I really meant to reply to this thread last week, but it’s been pretty crazy – presumably everyone now has time to work on their list of “things to fix” and this results in more tech-talk and private conversations than normal.

I want to see if the garbling goes away if I do this in the startup script:

dbLoadTemplate(...)

fflush(stderr)

Mark, that is worth trying; here’s how:

fflush(epicsGetStderr())

If it works we should at least add an equivalent flush to the iocsh code after it runs each command. I'm not sure if we can do anything about the VxWorks target shell, maybe Freddie’s setvbuf() idea could be made to work but I haven’t looked into that – VxWorks should have setvbuf() since it was in C89.

Messages that are printed using errlogPrintf() or the epicsPrintf synonym should already be getting flushed immediately because there’s a flush built into the errlogPrintf() code, but any messages printed using fprintf(stderr, …) could benefit from another flush.

- Andrew


On Apr 9, 2020, at 1:18 PM, Mark Rivers <rivers at cars.uchicago.edu> wrote:

I was going to test the hypothesis that the problem was that stderr needed an fflush after each command.  I was hoping that this would be easy to do from the vxWorks shell, but I'm not sure how to get the FILE  pointer to stderr from the command line?


I want to see if the garbling goes away if I do this in the startup script:


dbLoadTemplate(...)

fflush(stderr)

...


Mark



________________________________
From: J. Lewis Muir <jlmuir at imca-cat.org>
Sent: Thursday, April 9, 2020 1:00 PM
To: EPICS Tech-Talk
Cc: 'Konrad, Martin'; Johnson, Andrew N.; Mark Rivers
Subject: Re: Filtering messages print on the IOC shell console

On 03/27, Mark Rivers wrote:
Hi Martin,

dbLoadTemplate.y is printing messages using fprintf(stderr,...);
My recommendation would be to print all messages to the same stream.

Unfortunately this is out of my control.  The problem I am seeing is the garbling of output from dbLoadTemplate (EPICS base) and the echoing of subsequent vxWorks shell commands (Wind River).

But this suggests that the vxWorks shell is proceeding to execute the next command before the previous one has displayed all of its output on the console?  This does not seem correct.

Any more thoughts on this garbled output issue?  Specifically, how can
it be fixed?

Thanks!

Lewis

-- 
Complexity comes for free, simplicity you have to work for.


Replies:
RE: Filtering messages print on the IOC shell console Mark Rivers 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
Re: Filtering messages print on the IOC shell console Konrad, Martin via Tech-talk
Re: Filtering messages print on the IOC shell console Konrad, Martin via Tech-talk
RE: Filtering messages print on the IOC shell console Mark Rivers via Tech-talk
Re: Filtering messages print on the IOC shell console J. Lewis Muir via Tech-talk
Re: Filtering messages print on the IOC shell console Mark Rivers via Tech-talk

Navigate by Date:
Prev: RE: StreamDevice, prevent records from getting "stuck" Mark Rivers via Tech-talk
Next: RE: Filtering messages print on the IOC shell console Mark Rivers 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  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Filtering messages print on the IOC shell console Mark Rivers via Tech-talk
Next: RE: Filtering messages print on the IOC shell console Mark Rivers 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  <20202021  2022  2023  2024 
ANJ, 09 Apr 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·