From: "Stone, Joshua I" <joshua.i.stone@intel.com>
To: "Hien Nguyen" <hien@us.ibm.com>, "Martin Hunt" <hunt@redhat.com>,
"SystemTAP" <systemtap@sources.redhat.com>
Subject: RE: stpd and stdout
Date: Tue, 09 May 2006 22:57:00 -0000 [thread overview]
Message-ID: <CBDB88BFD06F7F408399DBCF8776B3DC07281820@scsmsx403.amr.corp.intel.com> (raw)
On Tuesday, May 09, 2006 3:21 PM, Hien Nguyen wrote:
> While working on the the systemtap GUI we run into the problem of
> getting the stdout to the gui app in a timely fashion. We does get the
> output as a blob of text once in a while (looks like data were only
> flushed out when the buffer is full). To recreate the problem you can
> try this
>
> stap -e 'probe syscall.open{ log(filename) }' | tee
>
> Anyway, I added one line of code to flushout the data as soon as the
> stpd gets it. It seems to solve the above problem. To avoid
> unnecessary performance issues for others, perhaps we should have
> that as an option. What do you think?
I've run into this with Perl scripts before -- Perl normally
line-buffers output to STDOUT and block-buffers otherwise (e.g. to a
pipe or socket). Their solution for this problem is an autoflush
option:
http://perldoc.perl.org/perlvar.html#HANDLE->autoflush(EXPR)
I think it would be very reasonable to support a similar command-line
option in stap/stpd.
Josh
next reply other threads:[~2006-05-09 22:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-09 22:57 Stone, Joshua I [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-05-09 22:21 Hien Nguyen
2006-05-18 17:56 ` Martin Hunt
2006-05-18 20:42 ` Hien Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CBDB88BFD06F7F408399DBCF8776B3DC07281820@scsmsx403.amr.corp.intel.com \
--to=joshua.i.stone@intel.com \
--cc=hien@us.ibm.com \
--cc=hunt@redhat.com \
--cc=systemtap@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).