From: Marcelo Tosatti <mtosatti@redhat.com>
To: John Kacur <jkacur@redhat.com>
Cc: linux-rt-users@vger.kernel.org
Subject: [PATCH rt-tests] queuelat: fix get_cpuinfo_mhz.sh script on SMP systems
Date: Wed, 20 Jun 2018 10:21:31 -0300 [thread overview]
Message-ID: <20180620132129.GA7983@amt.cnet> (raw)
get_cpuinfo_mhz.sh fails on SMP systems because
/proc/cpuinfo returns multiple "cpu MHz" containing
lines.
Get only the first one.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
diff --git a/src/queuelat/get_cpuinfo_mhz.sh b/src/queuelat/get_cpuinfo_mhz.sh
index fb5158f..46f94c4 100755
--- a/src/queuelat/get_cpuinfo_mhz.sh
+++ b/src/queuelat/get_cpuinfo_mhz.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-mhz=`cat /proc/cpuinfo | grep "cpu MHz" | uniq | cut -f 3 -d " "`
+mhz=`cat /proc/cpuinfo | grep "cpu MHz" | uniq | cut -f 3 -d " " | head -1`
echo $mhz
next reply other threads:[~2018-06-20 13:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-20 13:21 Marcelo Tosatti [this message]
2018-06-22 20:00 ` [PATCH rt-tests] queuelat: fix get_cpuinfo_mhz.sh script on SMP systems Gratian Crisan
2018-06-23 13:24 ` Carsten Emde
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=20180620132129.GA7983@amt.cnet \
--to=mtosatti@redhat.com \
--cc=jkacur@redhat.com \
--cc=linux-rt-users@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.