We help IT Professionals succeed at work.

renice with sshd

bitmechanic
bitmechanic asked
on
1,331 Views
Last Modified: 2013-12-23
I love winssh to transfer files from my windoz box to my linux box.  

The problem is that my linux box will prioritise the sshd over my surfing and we know that is not right :)

I tried:         renice -n 5 -p 1734

The pid was taken from the ps -ef command so I feel sure I wam pointing to the correct process.  

Questions:
1)  How do I renice this if I want to push back the priority after it starts.
2) who do I nice this if I want to make this a "non issue" in the future ?

Thank you all

Also part of this is for my own information.  I can just move the speed slider to the left on the windows client but that is not the way they would ask for it to be done in an interview !
Comment
Watch Question

# try:
 renice -n 5 -p 1734 || echo no renice allowed

Author

Commented:
thegeekdom:~ #  renice -n 5 -p 15051 || echo no renice allowed
5: old priority 0, new priority 0
15051: old priority 0, new priority 0
thegeekdom:~ #  renice -n -5  -p 15051 || echo no renice allowed
renice: -5: bad value
15051: old priority 0, new priority 0
thegeekdom:~ #  renice -n 1 -p 15051 || echo no renice allowed
1: old priority 0, new priority 0
15051: old priority 0, new priority 0
thegeekdom:~ #  renice -n -1  -p 15051 || echo no renice allowed
renice: -1: bad value
15051: old priority 0, new priority 0
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
Suse linux

I have tried moving it higher and lower.

Dave
my renice on linux has no -n option (as I already said), use
  renice 3 -p 42

man renice
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Top Expert 2015
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
>  renice does not allow normal users to rise priority of their processes. only root can do that.
hmm, the man page and the usage tells us that it works (range 0 .. 20)
> older process schedulers do not handle it in the way you expect.
gheist, do you have an example for that?
Top Expert 2015

Commented:

1)
% uname
FreeBSD
%ps -l 16585
  UID   PID  PPID CPU PRI NI   VSZ   RSS MWCHAN STAT  TT       TIME COMMAND
 1001 16585 44853   0  96  0  1244   588 -      T     p1    0:00.00 cat
%renice 10 16585
16585: old priority 0, new priority 10
%ps -l 16585
  UID   PID  PPID CPU PRI NI   VSZ   RSS MWCHAN STAT  TT       TIME COMMAND
 1001 16585 44853   0  96 10  1244   588 -      TN    p1    0:00.00 cat
%renice 0 16585
renice: 16585: setpriority: Permission denied
%ps -l 16585
  UID   PID  PPID CPU PRI NI   VSZ   RSS MWCHAN STAT  TT       TIME COMMAND
 1001 16585 44853   0  96 10  1244   588 -      TN    p1    0:00.00 cat

2) It has minor effect in modern kernels, but when one ups priority of web surfer over dns cache ... blah blah blah ... blah blah blah
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.