All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/1] ver_linux: Print sysctl settings
@ 2017-04-25 10:03 Petr Vorel
  2017-06-26 10:04 ` Petr Vorel
  0 siblings, 1 reply; 6+ messages in thread
From: Petr Vorel @ 2017-04-25 10:03 UTC (permalink / raw)
  To: ltp

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 ver_linux | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ver_linux b/ver_linux
index a403b4e43..f58de9f65 100755
--- a/ver_linux
+++ b/ver_linux
@@ -87,3 +87,7 @@ free
 echo
 echo '/proc/cpuinfo'
 cat /proc/cpuinfo
+
+echo
+echo 'sysctl settings:'
+sysctl -a
-- 
2.12.2


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

* [LTP] [PATCH 1/1] ver_linux: Print sysctl settings
  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
  0 siblings, 1 reply; 6+ messages in thread
From: Petr Vorel @ 2017-06-26 10:04 UTC (permalink / raw)
  To: ltp

> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
>  ver_linux | 4 ++++
>  1 file changed, 4 insertions(+)

> diff --git a/ver_linux b/ver_linux
> index a403b4e43..f58de9f65 100755
> --- a/ver_linux
> +++ b/ver_linux
> @@ -87,3 +87,7 @@ free
>  echo
>  echo '/proc/cpuinfo'
>  cat /proc/cpuinfo
> +
> +echo
> +echo 'sysctl settings:'
> +sysctl -a

Ping.
It might be useful to get output of env to see environment variables.


Kind regards,
Petr

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

* [LTP] [PATCH 1/1] ver_linux: Print sysctl settings
  2017-06-26 10:04 ` Petr Vorel
@ 2017-06-27 12:20   ` Cyril Hrubis
  2017-06-27 16:06     ` Petr Vorel
  0 siblings, 1 reply; 6+ messages in thread
From: Cyril Hrubis @ 2017-06-27 12:20 UTC (permalink / raw)
  To: ltp

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?

-- 
Cyril Hrubis
chrubis@suse.cz

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

* [LTP] [PATCH 1/1] ver_linux: Print sysctl settings
  2017-06-27 12:20   ` Cyril Hrubis
@ 2017-06-27 16:06     ` Petr Vorel
  2017-06-28 14:04       ` Cyril Hrubis
  0 siblings, 1 reply; 6+ messages in thread
From: Petr Vorel @ 2017-06-27 16:06 UTC (permalink / raw)
  To: ltp

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?


Kind regards,
Petr

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

* [LTP] [PATCH 1/1] ver_linux: Print sysctl settings
  2017-06-27 16:06     ` Petr Vorel
@ 2017-06-28 14:04       ` Cyril Hrubis
  2017-06-29  8:45         ` Petr Vorel
  0 siblings, 1 reply; 6+ messages in thread
From: Cyril Hrubis @ 2017-06-28 14:04 UTC (permalink / raw)
  To: ltp

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

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

* [LTP] [PATCH 1/1] ver_linux: Print sysctl settings
  2017-06-28 14:04       ` Cyril Hrubis
@ 2017-06-29  8:45         ` Petr Vorel
  0 siblings, 0 replies; 6+ messages in thread
From: Petr Vorel @ 2017-06-29  8:45 UTC (permalink / raw)
  To: ltp

Hi,

> 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, to be honest I don't know which ones are the most relevant for networking :(.
Alexey, which are interesting for you?


Kind regards,
Petr

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

end of thread, other threads:[~2017-06-29  8:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2017-06-29  8:45         ` Petr Vorel

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.