ver_linux: Print sysctl settings
PATCH 1/1 ver_linux: Print sysctl settings
--- ver_linux | 4 ++++ 1 file changed, 4 insertions(+)
ver_linux +4 -0
@@ -87,3 +87,7 @@ free echo echo '/proc/cpuinfo' cat /proc/cpuinfo + +echo +echo 'sysctl settings:' +sysctl -a
Signature · 1 line
2.12.2
PATCH 1/1 ver_linux: Print sysctl settings
Quoted 10 lines
Signed-off-by Petr Vorel <[email protected]>--- ver_linux | 4 ++++ 1 file changed, 4 insertions(+)ver_linux +0
-0
ver_linux free · line 93
Quoted 7 lines
ver_linux +4
-0@@ -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
PATCH 1/1 ver_linux: Print sysctl settings
Hi!
Quoted 6 lines
ver_linux free · line 93
Quoted 3 lines
ver_linux +3
-0+echo +echo 'sysctl settings:' +sysctl -aPing.
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?
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH 1/1 ver_linux: Print sysctl settings
Hi!
Quoted 7 lines
Quoted 6 lines
ver_linux free · line 93
Quoted 3 lines
ver_linux +3
-0+echo +echo 'sysctl settings:' +sysctl -aPing.
It might be useful to get output of env to see environment variables.
Quoted 5 lines
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
PATCH 1/1 ver_linux: Print sysctl settings
Hi!
Quoted 20 lines
Quoted 7 lines
Quoted 6 lines
ver_linux free · line 93
Quoted 3 lines
ver_linux +3
-0+echo +echo 'sysctl settings:' +sysctl -aPing.
It might be useful to get output of env to see environment variables.Quoted 5 lines
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 fornetwork.sh) is that they are set for subshell (child process), so they are not visible when env is running inver_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.
Quoted 1 line
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.
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH 1/1 ver_linux: Print sysctl settings
Hi,
Quoted 6 lines
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:
Quoted 8 lines
for knob in foo.bar1 foo.bar2 ...; do
sysclt $knob
doneThe 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