All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH v2] ver_linux: use lscpu command result instead of /proc/cpuinfo
@ 2018-09-27 14:08 Masayoshi Mizuma
  2018-10-01 12:24 ` Cyril Hrubis
  0 siblings, 1 reply; 2+ messages in thread
From: Masayoshi Mizuma @ 2018-09-27 14:08 UTC (permalink / raw)
  To: ltp

From: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>

lscpu command shows the cpu information clearly. So let's
use the result if the command is installed to the system.

Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
---
 ver_linux | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/ver_linux b/ver_linux
index dda337926..320b624a1 100755
--- a/ver_linux
+++ b/ver_linux
@@ -96,5 +96,9 @@ echo 'free reports:'
 free
 
 echo
-echo '/proc/cpuinfo'
-cat /proc/cpuinfo
+echo 'cpuinfo:'
+if which lscpu > /dev/null 2>&1; then
+	lscpu
+else
+	cat /proc/cpuinfo
+fi
-- 
2.19.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [LTP] [PATCH v2] ver_linux: use lscpu command result instead of /proc/cpuinfo
  2018-09-27 14:08 [LTP] [PATCH v2] ver_linux: use lscpu command result instead of /proc/cpuinfo Masayoshi Mizuma
@ 2018-10-01 12:24 ` Cyril Hrubis
  0 siblings, 0 replies; 2+ messages in thread
From: Cyril Hrubis @ 2018-10-01 12:24 UTC (permalink / raw)
  To: ltp

Hi!
Applied, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-01 12:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-27 14:08 [LTP] [PATCH v2] ver_linux: use lscpu command result instead of /proc/cpuinfo Masayoshi Mizuma
2018-10-01 12:24 ` Cyril Hrubis

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.