Skip to content
This repository has been archived by the owner on Jun 29, 2024. It is now read-only.

ionice supporting #9

Closed
iamsimakov opened this issue Dec 13, 2017 · 6 comments
Closed

ionice supporting #9

iamsimakov opened this issue Dec 13, 2017 · 6 comments

Comments

@iamsimakov
Copy link

Hello, thank you for library very much. What do think about supporting ionice options?
ref
https://www.systutorials.com/docs/linux/man/1-ionice/
ionice [-c class] [-n level] [-t] command [argument...]

@m-o-e
Copy link
Member

m-o-e commented Dec 13, 2017

Not sure how that would work. Wouldn't you rather ionice the entire ruby-process?

@iamsimakov
Copy link
Author

I think it would be something that: if ionice option is present then scp comand will be wrapped as in example above
ionice [-c class] [-n level] [-t] command [argument...]
for each command - download or upload.

Whether correctly I understood you ?
If you meant wrap the whole process of ruby I did not hear about it. Do you have a link to the resource where this was described or little example?

@m-o-e
Copy link
Member

m-o-e commented Dec 13, 2017

net-ssh-simple uses the net-ssh gem, which implements SSH in pure ruby (there are no calls to ssh or scp binaries).

Therefor, if you want to apply ionice, you would apply it to your ruby process, such as:
ionice -c 2 ./my_program.rb

@iamsimakov
Copy link
Author

thank you for your time but it's not quite what we need. our main process is script which run from daemontools. and from this process can initiate many connections: some with ionice, some without ionice and params for ionice can change for different connections.

@m-o-e
Copy link
Member

m-o-e commented Dec 13, 2017

Sorry, but ionice works only on a process-level. Maybe you can restructure your application to use separate processes for the different connection types?

@iamsimakov
Copy link
Author

ok, thank you. I will think about it. if I will can make some fixes in this gem I will make PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants