El 'parche milagro' de Linux realizado en 4 líneas de Bash

  1. #15   No tengo el directorio /sys/fs/cgroup/ al parecer habrá que instalar alguna cosilla, o recompilar el kernel, no?
    26  votos: 2   link
    el 20-11-2010 01:21 UTC por Brigo Brigo
     twitter  facebook  tuenti  
  1. #14   La noticia se supone que es el que alguien haya hecho algo similar en 4 líneas en BASH. Lo de la discusión es un tema a parte creo yo. Pero bueno, para todo propósito, sea el que sea, siempre hay excusa.

    #15 Igual de aquí sacas algo www.webupd8.org/2010/11/alternative-to-200-lines-kernel-patch.html
    41  votos: 4   link
    el 20-11-2010 01:21 UTC por hurd hurd
  2. #29   #15 goto #5, excusa ninguna, aunque está bién, hubiese sido realmente espectacular si lo hubiese hecho antes del parche de Linus.
    8  votos: 0   link
    el 20-11-2010 09:07 UTC por --52914-- --52914--
  3. #32   #8 goto #5

    y #5 si, justamente Linus comenta lo mismo pero de forma menos poética que tú xD

    Anyway, I find it depressing that now that this is solved, people come
    out of the woodwork and say "hey you could do this". Where were you
    guys a year ago or more?

    Tough. I found out that I can solve it using cgroups, I asked people
    to comment and help, and I think the kernel approach is wonderful and
    way simpler than the scripts I've seen. Yes, I'm biased ("kernels
    are easy - user space maintenance is a big pain").


    #15

    Simply edit your own ~/.bashrc and add this to the end:
    >
    > if [ "$PS1" ] ; then
    > mkdir -m 0700 /sys/fs/cgroup/cpu/user/$$
    > echo $$ > /sys/fs/cgroup/cpu/user/$$/tasks
    > fi
    >
    > Then, as the superuser do this:
    >
    > mount -t cgroup cgroup /sys/fs/cgroup/cpu -o cpu
    > mkdir -m 0777 /sys/fs/cgroup/cpu/user
    19  votos: 1   link
    el 20-11-2010 09:59 UTC por NazguL2 NazguL2
comentarios cerrados

menéame