mmitch / reniced

renice running processes based on regular expressions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

warning if no option is given ...

Dutchglory opened this issue · comments

Version: 1.21-1 - Debian repository (Bullseye)

if i run reniced with no option(s), i'm getting this:

Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 2.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 3.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 4.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 5.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 6.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 7.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 8.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 9.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 10.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 11.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 12.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 13.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 14.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 15.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 16.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 17.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 18.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 19.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 20.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 21.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 22.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 23.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 24.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 25.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 26.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 27.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 28.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 29.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 30.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 31.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 32.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 33.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 34.
Argument " " isn't numeric in addition (+) at /usr/bin/reniced line 435, line 35.

if you run reniced with no opton(s) it should respond with "No option(s) entered - Run reniced -h for help" and stop ...

reniced can run without any arguments, it uses some defaults in that case.
That is what is happening to you.

You run into another bug while parsing the output from ps. I can't reproduce this on Debian Buster, so perhaps something has changed in the ps output or you have a special configuration.

I already spot a problem with that code right on: PIDs can be longer than 5 digits and the parser does not cope well with hat. I'll try to fix that first before I ask any additional questions regarding your configuration.

Please try again with the new commit 2c65c05 from this git repo.
If that does not fix it, we'll have to look deeper into your configuration.

Closed because no further reply.

I am having the same problem in my Ubuntu 20.04.2 LTS

outcomes of given commands are

$ type -a ps
ps is /bin/ps

$ apt-cache policy procps
procps:
Installed: 2:3.3.16-1ubuntu2.1
Candidate: 2:3.3.16-1ubuntu2.1
Version table:
*** 2:3.3.16-1ubuntu2.1 500
500 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
100 /var/lib/dpkg/status
2:3.3.16-1ubuntu2 500
500 http://in.archive.ubuntu.com/ubuntu focal/main amd64 Packages

$ ps --version
ps from procps-ng UNKNOWN

Is their any solution to fix it?

Ubuntu 20.04 (focal) as well as all newer versions up until impish still include reniced 1.21, see https://packages.ubuntu.com/focal/reniced
The bug has been fixed in reniced 1.22, so it is normal that you still see the bug.

You could:

  • Open a bug with Ubuntu that a newer version of reniced should be packaged and wait for it to be fixed.
  • Install the current reniced version manually (just download it from GitHub, but then you won't have automatic updates – which is not worse than the status quo ;-). You could then additionally remove the reniced package, but then you might be missing some Perl modules.
  • If you know what you're doing you could just overwrite the reniced binary from the Ubuntu package with the current GitHub version. If Ubuntu should ever include an updated package, the binary would be overwritten, which would probably be just what you would want in that case. (In the worst case the bug comes back and you'd have to overwrite again).

Personally I think the third option would be best, but it is not for the faint of heart. One should not fiddle behind the package manager's back.

I have overwritten the reniced perl file and the reniced.conf file but now I am getting

$ sudo reniced
Use of uninitialized value $PRIO_PROCESS in concatenation (.) or string at /usr/bin/reniced line 395.

I am very new to perl, can you guild me? whats wrong ?
BTW thanks for your recent reply :)

That is indeed another bug :-) I've created issue #3 for it.
I don't know how soon I can have a deeper look at it, though.