* Question about exec_string()
@ 2013-07-16 7:19 Erwan Velu
2013-07-16 20:58 ` Jens Axboe
0 siblings, 1 reply; 4+ messages in thread
From: Erwan Velu @ 2013-07-16 7:19 UTC (permalink / raw)
To: fio
Hi,
I'm continuing my experiments with fio and adding features to genfio.
I'm currently adding to genfio the exec_{pre|post}run support.
I'm benching some ceph and so need to reset OSD's caches with echoing in
drop_cache.
To achieve that, I'm using kash (from kanif) and having the following
syntaxt :
kash -n m1sw1 -n m1sw2 -n m1sw3 -n m2sw1 -n m2sw3 -- echo 3 >
/proc/sys/vm/drop_caches
To be able to ssh all this nodes, I need my env to be kept as it relies
on my ssh-agent.
That's where I do my troubles.
exec_prerun uses exec_string() with does a "sh -c %s'". That does loose
my env and prevents me from executing my command.
I've been testing by removing the "sh -c" and only keep "%s" which works
perfectly.
I'm so wondering what was the targeted role of executing sh instead of
running the command directly.
If you agree about this change, I can provide the patch.
Note also it would be lovely to have an explicit redirection of the
output as unless it's pretty hard to understand if the command got run
with its associated output.
Cheers,
Erwan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Question about exec_string()
2013-07-16 7:19 Question about exec_string() Erwan Velu
@ 2013-07-16 20:58 ` Jens Axboe
2013-07-16 21:01 ` Erwan Velu
0 siblings, 1 reply; 4+ messages in thread
From: Jens Axboe @ 2013-07-16 20:58 UTC (permalink / raw)
To: Erwan Velu; +Cc: fio
On Tue, Jul 16 2013, Erwan Velu wrote:
> Hi,
>
> I'm continuing my experiments with fio and adding features to genfio.
> I'm currently adding to genfio the exec_{pre|post}run support.
>
> I'm benching some ceph and so need to reset OSD's caches with echoing in
> drop_cache.
> To achieve that, I'm using kash (from kanif) and having the following
> syntaxt :
>
> kash -n m1sw1 -n m1sw2 -n m1sw3 -n m2sw1 -n m2sw3 -- echo 3 >
> /proc/sys/vm/drop_caches
>
> To be able to ssh all this nodes, I need my env to be kept as it relies on
> my ssh-agent.
> That's where I do my troubles.
>
> exec_prerun uses exec_string() with does a "sh -c %s'". That does loose my
> env and prevents me from executing my command.
>
> I've been testing by removing the "sh -c" and only keep "%s" which works
> perfectly.
> I'm so wondering what was the targeted role of executing sh instead of
> running the command directly.
> If you agree about this change, I can provide the patch.
I suspect that would be fine.
> Note also it would be lovely to have an explicit redirection of the output
> as unless it's pretty hard to understand if the command got run with its
> associated output.
I'll happily take a patch to include the output into the general logging
:-). That's the way it should work.
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Question about exec_string()
2013-07-16 20:58 ` Jens Axboe
@ 2013-07-16 21:01 ` Erwan Velu
2013-07-16 21:13 ` Jens Axboe
0 siblings, 1 reply; 4+ messages in thread
From: Erwan Velu @ 2013-07-16 21:01 UTC (permalink / raw)
To: Jens Axboe; +Cc: fio
On 16/07/2013 22:58, Jens Axboe wrote:
>
> I'll happily take a patch to include the output into the general logging
> :-). That's the way it should work.
That could be very verbose. Isn't that a problem ?
I though to split it to let user read it later if needed instead of
flooding the current console.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Question about exec_string()
2013-07-16 21:01 ` Erwan Velu
@ 2013-07-16 21:13 ` Jens Axboe
0 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2013-07-16 21:13 UTC (permalink / raw)
To: Erwan Velu; +Cc: fio
On Tue, Jul 16 2013, Erwan Velu wrote:
> On 16/07/2013 22:58, Jens Axboe wrote:
> >
> >I'll happily take a patch to include the output into the general logging
> >:-). That's the way it should work.
> That could be very verbose. Isn't that a problem ?
> I though to split it to let user read it later if needed instead of flooding
> the current console.
Sure, that'd be fine too. You could have jobname-prerun.txt etc created.
I'm fine with either approach.
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-07-16 21:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-16 7:19 Question about exec_string() Erwan Velu
2013-07-16 20:58 ` Jens Axboe
2013-07-16 21:01 ` Erwan Velu
2013-07-16 21:13 ` Jens Axboe
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.