From: Cyril Hrubis <chrubis@suse.cz>
To: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Cc: ltp-list <ltp-list@lists.sourceforge.net>,
naresh.kamboju@linaro.org, milosz.wasilewski@linaro.org
Subject: Re: [LTP] [PATCH] cpuhotplug05.sh: Make test to support some old version of 'sar'
Date: Thu, 2 Jul 2015 14:25:10 +0200 [thread overview]
Message-ID: <20150702122510.GA17203@rei.suse.de> (raw)
In-Reply-To: <20150702114215.GA16269@rei.suse.de>
Hi!
> > In commit 841c0eebc50068d6595b97b50ae0ee8e8f57c8ca:
> > We changed "sar 1 0" to "sar 1", but it make the test not
> > work well before 'sysstat-8.1.4(include sar)'.
>
> The old syntax does not work with newer sar. So the correct fix here is
> to do runtime check and change parameters accordingly.
Ah, sorry for replying before I finished my coffee...
The code does exactly that but I would be happier if we had the fi only
in one place, something like:
sar 1 0 > /dev/null &
pid=$!
if kill -0 $pid 2> /dev/null; then
kill $pid
SAR_PARAMS="1 0"
else
SAR_PARAMS="1"
fi
...
sar $SAR_PARAMS ...
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
prev parent reply other threads:[~2015-07-02 12:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1431958682-15683-1-git-send-email-chase.qi@linaro.org>
[not found] ` <555A8744.5050300@cn.fujitsu.com>
2015-07-02 9:26 ` [LTP] [PATCH] cpuhotplug05.sh: Make test to support some old version of 'sar' Zeng Linggang
2015-07-02 11:42 ` Cyril Hrubis
2015-07-02 12:25 ` Cyril Hrubis [this message]
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=20150702122510.GA17203@rei.suse.de \
--to=chrubis@suse.cz \
--cc=ltp-list@lists.sourceforge.net \
--cc=milosz.wasilewski@linaro.org \
--cc=naresh.kamboju@linaro.org \
--cc=zenglg.jy@cn.fujitsu.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