Welcome to the Linux Foundation Forum!

Chapter 3 - Lab: cgroup

Robson EstevesRobson Esteves Posts: 20
edited May 2017 in LFS253 Class Forum

Hi,

i'm running the chapter 3 Labs and in the CGROUPS Lab section, I can't find the package cgroup-tools. The message received indicates that was unable to locate the cgroup-tools after apt install cgroup-tools. Could you help me?

 

BR,

Robson

  

Comments

  • nkharenkhare Posts: 9
    edited May 2017

    Hi Robson, 

    As mentioned in earlier comment sometimes you might need to update the package index with following command to refresh the package list :-

    $ apt update 

    Please run the above command and then try just installing "cgroups-tools" package. 

    Thanks for reporting the issues. May be we should to add "apt update" instruction before installing any packages on Ubuntu 16.04. 

     

    Thanks. 

    Neependra

     

  • Done and solved! Thanks Neependra!

    Robson

  • AlexeyBYAlexeyBY Posts: 5
    edited February 9

    Hi all,

    I'm doing the cgroups part of the labs.

    Come back to the previous terminal and, in the tasks file, append the PID which we got in previous step:
    $ pwd
    /sys/fs/cgroup/freezer/mycgroup

    $ echo 6664 >> tasks

    The result of the "echo" is -->> "-bash: tasks: Permission denied". I tried with and without sudo.
    I'm using my own Ubunty (not DigitalOcean) 16.04.6 LTS (Xenial Xerus) and 18.04.4 LTS (Bionic Beaver).

    It's Ok to freeze the process on my CentOS7 !

    Probably the root of the issue is Ubuntu where it's impossible to work under root....

    Could you help me to solve the issue.
    Alexey

  • Hi @AlexeyBY,

    Here is a link which explains how to use sudo to run commands as root, and how to use sudo -i to become root:
    https://help.ubuntu.com/community/RootSudo
    Once you become root, you should be able to run the echo ... command.

    Another resource explains again how to run echo as root and with sudo:
    https://askubuntu.com/questions/230476/how-to-solve-permission-denied-when-using-sudo-with-redirection-in-bash

    Good luck!
    -Chris

  • RachelChanRachelChan Posts: 6

    for the command 'apt install -y cgroup-tools', what does the -y flag do?

  • RachelChanRachelChan Posts: 6

    Nevermind- found it. The -y option assumes yes to all prompts.
    http://manpages.ubuntu.com/manpages/bionic/man8/apt-get.8.html

Sign In or Register to comment.