Is a cgroup a list of key value pairs or a set of processes?Does each directory under `/sys/fs/cgroup/` represent a cgroup hierarchy, or a controller?Do processes in cgroups have to be set every boot? If so, how to persist them?CGroup Processes Not Terminated even when main process has been killed through Systemctl stop commandHow to set a process’s sched method to fifo and priority when cgroup are on?Cannot set memory.memsw.limit_in_bytes in cgroup on Ubuntu server using cgmIs there a way to identify the PID (or cgroup) of a socket without iterating through all the processes in /proc/Place all processes belonging to user in a cgroupCould not find writable mount point for cgroup hierarchy 13 while trying to create cgroupCgroup memory.usage_in_bytes shows incorrect valueWhat's the Linux kernel's behaviour when processes in a cgroup hit their memory limit?How do I read the systemd MemoryHigh value from the /sys/fs/cgroup filesystem?

Can I legally use front facing blue light in the UK?

extract characters between two commas?

When blogging recipes, how can I support both readers who want the narrative/journey and ones who want the printer-friendly recipe?

What do the Banks children have against barley water?

Can I find out the caloric content of bread by dehydrating it?

Re-submission of rejected manuscript without informing co-authors

Is it wise to focus on putting odd beats on left when playing double bass drums?

Is Fable (1996) connected in any way to the Fable franchise from Lionhead Studios?

Need help identifying/translating a plaque in Tangier, Morocco

How could a lack of term limits lead to a "dictatorship?"

Can the Produce Flame cantrip be used to grapple, or as an unarmed strike, in the right circumstances?

Crop image to path created in TikZ?

Pristine Bit Checking

Check if two datetimes are between two others

Is this food a bread or a loaf?

Are objects structures and/or vice versa?

LWC and complex parameters

How did the USSR manage to innovate in an environment characterized by government censorship and high bureaucracy?

If a centaur druid Wild Shapes into a Giant Elk, do their Charge features stack?

What to wear for invited talk in Canada

Doomsday-clock for my fantasy planet

Is "plugging out" electronic devices an American expression?

What does it exactly mean if a random variable follows a distribution

Email Account under attack (really) - anything I can do?



Is a cgroup a list of key value pairs or a set of processes?


Does each directory under `/sys/fs/cgroup/` represent a cgroup hierarchy, or a controller?Do processes in cgroups have to be set every boot? If so, how to persist them?CGroup Processes Not Terminated even when main process has been killed through Systemctl stop commandHow to set a process’s sched method to fifo and priority when cgroup are on?Cannot set memory.memsw.limit_in_bytes in cgroup on Ubuntu server using cgmIs there a way to identify the PID (or cgroup) of a socket without iterating through all the processes in /proc/Place all processes belonging to user in a cgroupCould not find writable mount point for cgroup hierarchy 13 while trying to create cgroupCgroup memory.usage_in_bytes shows incorrect valueWhat's the Linux kernel's behaviour when processes in a cgroup hit their memory limit?How do I read the systemd MemoryHigh value from the /sys/fs/cgroup filesystem?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








-1















I get the idea that a cgroup is a set of processes satisfying some conditions, from http://man7.org/linux/man-pages/man7/cgroups.7.html




A cgroup is a collection of processes that are bound to a set of
limits or parameters defined via the cgroup filesystem.




Am I correct that to find out the cgroup of a process with a givn PID, just run



$ cat /proc/11/cgroup
12:perf_event:/
11:blkio:/
10:hugetlb:/
9:freezer:/
8:pids:/
7:cpuset:/
6:devices:/
5:cpu,cpuacct:/
4:rdma:/
3:memory:/
2:net_cls,net_prio:/
1:name=systemd:/
0::/


I thought cgroup is a id number. but it is a list of key value pairs.
Does the above list of key value pairs represent a list of processes?



Can I find out all the processes in the same cgroup?



Thanks.










