Is there any way to run the daemon without reboot ?
Regards krisik28
Is there any way to run the daemon without reboot ?
Regards krisik28
Hi,
have you read my first post, there is chapter "4. MANUALLY CHECK, STOP, START AND RESTART DAEMON".
Regards
*bump*
hi mate.
first of all, thanks for sharing this script, really handy!
but can you explain a bit more about the blacklist function?
i couldn't get it working
my intention is to limit a certain php script process, i'm running kloxo as the control panel
so my command goes like this:
it doesn't work with blacklist function, cpulimit just wont run.Code:lxsuexec /path/to/script.php
but if i let the daemon limit all process, it works fine.
it just didn't work with blacklist function. i put something like this on the script:
thanks in advance for any repliesCode:CPU_LIMIT=10 # Maximum percentage CPU consumption by each PID DAEMON_INTERVAL=3 # Daemon check interval in seconds BLACK_PROCESSES_LIST= "lxsuexec /path/to/script.php" # Limit only processes defined in this variable. If variable is empty (default) all violating processes are limited. WHITE_PROCESSES_LIST= # Limit all processes except processes defined in this variable. If variable is empty (default) all violating processes are limited.
Hi,
I assume your exact command is not displayed by top command or is displayed something else. Try the following.
Run you command from terminal:
and then run following command in another terminal:Code:lxsuexec /path/to/script.php
and search for your command in the Command column. Do you see "lxsuexec /path/to/script.php" string in Command column? If no, then you have to find a command in Command column that matches your command.Code:top -b -n1 -c
Then write output (or part of output) of your command from Command column in BLACK_PROCESS_LIST variable.
Hope this helps,
Abcuser
Last edited by abcuser; September 15th, 2009 at 08:21 PM.
hi thanks for replying
i ranand it was displayed exactly asCode:top -b -n1 -c
i tried to run cpulimit command directly without script, it's working fine the limit appliedCode:lxsuexec /path/to/script.php
Code:cpulimit -p $( ps -eo pid,args | grep "lxsuexec /path/to/script.php" | grep -v grep | gawk '{print $1}' ) -l 5 -z &
Hi,
daemon is written for the processes that you don't know when they start-up. If you know when the process starts up, you can manually execute cpulimit command, so no need for daemon.
Regards
actually i don't know when the command will be executed mate, i got some clients who will run this script on my server whenever they'd like to and each client has their own directory with a copy of this script. the script itself is a client-side script to transfer file remotely, so whenever the transfer is done the script then will terminate itself.
the thing is i have some clients who tend to run this script much and it uses huge CPU resource.
so what i'd like to do basically is to put some of these clients on a blacklist for cpulimit.
when I try to set WHITE_PROCESSES_LIST it does not work. I try to set it so that it does not limit npviewer.bin (flash). I want to do this because when you limit cpu of flash the videos don't play smoothly. Can you please help me?
thanks
Last edited by kut77less; October 18th, 2009 at 11:01 PM.
kut77less, when you run your flash program, try to execute command:
Do you see this program in this list of processes? Try to write exactly what you get from top command.Code:top -b -n1 -c
When I use that command I can see that it is this command
But When I put the in the white list it still limits the CPU/usr/lib/nspluginwrapper/i386/linux/npviewer.bin --plugin /usr/lib/flashplugin-installer/libflashplayer.so --connection /org/wrapper/NSPlugins/libflashplayer.so/5193-2
Any suggestions?
Thanks for all your help by the way.
Bookmarks