The message sent to stderr is not documented in the device drivers book.
It tells you about the response code of 2, but the description of that
response code doesn't say anything about the error message to stderr or
that the message tells you how long the output was.

For use in scripts, it would be nice if there was a way to get the output
length without needing to parse the text of an error message!

On Fri, Jul 10, 2015 at 7:47 AM, Christian Borntraeger <
[email protected]> wrote:

> Am 10.07.2015 um 13:19 schrieb Christian Borntraeger:
> > Anothing thing: 1M is quite large (the larges contiguous memory that
> Linux wants
> > to allocate as slab). So try to not use that unless you need it. If you
> want to
> > know how much memory is needed, then vmcp gives you back the result of
> the diagnose:
> >
> > # vmcp q dasd all
> > [...]
> > Error: output (74764 bytes) was truncated, try --buffer to increase size
>
> For those who want to trigger some action in that case:
> The output from CP goes to stdout and the error message to stderr.
> The return value of vmcp is 2 instead of 0 in that case. So something
> if return == 2 then parse stderr and retry could work out.
>
> Christian
>
> ----------------------------------------------------------------------
> For LINUX-390 subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO LINUX-390 or
> visit
> http://www.marist.edu/htbin/wlvindex?LINUX-390
> ----------------------------------------------------------------------
> For more information on Linux on System z, visit
> http://wiki.linuxvm.org/
>



--
Bruce Hayden
z/VM and Linux on z Systems ATS
IBM, Endicott, NY

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/

Reply via email to