public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/1] ver_linux: Print sysctl settings
Date: Wed, 28 Jun 2017 16:04:06 +0200	[thread overview]
Message-ID: <20170628140406.GA27262@rei.lan> (raw)
In-Reply-To: <20170627160623.dc5ok6ckuxahxnvl@dell5510>

Hi!
> > > > +echo
> > > > +echo 'sysctl settings:'
> > > > +sysctl -a
> 
> > > Ping.
> > > It might be useful to get output of env to see environment variables.
> 
> > Hmm, I find this to be a bit too verbose, do we really have to print all
> > the variables?
> 
> > Can't we grep a few interesting ones and limit the output to something
> > as 20 lines?
> You're right. I'd grep something like:
> env |grep -m 20 -e PATH -e LTP -e RHOST -e IPV4 -e IPV6
> These are just for network related tests, would you propose some more?
> The problem with environment variables (at least for network.sh) is that they are set for
> subshell (child process), so they are not visible when env is running in ver_linux. We
> need to put it into scripts which set them. Either simple echo, or use 'set -x' before
> exporting variables and 'set +x' after.
> 
> Do you want to limit sysctl output somehow as well?

I would do that as well, I doubt that values such as cdrom speed are of
any value for us. Maybe we should just create a whitelist and print only
these variables that we find interesting.

For sysctl that would be as easy as:

for knob in foo.bar1 foo.bar2 ...; do
	sysclt $knob
done

The question is of course which ones. Looking at the sysctl output
settings related to vm overcommit and few from kernel.* namespace looks
most relevant to me. I suppose you want to add some network knobs as
well.

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2017-06-28 14:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-25 10:03 [LTP] [PATCH 1/1] ver_linux: Print sysctl settings Petr Vorel
2017-06-26 10:04 ` Petr Vorel
2017-06-27 12:20   ` Cyril Hrubis
2017-06-27 16:06     ` Petr Vorel
2017-06-28 14:04       ` Cyril Hrubis [this message]
2017-06-29  8:45         ` Petr Vorel

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=20170628140406.GA27262@rei.lan \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /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