I ll print it out
and I ll try it.
Thank Yu
Sophie
Von: Curt <curty@free.fr>
Gesendet: Sonntag, 20. November 2022 20:46 An: debian-user@lists.debian.org <debian-user@lists.debian.org> Betreff: Re: AW: FIREFOX is killing the whole PC Part III On 2022-11-20, Schwibinger Michael <hbss@hotmail.com> wrote:
> > To avoid problems by surfing > I tried > nice. > No good enough. > > I did try > > nice -n 19 chromium-browser > cpulimit -e chrome -l 30 > > But this also did not work, > cause URLS do open other URLs. > > I found this. > > 2 Questions: > > What does it do? > > Why does it not work. > > > # Find and limit all child processes of all browsers. > for name in firefox firefox-esr chromium chrome > do > for ppid in $(pgrep "$name") > do > cpulimit --pid="$ppid" --limit"$LIMIT" & > for pid in "$ppid" $(pgrep --parent "$ppid") > do > cpulimit --pid="$pid" --limit"$LIMIT" & > done > done > done > > Regards Sophie I suppose it does what it says in the comment at the front, and fails to work because you need to define $LIMIT beforehand. -l, --limit=N percentage of CPU allowed from 1 up. Usually 1 - 100, but can be higher on multi-core CPUs. (mandatory) # cpulimit -l 20 firefox Launch Firefox web browser and limit its CPU usage to 20% |