share|improve this question






























    -1















    I get the idea that a cgroup is a set of processes satisfying some conditions, from http://man7.org/linux/man-pages/man7/cgroups.7.html




    A cgroup is a collection of processes that are bound to a set of
    limits or parameters defined via the cgroup filesystem.




    Am I correct that to find out the cgroup of a process with a givn PID, just run



    $ cat /proc/11/cgroup
    12:perf_event:/
    11:blkio:/
    10:hugetlb:/
    9:freezer:/
    8:pids:/
    7:cpuset:/
    6:devices:/
    5:cpu,cpuacct:/
    4:rdma:/
    3:memory:/
    2:net_cls,net_prio:/
    1:name=systemd:/
    0::/


    I thought cgroup is a id number. but it is a list of key value pairs.
    Does the above list of key value pairs represent a list of processes?



    Can I find out all the processes in the same cgroup?



    Thanks.










    share|improve this question


























      -1












      -1








      -1








      I get the idea that a cgroup is a set of processes satisfying some conditions, from http://man7.org/linux/man-pages/man7/cgroups.7.html




      A cgroup is a collection of processes that are bound to a set of
      limits or parameters defined via the cgroup filesystem.




      Am I correct that to find out the cgroup of a process with a givn PID, just run



      $ cat /proc/11/cgroup
      12:perf_event:/
      11:blkio:/
      10:hugetlb:/
      9:freezer:/
      8:pids:/
      7:cpuset:/
      6:devices:/
      5:cpu,cpuacct:/
      4:rdma:/
      3:memory:/
      2:net_cls,net_prio:/
      1:name=systemd:/
      0::/


      I thought cgroup is a id number. but it is a list of key value pairs.
      Does the above list of key value pairs represent a list of processes?



      Can I find out all the processes in the same cgroup?



      Thanks.










      share|improve this question
















      I get the idea that a cgroup is a set of processes satisfying some conditions, from http://man7.org/linux/man-pages/man7/cgroups.7.html




      A cgroup is a collection of processes that are bound to a set of
      limits or parameters defined via the cgroup filesystem.




      Am I correct that to find out the cgroup of a process with a givn PID, just run



      $ cat /proc/11/cgroup
      12:perf_event:/
      11:blkio:/
      10:hugetlb:/
      9:freezer:/
      8:pids:/
      7:cpuset:/
      6:devices:/
      5:cpu,cpuacct:/
      4:rdma:/
      3:memory:/
      2:net_cls,net_prio:/
      1:name=systemd:/
      0::/


      I thought cgroup is a id number. but it is a list of key value pairs.
      Does the above list of key value pairs represent a list of processes?



      Can I find out all the processes in the same cgroup?



      Thanks.







      cgroups






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 5 at 18:27









      Stephen Kitt

      180k25411491




      180k25411491










      asked Apr 5 at 17:52









      TimTim

      28.5k79269491




      28.5k79269491




















          1 Answer
          1






          active

          oldest

          votes


















          2














          As indicated in the manual page you’re referring to, a cgroup is a set of processes.



          The contents of /proc/11/cgroup describe all the control groups to which process 11 belongs. For v1 groups, the first field on each line is the hierarchy id, the second is the list of controllers, and the third is the pathname of the cgroup in the hierarchy. For v2 groups, the first field is 0, the second is empty, and the third is the pathname.



          To find all the processes in a cgroup, look at the tasks file in the corresponding sysfs directory, for example



          cat /sys/fs/cgroup/perf_event/tasks


          which corresponds to 12:perf_event:/:



          | /sys/fs/cgroup/ | perf_event | / | tasks
          | | | |
          |< mountpoint >|<controller>| ^ |
          |
          cgroup pathname --+





          share|improve this answer

























          • Thanks. perf_event isn't a cgroup but a controller. So /sys/fs/cgroup/perf_event/tasks seems to find all processes for a controller

            – Tim
            Apr 5 at 23:44











          • You’re forgetting the third field in 12:perf_event:/.

            – Stephen Kitt
            2 days ago











          • (1) The third field is "the pathname of the cgroup in the hierarchy", here /. Is it a relative pathname with respect to some other pathname? (2) Does /sys/fs/cgroup/perf_event/tasks depend on the third field? also on the second field, which is a list of controllers?

            – Tim
            yesterday












          • I posted a related post unix.stackexchange.com/questions/511066/…

            – Tim
            yesterday











          • You really don’t see how /sys/fs/cgroup/perf_event/tasks is contructed, based on the information in 12:perf_event:/?

            – Stephen Kitt
            yesterday











          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f510774%2fis-a-cgroup-a-list-of-key-value-pairs-or-a-set-of-processes%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          As indicated in the manual page you’re referring to, a cgroup is a set of processes.



          The contents of /proc/11/cgroup describe all the control groups to which process 11 belongs. For v1 groups, the first field on each line is the hierarchy id, the second is the list of controllers, and the third is the pathname of the cgroup in the hierarchy. For v2 groups, the first field is 0, the second is empty, and the third is the pathname.



          To find all the processes in a cgroup, look at the tasks file in the corresponding sysfs directory, for example



          cat /sys/fs/cgroup/perf_event/tasks


          which corresponds to 12:perf_event:/:



          | /sys/fs/cgroup/ | perf_event | / | tasks
          | | | |
          |< mountpoint >|<controller>| ^ |
          |
          cgroup pathname --+





          share|improve this answer

























          • Thanks. perf_event isn't a cgroup but a controller. So /sys/fs/cgroup/perf_event/tasks seems to find all processes for a controller

            – Tim
            Apr 5 at 23:44











          • You’re forgetting the third field in 12:perf_event:/.

            – Stephen Kitt
            2 days ago











          • (1) The third field is "the pathname of the cgroup in the hierarchy", here /. Is it a relative pathname with respect to some other pathname? (2) Does /sys/fs/cgroup/perf_event/tasks depend on the third field? also on the second field, which is a list of controllers?

            – Tim
            yesterday












          • I posted a related post unix.stackexchange.com/questions/511066/…

            – Tim
            yesterday











          • You really don’t see how /sys/fs/cgroup/perf_event/tasks is contructed, based on the information in 12:perf_event:/?

            – Stephen Kitt
            yesterday















          2














          As indicated in the manual page you’re referring to, a cgroup is a set of processes.



          The contents of /proc/11/cgroup describe all the control groups to which process 11 belongs. For v1 groups, the first field on each line is the hierarchy id, the second is the list of controllers, and the third is the pathname of the cgroup in the hierarchy. For v2 groups, the first field is 0, the second is empty, and the third is the pathname.



          To find all the processes in a cgroup, look at the tasks file in the corresponding sysfs directory, for example



          cat /sys/fs/cgroup/perf_event/tasks


          which corresponds to 12:perf_event:/:



          | /sys/fs/cgroup/ | perf_event | / | tasks
          | | | |
          |< mountpoint >|<controller>| ^ |
          |
          cgroup pathname --+





          share|improve this answer

























          • Thanks. perf_event isn't a cgroup but a controller. So /sys/fs/cgroup/perf_event/tasks seems to find all processes for a controller

            – Tim
            Apr 5 at 23:44











          • You’re forgetting the third field in 12:perf_event:/.

            – Stephen Kitt
            2 days ago











          • (1) The third field is "the pathname of the cgroup in the hierarchy", here /. Is it a relative pathname with respect to some other pathname? (2) Does /sys/fs/cgroup/perf_event/tasks depend on the third field? also on the second field, which is a list of controllers?

            – Tim
            yesterday












          • I posted a related post unix.stackexchange.com/questions/511066/…

            – Tim
            yesterday











          • You really don’t see how /sys/fs/cgroup/perf_event/tasks is contructed, based on the information in 12:perf_event:/?

            – Stephen Kitt
            yesterday













          2












          2








          2







          As indicated in the manual page you’re referring to, a cgroup is a set of processes.



          The contents of /proc/11/cgroup describe all the control groups to which process 11 belongs. For v1 groups, the first field on each line is the hierarchy id, the second is the list of controllers, and the third is the pathname of the cgroup in the hierarchy. For v2 groups, the first field is 0, the second is empty, and the third is the pathname.



          To find all the processes in a cgroup, look at the tasks file in the corresponding sysfs directory, for example



          cat /sys/fs/cgroup/perf_event/tasks


          which corresponds to 12:perf_event:/:



          | /sys/fs/cgroup/ | perf_event | / | tasks
          | | | |
          |< mountpoint >|<controller>| ^ |
          |
          cgroup pathname --+





          share|improve this answer















          As indicated in the manual page you’re referring to, a cgroup is a set of processes.



          The contents of /proc/11/cgroup describe all the control groups to which process 11 belongs. For v1 groups, the first field on each line is the hierarchy id, the second is the list of controllers, and the third is the pathname of the cgroup in the hierarchy. For v2 groups, the first field is 0, the second is empty, and the third is the pathname.



          To find all the processes in a cgroup, look at the tasks file in the corresponding sysfs directory, for example



          cat /sys/fs/cgroup/perf_event/tasks


          which corresponds to 12:perf_event:/:



          | /sys/fs/cgroup/ | perf_event | / | tasks
          | | | |
          |< mountpoint >|<controller>| ^ |
          |
          cgroup pathname --+






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited yesterday

























          answered Apr 5 at 18:37









          Stephen KittStephen Kitt

          180k25411491




          180k25411491












          • Thanks. perf_event isn't a cgroup but a controller. So /sys/fs/cgroup/perf_event/tasks seems to find all processes for a controller

            – Tim
            Apr 5 at 23:44











          • You’re forgetting the third field in 12:perf_event:/.

            – Stephen Kitt
            2 days ago











          • (1) The third field is "the pathname of the cgroup in the hierarchy", here /. Is it a relative pathname with respect to some other pathname? (2) Does /sys/fs/cgroup/perf_event/tasks depend on the third field? also on the second field, which is a list of controllers?

            – Tim
            yesterday












          • I posted a related post unix.stackexchange.com/questions/511066/…

            – Tim
            yesterday











          • You really don’t see how /sys/fs/cgroup/perf_event/tasks is contructed, based on the information in 12:perf_event:/?

            – Stephen Kitt
            yesterday

















          • Thanks. perf_event isn't a cgroup but a controller. So /sys/fs/cgroup/perf_event/tasks seems to find all processes for a controller

            – Tim
            Apr 5 at 23:44











          • You’re forgetting the third field in 12:perf_event:/.

            – Stephen Kitt
            2 days ago











          • (1) The third field is "the pathname of the cgroup in the hierarchy", here /. Is it a relative pathname with respect to some other pathname? (2) Does /sys/fs/cgroup/perf_event/tasks depend on the third field? also on the second field, which is a list of controllers?

            – Tim
            yesterday












          • I posted a related post unix.stackexchange.com/questions/511066/…

            – Tim
            yesterday











          • You really don’t see how /sys/fs/cgroup/perf_event/tasks is contructed, based on the information in 12:perf_event:/?

            – Stephen Kitt
            yesterday
















          Thanks. perf_event isn't a cgroup but a controller. So /sys/fs/cgroup/perf_event/tasks seems to find all processes for a controller

          – Tim
          Apr 5 at 23:44





          Thanks. perf_event isn't a cgroup but a controller. So /sys/fs/cgroup/perf_event/tasks seems to find all processes for a controller

          – Tim
          Apr 5 at 23:44













          You’re forgetting the third field in 12:perf_event:/.

          – Stephen Kitt
          2 days ago





          You’re forgetting the third field in 12:perf_event:/.

          – Stephen Kitt
          2 days ago













          (1) The third field is "the pathname of the cgroup in the hierarchy", here /. Is it a relative pathname with respect to some other pathname? (2) Does /sys/fs/cgroup/perf_event/tasks depend on the third field? also on the second field, which is a list of controllers?

          – Tim
          yesterday






          (1) The third field is "the pathname of the cgroup in the hierarchy", here /. Is it a relative pathname with respect to some other pathname? (2) Does /sys/fs/cgroup/perf_event/tasks depend on the third field? also on the second field, which is a list of controllers?

          – Tim
          yesterday














          I posted a related post unix.stackexchange.com/questions/511066/…

          – Tim
          yesterday





          I posted a related post unix.stackexchange.com/questions/511066/…

          – Tim
          yesterday













          You really don’t see how /sys/fs/cgroup/perf_event/tasks is contructed, based on the information in 12:perf_event:/?

          – Stephen Kitt
          yesterday





          You really don’t see how /sys/fs/cgroup/perf_event/tasks is contructed, based on the information in 12:perf_event:/?

          – Stephen Kitt
          yesterday

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f510774%2fis-a-cgroup-a-list-of-key-value-pairs-or-a-set-of-processes%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

          Cannot Extend partition with GParted The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election ResultsCan't increase partition size with GParted?GParted doesn't recognize the unallocated space after my current partitionWhat is the best way to add unallocated space located before to Ubuntu 12.04 partition with GParted live?I can't figure out how to extend my Arch home partition into free spaceGparted Linux Mint 18.1 issueTrying to extend but swap partition is showing as Unknown in Gparted, shows proper from fdiskRearrange partitions in gparted to extend a partitionUnable to extend partition even though unallocated space is next to it using GPartedAllocate free space to root partitiongparted: how to merge unallocated space with a partition

          Marilyn Monroe Ny fiainany manokana | Jereo koa | Meny fitetezanafanitarana azy.