Hallo @ All,
ich wollte mal fragen wie ich es am besten umsetzte wenn ich ein bestimmten Prozess der von einen User kommt in sachen CPU limitieren kann.
Durch Google bin ich auf z.b. cpulimit -p 1313 -l 30 gestoßen - wenn ich die pid oder den filepfad nehme haut das auch hin jedoch würde ich gern
diesen befehl dauerhaft im hintergund nutzen z.b. über screen.
Hätte da der ein oder andere vllt. ein Tipp für mich ?
Gruß Aschti
CPUlimit
Re: CPUlimit
cronjob und alle paar Minuten sämtliche Prozesse des Benutzers neu begrenzen? Falls es automatisch die Kindprozesse betrifft, einen Eintrag in ~/.bashrc, ~/.profile... etc?
Gruß Cae
Gruß Cae
If universal surveillance were the answer, lots of us would have moved to the former East Germany. If surveillance cameras were the answer, camera-happy London, with something like 500,000 of them at a cost of $700 million, would be the safest city on the planet.
—Bruce Schneier
Re: CPUlimit
hi,
mit inotify-tools könnte es so ähnlich funktionieren:
mit inotify-tools könnte es so ähnlich funktionieren:
Code: Alles auswählen
#!/bin/sh
PROG="/usr/bin/das_fragliche_programm"
while true; do
inotifywait -e open $PROG
# sleep 3 # doof und hoffentlich nicht noetig
cpulimit -P $PROG -l 30
done
Beware of programmers who carry screwdrivers.
Re: CPUlimit
schonmal danke für die tipps ich werde es gleich mal nach feierabend austesten, werde dann berichten
Re: CPUlimit
servus, da die anderen zipps zwar gut waren aber nicht so funktionieren wollten,
bin ich letzte woche auf http://ubuntuforums.org/showthread.php?t=992706 gestoßen damit hat das alles funktioniert wie vorgestellt.
gruß aschti
bin ich letzte woche auf http://ubuntuforums.org/showthread.php?t=992706 gestoßen damit hat das alles funktioniert wie vorgestellt.
gruß aschti