|
2009-12-12
, 14:06
|
|
Posts: 71 |
Thanked: 54 times |
Joined on Oct 2009
|
#2
|
Hi!
I have N810. How can I write a short script to do the following?
Get the pid of a process like:
ps | grep <your_app_name> | cut -b 1-5 | head -1
and then use that pid number in the 'renice' command to put the priority higher like:
renice -20 -p 1735
renice -20 $(pidof appname)
|
2009-12-14
, 08:59
|
Posts: 44 |
Thanked: 0 times |
Joined on Jan 2009
|
#3
|
|
2009-12-14
, 09:02
|
Posts: 543 |
Thanked: 181 times |
Joined on Aug 2009
@ Universe,LocalCluster.MilkyWay.Sol.Earth.Europe.Slovenia.Ljubljana
|
#4
|
#!/bin/sh renice -20 $(pidof $1)
|
2009-12-14
, 16:13
|
Posts: 44 |
Thanked: 0 times |
Joined on Jan 2009
|
#5
|
|
2009-12-15
, 09:40
|
Posts: 543 |
Thanked: 181 times |
Joined on Aug 2009
@ Universe,LocalCluster.MilkyWay.Sol.Earth.Europe.Slovenia.Ljubljana
|
#6
|
sudo renice -20 $(pidof $1)
|
2009-12-16
, 19:58
|
Posts: 44 |
Thanked: 0 times |
Joined on Jan 2009
|
#7
|
|
2009-12-16
, 20:01
|
Posts: 236 |
Thanked: 223 times |
Joined on Oct 2009
@ NE UK
|
#8
|
I dont know the path of renice.
whereis command does not work. How to find out?
# which renice
/usr/bin/renice
|
2009-12-18
, 17:36
|
Posts: 44 |
Thanked: 0 times |
Joined on Jan 2009
|
#9
|
I have N810. How can I write a short script to do the following?
Get the pid of a process like:
ps | grep <your_app_name> | cut -b 1-5 | head -1
and then use that pid number in the 'renice' command to put the priority higher like:
renice -20 -p 1735