2013-11-01

Slitaz -- lxc / HOST

HOST :

1.
root@slitaz:/home/tux# mount | grep cgroup
cgroup on /sys/fs/cgroup type cgroup (rw,relatime,blkio,net_cls,freezer,devices,memory,cpuacct,cpu,ns,cpuset)


2.
root@slitaz:/home/tux# lxc-info -n slitaz-lxc
'slitaz-lxc' is RUNNING


3.
root@slitaz:/home/tux# ps ax | tail -9
 1624 pts/3    S+     0:00 lxc-start -n slitaz-lxc
 1625 ?        Ss     0:00 init     
 1628 ?        Ss     0:00 /bin/syslogd
 1630 pts/4    Ss+    0:00 /bin/getty -L tty1 115200 vt100
 1631 pts/5    Ss+    0:00 /bin/sh
 1632 pts/1    S      0:00 sudo -s
 1633 pts/1    S      0:00 /bin/sh
 1662 pts/1    R+     0:00 ps ax
 1663 pts/1    S+     0:00 tail -9

root@slitaz:/home/tux# lxc-ps -n slitaz-lxc
CONTAINER    PID TTY          TIME CMD
            1632 pts/1    00:00:00 sudo
            1633 pts/1    00:00:00 sh
            1667 pts/1    00:00:00 lxc-ps
            1668 pts/1    00:00:00 ps


4.
root@slitaz:/home/tux# ls /sys/fs/cgroup
blkio.io_merged                  cpuset.memory_spread_slab
blkio.io_queued                  cpuset.mems
blkio.io_service_bytes           cpuset.sched_load_balance
blkio.io_serviced                cpuset.sched_relax_domain_level
blkio.io_service_time            cpu.shares
blkio.io_wait_time               devices.allow
blkio.reset_stats                devices.deny
blkio.sectors                    devices.list
blkio.time                       memory.failcnt
blkio.weight                     memory.force_empty
blkio.weight_device              memory.limit_in_bytes
cgroup.clone_children            memory.max_usage_in_bytes
cgroup.event_control             memory.memsw.failcnt
cgroup.procs                     memory.memsw.limit_in_bytes
cpuacct.stat                     memory.memsw.max_usage_in_bytes
cpuacct.usage                    memory.memsw.usage_in_bytes
cpuacct.usage_percpu             memory.move_charge_at_immigrate
cpu.rt_period_us                 memory.oom_control
cpu.rt_runtime_us                memory.soft_limit_in_bytes
cpuset.cpu_exclusive             memory.stat
cpuset.cpus                      memory.swappiness
cpuset.mem_exclusive             memory.usage_in_bytes
cpuset.mem_hardwall              memory.use_hierarchy
cpuset.memory_migrate            net_cls.classid
cpuset.memory_pressure           notify_on_release
cpuset.memory_pressure_enabled   release_agent
cpuset.memory_spread_page        tasks


5.
root@slitaz:/home/tux# cat /sys/fs/cgroup/memory.stat
cache 1361383424
rss 484990976
mapped_file 41578496
pgpgin 18986980
pgpgout 18536205
swap 0
inactive_anon 54640640
active_anon 485179392
inactive_file 937705472
active_file 368799744
unevictable 0
hierarchical_memory_limit 9223372036854775807
hierarchical_memsw_limit 9223372036854775807
total_cache 1361383424
total_rss 484990976
total_mapped_file 41578496
total_pgpgin 18986980
total_pgpgout 18536205
total_swap 0
total_inactive_anon 54640640
total_active_anon 485179392
total_inactive_file 937705472
total_active_file 368799744
total_unevictable 0
root@slitaz:/home/tux#