Results 1 to 9 of 9

Thread: Please help me with this rc.local script

  1. #1
    Join Date
    Jan 2006
    Location
    Istanbul
    Beans
    394
    Distro
    Xubuntu 12.04 Precise Pangolin

    Please help me with this rc.local script

    Code:
    #!/bin/sh -e
    #
    # rc.local
    #
    # This script is executed at the end of each multiuser runlevel.
    # Make sure that the script will "exit 0" on success or any other
    # value on error.
    #
    # In order to enable or disable this script just change the execution
    # bits.
    #
    # By default this script does nothing.
    
    chrt -f -p 95 5
    chrt -f -p 95 11
    chrt -f -p 95 19
    chrt -f -p 95 25
    chrt -f -p 95 772
    
    chrt -f -p 90 1552
    
    exit 0
    I can succesfully increase the priorities of the first five processes (timers) as their process ids don't change with boot, but the last id changes with every boot (soundcard driver). How can I change the last line of the script to find out the process id of the alsa driver? (module name is ICE1724). Thanks.
    ____________________ooOOoo____________________
    GREETINGS FROM ISTANBUL
    ____________________ooOOoo____________________


  2. #2
    Join Date
    Jan 2006
    Location
    Istanbul
    Beans
    394
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Please help me with this rc.local script

    anyone pliiiiz 'elp meee!
    ____________________ooOOoo____________________
    GREETINGS FROM ISTANBUL
    ____________________ooOOoo____________________


  3. #3
    Join Date
    Apr 2006
    Location
    Vancouver, Canada
    Beans
    1,856
    Distro
    Ubuntu 14.10 Utopic Unicorn

    Re: Please help me with this rc.local script

    Moved to Programming Talk, as many more bash experts will be able to help you here.
    What makes a great open source contributor is not primarily the brilliance of their ideas or importance of their bug, but rather their willingness to see it through to success.

  4. #4
    Join Date
    Jan 2006
    Location
    Istanbul
    Beans
    394
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Please help me with this rc.local script

    Bump
    ____________________ooOOoo____________________
    GREETINGS FROM ISTANBUL
    ____________________ooOOoo____________________


  5. #5
    Join Date
    Jun 2009
    Location
    0000:0400
    Beans
    Hidden!

    Re: Please help me with this rc.local script

    If you know the name of a process, you can use pgrep to find the process ID, ergo:
    Code:
    chrt -f -p 90 `pgrep name-of-program`
    Those backquotes (to the left of your 1 key) are necessary.

    This seems... dangerous and unnecessary. What are you trying to accomplish?

  6. #6
    Join Date
    Jan 2006
    Location
    Istanbul
    Beans
    394
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Please help me with this rc.local script

    I'm willing to increase the priority of system timers and my soundcard driver. Hoping this will provide a more sane rt environment for studio work. So you say it's dangerous... What could be the consequences?

    Thanks for your info and stochastic for moving the thread to programming talk.
    ____________________ooOOoo____________________
    GREETINGS FROM ISTANBUL
    ____________________ooOOoo____________________


  7. #7
    Join Date
    Jun 2009
    Location
    0000:0400
    Beans
    Hidden!

    Re: Please help me with this rc.local script

    Altering behavior and priorities of processes, especially system processes, can lead to instability. You do have a legit reason for wanting to do so, though. Save your work often

  8. #8
    Join Date
    Oct 2007
    Beans
    1,914
    Distro
    Lubuntu 12.10 Quantal Quetzal

    Re: Please help me with this rc.local script

    It should be enough to alter the process priorities *once* after the system has booted. Is there a special reason why you do it at every run-level?

  9. #9
    Join Date
    Jan 2006
    Location
    Istanbul
    Beans
    394
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Please help me with this rc.local script

    Is there a special reason why you do it at every run-level?
    The process ids of realtime processes default to 50 with every boot.

    The reason why I need to increase the priority of my soundcard is no matter what I do in BIOS ubuntu gives IRQ number 18 to my soundcard and its a bad number for realtime audio work. So I have to hack the driver priority to remedy this problem.

    edit: by the way this hack works quite well.. ) cheerz!
    Last edited by barisurum; October 30th, 2009 at 03:47 PM.
    ____________________ooOOoo____________________
    GREETINGS FROM ISTANBUL
    ____________________ooOOoo____________________


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •