Date: Thu, 04 May 2017 04:23:30 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 219055] nice jail anomoly - values not passed into jailed processes when using jexec -U username Message-ID: <bug-219055-8@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D219055 Bug ID: 219055 Summary: nice jail anomoly - values not passed into jailed processes when using jexec -U username Product: Base System Version: 11.0-STABLE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: dewayne@heuristicsystems.com.au While trying to find a "nice" way to adjust the process priority within a j= ail, I noticed that setting the username of the executing software within a jail= - didn't adopt the required niceness. Please note the NI value below. The f= irst example is what I would expect with the other options. # nice -n -11 jexec b2 ps -l UID PID PPID CPU PRI NI VSZ RSS MWCHAN STAT TT TIME COMMAND 0 7264 47997 0 61 -11 21140 2560 - R<+J 2 0:00.00 ps -l # nice -n -11 jexec -U root b2 ps -l UID PID PPID CPU PRI NI VSZ RSS MWCHAN STAT TT TIME COMMAND 0 11134 47997 0 72 0 21140 2556 - R+J 2 0:00.00 ps -l # nice -n -11 jexec -u root b2 ps -l UID PID PPID CPU PRI NI VSZ RSS MWCHAN STAT TT TIME COMMAND 0 13759 47997 0 72 0 16660 4532 - R+J 2 0:00.00 ps -l The intent is to run a process within a jail by a specific username at a specified priority. A workaround could be to define a class within login.conf. But... this for= ces all processes with that username to run at that priority, which is undesira= ble.=20 Interestingly I do run longstanding processes at idle and they do acquire t= he "nice" value (please note the PRI value) below: # idprio 0 jexec -U root b6 ps -l UID PID PPID CPU PRI NI VSZ RSS MWCHAN STAT TT TIME COMMAND 0 49946 48878 0 124 0 21140 2548 - R+J 2 0:00.00 ps -l # idprio 24 jexec -U root b6 ps -l UID PID PPID CPU PRI NI VSZ RSS MWCHAN STAT TT TIME COMMAND 0 51714 48878 0 148 0 21140 2548 - R+J 2 0:00.00 ps -l It looks like the nice value via /bin/sh (nor bin/tcsh) isn't passed via je= xec to the jailed process. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-219055-8>