clustershell
clustershell copied to clipboard
silent messages in task.shell()
Hello,
whenever we run commands using task.shell(command,nodes) there are some messages mostly gibberish , how can we silence those messages something like
clush -o -q -w node[1-100] 'uname -a'
-q, --quiet be quiet, print essential output only
Thanks, Bharath
-q
is already doing what you want. What are the messages you want to get rid of?
Also, -o
is expecting an argument. In your case, I think -q
is used as an argument to -o
instead of one to clush
. Try again without -o
for now.
Hello ,
Thanks for the response.I believe i didn't explain the request properly ,Sorry about that. Iam not using command line.
So Iam using python api to call task.shell () with few linux commands as parameters. When task.run() is executed it does print default messages which we see whenever we try to ssh to the node. I was trying to silence those messages just like what we do "-q" in command line.
Is there a way in python api to silence those default messages?
Thanks Bharath
OK. What you are looking for is ssh_options
tuning from task_self()
task_self().set_info("ssh_options", "-q")
You can retrieve current value using:
task_self().info("ssh_options")