Changes between Version 29 and Version 30 of TipAndDoc/Linux/LXC


Ignore:
Timestamp:
May 4, 2013 11:20:57 PM (11 years ago)
Author:
mitty
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TipAndDoc/Linux/LXC

    v29 v30  
    2020 * [http://www.mail-archive.com/lxc-users@lists.sourceforge.net/msg03671.html Re: (Lxc-users) loop mount inside container] 
    2121 * [http://serverfault.com/questions/475922/mounting-a-network-file-system-inside-lxc-on-ubuntu-12-10 Mounting a network file system inside LXC on Ubuntu 12.10 - Server Fault] 
    22  
    23  * github:vajtsz/munin-plugins 
    24  > Plugin to monitor LXC 
    2522 
    2623 * [http://sourceforge.net/tracker/?func=detail&atid=826303&aid=3595947&group_id=163076 SourceForge.net: Linux Containers: Detail: 3595947 - lxc-ip script to get IP addresses of the container] 
     
    512509 
    513510 * [[Image(lxde.png,33%)]] 
     511 
     512 = munin plugin = 
     513 * github:vajtsz/munin-plugins 
     514 
     515 == lxc_proc == 
     516 * github:vajtsz/munin-plugins/blob/6a426b4bde7addcaf42d72a033e713d0f11776c0/squeeze/lxc_proc 
     517  * Debian Squeezeと異なり、Ubuntu 12.04では{{{lxc-cgroup -t container_name tasks}}}が使えない 
     518 
     519 === Debian 6.0 === 
     520 * http://wiki.debian.org/LXC 
     521 > Add this line to /etc/fstab 
     522 > {{{ 
     523 > cgroup  /sys/fs/cgroup  cgroup  defaults  0   0 
     524 > }}} 
     525 > Try to mount it (a reboot solves an eventual "resource busy problem" in any case) 
     526 > {{{ 
     527 > mount /sys/fs/cgroup 
     528 > }}} 
     529 
     530 * $ sudo lxc-start -d -n lxc-test 
     531 * $ ls -1F /sys/fs/cgroup/ 
     532{{{ 
     533cgroup.procs 
     534cpuacct.stat 
     535cpuacct.usage 
     536cpuacct.usage_percpu 
     537cpuset.cpu_exclusive 
     538cpuset.cpus 
     539cpuset.mem_exclusive 
     540cpuset.mem_hardwall 
     541cpuset.memory_migrate 
     542cpuset.memory_pressure 
     543cpuset.memory_pressure_enabled 
     544cpuset.memory_spread_page 
     545cpuset.memory_spread_slab 
     546cpuset.mems 
     547cpuset.sched_load_balance 
     548cpuset.sched_relax_domain_level 
     549cpu.shares 
     550devices.allow 
     551devices.deny 
     552devices.list 
     553lxc-test/ 
     554net_cls.classid 
     555notify_on_release 
     556release_agent 
     557tasks 
     558}}} 
     559  * /sys/fs/cgroup/lxc-test/ も同じ構造 
     560 * $ sudo lxc-cgroup -n lxc-test tasks 
     561{{{ 
     5621432 
     5631569 
     5641571 
     5651598 
     566}}} 
     567 
     568 === Ubuntu 12.04 === 
     569 * Ubuntu 12.04 with {{{aptitude install -R lxc}}} 
     570  * cgroup関係のパッケージは{{{-R}}}をつけるとインストールされない 
     571 
     572 
     573 * Ubuntu 12.04 with /etc/fstab:{{{cgroup  /sys/fs/cgroup  cgroup  defaults  0   0}}} 
     574  * 起動時に自動でマウントされないため、{{{mount -a}}}する必要がある 
     575 * $ sudo mount -a 
     576 * $ ls -1F /sys/fs/cgroup/ 
     577{{{ 
     578blkio.io_merged 
     579blkio.io_queued 
     580blkio.io_service_bytes 
     581blkio.io_serviced 
     582blkio.io_service_time 
     583blkio.io_wait_time 
     584blkio.reset_stats 
     585blkio.sectors 
     586blkio.throttle.io_service_bytes 
     587blkio.throttle.io_serviced 
     588blkio.throttle.read_bps_device 
     589blkio.throttle.read_iops_device 
     590blkio.throttle.write_bps_device 
     591blkio.throttle.write_iops_device 
     592mitty@lein:~$ ls -1F /sys/fs/cgroup/ 
     593blkio.io_merged 
     594blkio.io_queued 
     595blkio.io_service_bytes 
     596blkio.io_serviced 
     597blkio.io_service_time 
     598blkio.io_wait_time 
     599blkio.reset_stats 
     600blkio.sectors 
     601blkio.throttle.io_service_bytes 
     602blkio.throttle.io_serviced 
     603blkio.throttle.read_bps_device 
     604blkio.throttle.read_iops_device 
     605blkio.throttle.write_bps_device 
     606blkio.throttle.write_iops_device 
     607blkio.time 
     608blkio.weight 
     609blkio.weight_device 
     610cgroup.clone_children 
     611cgroup.event_control 
     612cgroup.procs 
     613cpuacct.stat 
     614cpuacct.usage 
     615cpuacct.usage_percpu 
     616cpu.cfs_period_us 
     617cpu.cfs_quota_us 
     618cpu.rt_period_us 
     619cpu.rt_runtime_us 
     620cpuset.cpu_exclusive 
     621cpuset.cpus 
     622cpuset.mem_exclusive 
     623cpuset.mem_hardwall 
     624cpuset.memory_migrate 
     625cpuset.memory_pressure 
     626cpuset.memory_pressure_enabled 
     627cpuset.memory_spread_page 
     628cpuset.memory_spread_slab 
     629cpuset.mems 
     630cpuset.sched_load_balance 
     631cpuset.sched_relax_domain_level 
     632cpu.shares 
     633cpu.stat 
     634devices.allow 
     635devices.deny 
     636devices.list 
     637lxc/ 
     638memory.failcnt 
     639memory.force_empty 
     640memory.limit_in_bytes 
     641memory.max_usage_in_bytes 
     642memory.memsw.failcnt 
     643memory.memsw.limit_in_bytes 
     644memory.memsw.max_usage_in_bytes 
     645memory.memsw.usage_in_bytes 
     646memory.move_charge_at_immigrate 
     647memory.numa_stat 
     648memory.oom_control 
     649memory.soft_limit_in_bytes 
     650memory.stat 
     651memory.swappiness 
     652memory.usage_in_bytes 
     653memory.use_hierarchy 
     654notify_on_release 
     655release_agent 
     656tasks 
     657}}} 
     658  * /sys/fs/cgroup/lxc/, /sys/fs/cgroup/lxc/lxc-test/ も同じ構造 
     659 * $ sudo lxc-cgroup -n lxc-test tasks 
     660{{{ 
     661lxc-cgroup: cgroup is not mounted 
     662lxc-cgroup: failed to retrieve value of 'tasks' for 'lxc-test' 
     663}}} 
     664 * $ cat /sys/fs/cgroup/lxc/lxc-test/tasks 
     665{{{ 
     6662712 
     6672867 
     6682932 
     6692943 
     6702947 
     6712952 
     6722953 
     6732954 
     6742983 
     6753002 
     6763031 
     6773036 
     6783037 
     6793042 
     6803056 
     6813058 
     682}}}