kata198 / ioschedset

Commandline tools to query and/or set the I/O schedulers for block devices on Linux systems
GNU General Public License v3.0
6 stars 0 forks source link

rextract: command not found #2

Open akarasulu opened 2 months ago

akarasulu commented 2 months ago

Hi there! Thank you in advance for this great work. I got the following error:

xxxx@xxxxx:~/Projects/ioschedset# io-get-sched sdb
/usr/bin/io-get-sched: line 95: rextract: command not found
sdb:    

Coming from:

root@stein:~/Projects/ioschedset# find . -type f | xargs grep rextract
./io-get-sched:    SCHEDULER="$(cat "./${blockDev}/queue/scheduler" | rextract '[\[]([^\]][^\]]*)[\]]' '${1}')"

I searched everywhere and with apt-file, too, but nothing turned up for extract. Could you lend a hand?

Thanks much!!!

kata198 commented 2 months ago

The rextract executable can't be found and executed by the script.

The search path for executables is found in the PATH environment variable, as a colon-separated series of directories to check.

Most likely when you are switching between your user account and the root account, this PATH variable is also changing to something which does not contain the rextract install directory.

If you are using virtualenvs, it is not active when you are running the script.

The simplest "just work" thing to do would be to copy rextract to /usr/bin.

If you cannot do that for operational reasons, you can ensure the PATH variable is correct from the root script. Or use a virtualenv.

The command "which rextract" will perform the PATH search, to help you.

Have a great day!

On Friday, August 23, 2024, Alex Karasulu @.***> wrote:

Hi there! Thank you in advance for this great work. I got the following error:

@.***:~/Projects/ioschedset# io-get-sched sdb /usr/bin/io-get-sched: line 95: rextract: command not found sdb:

Coming from:

@.**:~/Projects/ioschedset# find . -type f | xargs grep rextract ./io-get-sched: SCHEDULER="$(cat "./${blockDev}/queue/scheduler" | rextract '[[]([^]][^]])[]]' '${1}')"

I searched everywhere and with apt-file, too, but nothing turned up for extract. Could you lend a hand?

Thanks much!!!

— Reply to this email directly, view it on GitHub https://github.com/kata198/ioschedset/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACARWO6FYVNXFRGECRMS63DZS3O45AVCNFSM6AAAAABM7TGICSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ4DENBYGYZDIOA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

kata198 commented 2 months ago

I reread the subject and saw this is a report on ioschedset.

Sorry, I wrote this reply thinking it was a report on rextract, which is another one of my projects.

It appears the issue is rextract is not installed.

You should be able to install it via pip, and the setup.py install of ioschedset should have installed it for you.

How did you install io-schedset?

If all else fails, https://github.com/kata198/rextract

Is the core project, and has a standard setuptools setup.py installation.

You can also just copy the rextract file itself, it is standalone executable.

Thanks, and let me know if this helps!

On Friday, August 23, 2024, Tim Savannah @.***> wrote:

The rextract executable can't be found and executed by the script.

The search path for executables is found in the PATH environment variable, as a colon-separated series of directories to check.

Most likely when you are switching between your user account and the root account, this PATH variable is also changing to something which does not contain the rextract install directory.

If you are using virtualenvs, it is not active when you are running the script.

The simplest "just work" thing to do would be to copy rextract to /usr/bin.

If you cannot do that for operational reasons, you can ensure the PATH variable is correct from the root script. Or use a virtualenv.

The command "which rextract" will perform the PATH search, to help you.

Have a great day!

On Friday, August 23, 2024, Alex Karasulu @.***> wrote:

Hi there! Thank you in advance for this great work. I got the following error:

@.***:~/Projects/ioschedset# io-get-sched sdb /usr/bin/io-get-sched: line 95: rextract: command not found sdb:

Coming from:

@.**:~/Projects/ioschedset# find . -type f | xargs grep rextract ./io-get-sched: SCHEDULER="$(cat "./${blockDev}/queue/scheduler" | rextract '[[]([^]][^]])[]]' '${1}')"

I searched everywhere and with apt-file, too, but nothing turned up for extract. Could you lend a hand?

Thanks much!!!

— Reply to this email directly, view it on GitHub https://github.com/kata198/ioschedset/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACARWO6FYVNXFRGECRMS63DZS3O45AVCNFSM6AAAAABM7TGICSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ4DENBYGYZDIOA . You are receiving this because you are subscribed to this thread.Message ID: @.***>