linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Kacur <jkacur@redhat.com>
To: rt-users <linux-rt-users@vger.kernel.org>,
	Clark Williams <williams@redhat.com>
Cc: John Kacur <jkacur@redhat.com>
Subject: [PATCH 4/6] cyclictest: Change the output from function sighand() to stderr
Date: Thu, 14 Aug 2014 18:18:08 +0200	[thread overview]
Message-ID: <1408033090-24866-5-git-send-email-jkacur@redhat.com> (raw)
In-Reply-To: <1408033090-24866-1-git-send-email-jkacur@redhat.com>

cyclictest can be run from other tools such as rteval
in order to get current status on long runs, SIGUSR1 is sent to
cyclictest and caught by function sighand()

This creates difficulties for rteval when parsing cyclictest output, so
change the output to stderr.

Note, a RFC was sent out on Apr.15 2014 entitled
"RFC: SIGUSR1 to stderr"
to:	 RT <linux-rt-users@vger.kernel.org>
cc:	 Carsten Emde <C.Emde@osadl.org>,
	 Thomas Gleixner <tglx@linutronix.de>,
	  Clark Williams <williams@redhat.com>

Since I didn't receive any replies, I'm assumin there are no objections

Signed-off-by: John Kacur <jkacur@redhat.com>
---
 src/cyclictest/cyclictest.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index 64f1764681b0..ad7890ffaa95 100644
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -1569,11 +1569,11 @@ static void sighand(int sig)
 		int oldquiet = quiet;
 
 		quiet = 0;
-		printf("#---------------------------\n");
-		printf("# cyclictest current status:\n");
+		fprintf(stderr, "#---------------------------\n");
+		fprintf(stderr, "# cyclictest current status:\n");
 		for (i = 0; i < num_threads; i++)
-			print_stat(stdout, parameters[i], i, 0, 0);
-		printf("#---------------------------\n");
+			print_stat(stderr, parameters[i], i, 0, 0);
+		fprintf(stderr, "#---------------------------\n");
 		quiet = oldquiet;
 		return;
 	}
-- 
1.8.1.4


  parent reply	other threads:[~2014-08-14 16:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-14 16:18 [PATCH 0/6] Miscellaneous cyclictest patches John Kacur
2014-08-14 16:18 ` [PATCH 1/6] lib: Rework err_msg_n to output strerror after message John Kacur
2014-08-14 16:18 ` [PATCH 2/6] rt_numa.h: Suppress discards 'const' qualifier warning John Kacur
2014-08-14 16:18 ` [PATCH 3/6] cyclictest: Always print an err message if write of 0 to cpu-dma_latency fails John Kacur
2014-08-14 16:18 ` John Kacur [this message]
2014-08-14 16:18 ` [PATCH 5/6] cyclictest: Fix help for long options only John Kacur
2014-08-18 20:26   ` Michael
2014-08-18 20:45     ` John Kacur
2014-08-14 16:18 ` [PATCH 6/6] cyclictest: Add long option --laptop to preserve battery power John Kacur
2014-08-14 16:38   ` John Kacur
2014-08-18 20:29   ` Michael
2014-08-18 20:46     ` John Kacur

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=1408033090-24866-5-git-send-email-jkacur@redhat.com \
    --to=jkacur@redhat.com \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=williams@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 NNTP newsgroup(s).