Active Topics

 


Reply
Thread Tools
Posts: 28 | Thanked: 1 time | Joined on Jan 2008
#1
Hi,
I searched for it, but i didn't find a solution.

Is it possible to start media-players (i.e. vagalume) with high priority, so that it will not be interupted while playback?
Because if I do some other things the music sometimes stops playing for a few ms.

And if it is possible, can I add an icon to do it easily without entering the shell?

thanks for your help...
 
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#2
I was looking into this.

The nice (start a process with high priory) binary doesn't exist for busybox, so what you can do is use renice (change a running processes priority).

renice is a bit odd, I haven't figured it out.
But you can make a script that will start vagalume and renice it and edit sudo so you can renice without a password (you need to be root to set high priority) and then edit the desktop file to run that script.

But of course, you will have to enter shell to set it up.

Another way is to edit sudoers to let you use renice and set up a renice command that you run after vagalume is started via a personal menu or osso-status bar.
 
Posts: 28 | Thanked: 1 time | Joined on Jan 2008
#3
i have also thought of adding a command to osso-status bar.

but don't I need the process id, when i use the command?
or doesn't the pid changes after a restart of an application?

So I can't do it without a script, right?

do you know how to find out the pid of an application in a script and insert it in the renice command?

Last edited by locutus; 2008-04-12 at 10:32.
 
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#4
Oh yes, I remember that :P

Basically you can do this in your script:
vagalume && renice <insert all the right stuff> `pidof vagalume`

``'s in a script execute a command as an artument, pidof vagalume returns the pid of vagalume which renice uses.

So the pid doesn't matter.
 
Posts: 28 | Thanked: 1 time | Joined on Jan 2008
#5
Somehow the output of "top" and "ps -axl" doesn't show me the priority of the processes.

So I don't know if it worked right, because I have still a lag in music playback.
Maybe the reason is the lack of memory.
I get the following output of top:
Code:
Mem: 123368K used, 3460K free, 0K shrd, 1852K buff, 59408K cached
Load average: 0.50 0.77 0.91
  PID USER     STATUS   VSZ  PPID %CPU %MEM COMMAND
11970 user     SW     69668     1  1.5 54.8 vagalume
12310 root     RW      1960 12282  0.7  1.5 top
 1343 user     SW<    78460     1  0.3 61.7 python
  853 root     SW<    14248   345  0.3 11.2 Xomap
12200 root     SW      5776   840  0.1  4.5 sshd
   78 root     SW<        0     6  0.1  0.0 OMAP McSPI/0
  455 root     SW<        0     6  0.1  0.0 cx3110x
  899 root     SW<        0     6  0.1  0.0 dsp/0
 1338 user     SW     51488     1  0.0 40.5 gnome-vfs-daemo
 1224 user     SW<    42008   345  0.0 33.0 osso-media-serv
 9359 user     SW<    35436  9259  0.0 27.9 maemo-launcher
 9291 user     SW<    29588  9259  0.0 23.2 maemo-launcher
 1239 systemui SW<    26268   345  0.0 20.6 systemui
 9551 user     SW<    20856  9259  0.0 16.4 maemo-launcher
 9259 user     SW<    19208     1  0.0 15.1 maemo-launcher
 1323 user     SWN    16188   345  0.0 12.7 metalayer-crawl
 9638 user     SW     16100   345  0.0 12.6 mediaplayer-eng
 9791 user     SW     14724     1  0.0 11.5 e-addressbook-f
Do you know why the %MEM values are so high? If I sum them up I get more than 200%.
Is it normal that so much memory is cached?
 
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#6
I'm.not sure. Vagalume is.streaming so there may be network lag.

Here is my output on a cleanly flashed N800:
Mem: 113272K used, 13184K free, 0K shrd, 8K buff, 33304
Load average: 1.10 1.17 1.17
PID USER STATUS VSZ PPID %CPU %MEM COMMAND 1674 user SW 22240 984 2.1 17.5 maemo-launch 1677 user RW 1960 1675 1.7 1.5 top
780 root SW< 14956 341 0.7 11.8 Xomap
79 root SW< 0 6 0.7 0.0 OMAP McSPI/0Mem: 117304K used, 9152K free, 0K shrd, 8K buff, 37084K
Load average: 1.10 1.16 1.17
PID USER STATUS VSZ PPID %CPU %MEM COMMAND
^[[7m PID USER STATUS VSZ PPID %CPU %MEM COMMAND 1679 user RW 1884 1675 3.8 1.4 top
1641 user SW 132M 1 0.0106.9 browser
1294 user SW 51312 1 0.0 40.5 gnome-vfs-da 1171 user SW< 46424 341 0.0 36.6 osso-media-s 1063 user SW< 31108 984 0.0 24.5 maemo-launch 79 root SW< 0 6 1.3 0.0 OMAP McSPI/0 811 user SW< 2048 341 0.3 1.6 dbus-daemon
1219 user SW 5228 341 0.1 4.1 alarmd 406 root SW< 0 6 0.1 0.0 cx3110x
1641 user SW 132M 1 0.0106.9 browser^M
 
Posts: 28 | Thanked: 1 time | Joined on Jan 2008
#7
i don't think that it is a connection problem, because it occurs only when I do something in other application. Sometimes even if I only want to ractivate the background light and click on an empty place on the screen.
But this is only if i have other applications running.

So i think it has to be CPU or memory.
 
Posts: 191 | Thanked: 29 times | Joined on Sep 2007 @ Ottawa
#8
Originally Posted by locutus View Post
Somehow the output of "top" and "ps -axl" doesn't show me the priority of the processes.
ps is a brain dead version (busybox) of the real ps command. You can find the real version of ps here:
http://www.makikiweb.com/n800/downlo....2.7.armel.deb

You can find the PID of your applicaiton with the following command:
ps | grep <your_app_name> | cut -b 1-5 | head -1

Hope this helps,

Craig...
__________________
N800, Think Outside Kbd, 8GB SDHC Card (OCZ, ext2), and 8GB SD Card (Patriot formatted as VFAT)
Zaurus SL-6000, IR Keyboard, 1GB SD Card
 

The Following 4 Users Say Thank You to cvmiller For This Useful Post:
Posts: 28 | Thanked: 1 time | Joined on Jan 2008
#9
and how can i get the process priority with this version of ps?
is it possible with this version?
 
Posts: 191 | Thanked: 29 times | Joined on Sep 2007 @ Ottawa
#10
Originally Posted by locutus View Post
and how can i get the process priority with this version of ps?
is it possible with this version?
Good question. Don't know. But the top (called rtop for real top) will show priority.

Hope this helps,

Craig...
__________________
N800, Think Outside Kbd, 8GB SDHC Card (OCZ, ext2), and 8GB SD Card (Patriot formatted as VFAT)
Zaurus SL-6000, IR Keyboard, 1GB SD Card
 

The Following User Says Thank You to cvmiller For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 19:12.