前回でKernel 3.8.13ベースのソースコードと対応の取れた起動環境の構築ができた。
最近ではBBB用のもっと新しいKernelバージョンがリリースされているが、いたずらに最新版を追い求めてもハマるもとであるので とりあえずこのバージョンを開発ベースとし、必要に応じてKernelのバージョンアップを行う。
今回は各種環境情報を取得し、記録として残す事を目的とする。
/dev のリストから
debian@beaglebone:/mnt/hostnfs$ ls -la /dev/ total 4 drwxr-xr-x 13 root root 3540 May 15 2014 . drwxr-xr-x 22 root root 4096 May 15 2014 .. crw-rw---T+ 1 root audio 14, 4 Jan 1 2000 audio crw------- 1 root root 10, 235 Jan 1 2000 autofs drwxr-xr-x 2 root root 680 Jan 1 2000 block crw------T 1 root root 10, 234 Jan 1 2000 btrfs-control drwxr-xr-x 3 root root 60 Jan 1 1970 bus drwxr-xr-x 2 root root 2620 May 15 2014 char crw------- 1 root root 5, 1 Jan 1 2000 console lrwxrwxrwx 1 root root 11 Jan 1 2000 core -> /proc/kcore crw------- 1 root root 10, 63 Jan 1 2000 cpu_dma_latency drwxr-xr-x 6 root root 120 Jan 1 2000 disk drwxr-xr-x 2 root root 80 Jan 1 1970 dri crw-rw---T+ 1 root audio 14, 3 Jan 1 2000 dsp crw-rw---T 1 root video 29, 0 Jan 1 2000 fb0 lrwxrwxrwx 1 root root 13 Jan 1 2000 fd -> /proc/self/fd crw-rw-rw- 1 root root 1, 7 Jan 1 2000 full crw-rw---T 1 root fuse 10, 229 Jan 1 2000 fuse crw-rw---T 1 root i2c 89, 0 Jan 1 2000 i2c-0 crw-rw---T 1 root i2c 89, 1 Jan 1 2000 i2c-1 prw------- 1 root root 0 Jan 1 2000 initctl drwxr-xr-x 3 root root 100 Jan 1 2000 input crw-r----T 1 root kmem 1, 2 Jan 1 2000 kmem crw-r--r-- 1 root root 1, 11 Jan 1 2000 kmsg srw-rw-rw- 1 root root 0 Jan 1 2000 log crw------- 1 root root 247, 0 Jan 1 2000 logibone_mem crw------- 1 root root 10, 237 Jan 1 2000 loop-control brw-rw---T 1 root disk 7, 0 Jan 1 2000 loop0 brw-rw---T 1 root disk 7, 1 Jan 1 2000 loop1 brw-rw---T 1 root disk 7, 2 Jan 1 2000 loop2 brw-rw---T 1 root disk 7, 3 Jan 1 2000 loop3 brw-rw---T 1 root disk 7, 4 Jan 1 2000 loop4 brw-rw---T 1 root disk 7, 5 Jan 1 2000 loop5 brw-rw---T 1 root disk 7, 6 Jan 1 2000 loop6 brw-rw---T 1 root disk 7, 7 Jan 1 2000 loop7 crw-r----T 1 root kmem 1, 1 Jan 1 2000 mem crw-rw---T+ 1 root audio 14, 0 Jan 1 2000 mixer brw-rw---T 1 root floppy 179, 0 Jan 1 2000 mmcblk0 brw-rw---T 1 root floppy 179, 1 Jan 1 2000 mmcblk0p1 brw-rw---T 1 root floppy 179, 2 Jan 1 2000 mmcblk0p2 brw-rw---T 1 root floppy 179, 8 Jan 1 2000 mmcblk1 brw-rw---T 1 root floppy 179, 16 Jan 1 2000 mmcblk1boot0 brw-rw---T 1 root floppy 179, 24 Jan 1 2000 mmcblk1boot1 brw-rw---T 1 root floppy 179, 9 Jan 1 2000 mmcblk1p1 brw-rw---T 1 root floppy 179, 10 Jan 1 2000 mmcblk1p2 drwxrwxrwt 2 root root 40 Jan 1 1970 mqueue drwxr-xr-x 2 root root 60 Jan 1 2000 net crw------- 1 root root 10, 62 Jan 1 2000 network_latency crw------- 1 root root 10, 61 Jan 1 2000 network_throughput crw-rw-rw- 1 root root 1, 3 Jan 1 2000 null crw------T 1 root root 108, 0 Jan 1 2000 ppp crw------- 1 root root 10, 1 Jan 1 2000 psaux crw-rw-rw- 1 root root 5, 2 Feb 24 2015 ptmx drwxr-xr-x 2 root root 0 Jan 1 1970 pts brw-rw---T 1 root disk 1, 0 Jan 1 2000 ram0 brw-rw---T 1 root disk 1, 1 Jan 1 2000 ram1 brw-rw---T 1 root disk 1, 10 Jan 1 2000 ram10 brw-rw---T 1 root disk 1, 11 Jan 1 2000 ram11 brw-rw---T 1 root disk 1, 12 Jan 1 2000 ram12 brw-rw---T 1 root disk 1, 13 Jan 1 2000 ram13 brw-rw---T 1 root disk 1, 14 Jan 1 2000 ram14 brw-rw---T 1 root disk 1, 15 Jan 1 2000 ram15 brw-rw---T 1 root disk 1, 2 Jan 1 2000 ram2 brw-rw---T 1 root disk 1, 3 Jan 1 2000 ram3 brw-rw---T 1 root disk 1, 4 Jan 1 2000 ram4 brw-rw---T 1 root disk 1, 5 Jan 1 2000 ram5 brw-rw---T 1 root disk 1, 6 Jan 1 2000 ram6 brw-rw---T 1 root disk 1, 7 Jan 1 2000 ram7 brw-rw---T 1 root disk 1, 8 Jan 1 2000 ram8 brw-rw---T 1 root disk 1, 9 Jan 1 2000 ram9 crw-rw-rw- 1 root root 1, 8 Jan 1 2000 random crw-r--r-T 1 root root 10, 59 Jan 1 2000 rfkill lrwxrwxrwx 1 root root 9 Jan 1 2000 root -> mmcblk0p2 crw------- 1 root root 254, 0 Jan 1 2000 rtc0 drwxrwxrwt 2 root root 40 Jan 1 2000 shm drwxr-xr-x 3 root root 120 Jan 1 2000 snd lrwxrwxrwx 1 root root 24 Jan 1 2000 sndstat -> /proc/asound/oss/sndstat lrwxrwxrwx 1 root root 15 Jan 1 2000 stderr -> /proc/self/fd/2 lrwxrwxrwx 1 root root 15 Jan 1 2000 stdin -> /proc/self/fd/0 lrwxrwxrwx 1 root root 15 Jan 1 2000 stdout -> /proc/self/fd/1 crw-rw-rw- 1 root root 5, 0 Jan 1 2000 tty crw------- 1 root root 4, 0 Jan 1 2000 tty0 crw-rw---- 1 root tty 4, 1 Jan 1 2000 tty1 crw------- 1 root root 4, 10 Jan 1 2000 tty10 crw------- 1 root root 4, 11 Jan 1 2000 tty11 crw------- 1 root root 4, 12 Jan 1 2000 tty12 crw------- 1 root root 4, 13 Jan 1 2000 tty13 crw------- 1 root root 4, 14 Jan 1 2000 tty14 crw------- 1 root root 4, 15 Jan 1 2000 tty15 crw------- 1 root root 4, 16 Jan 1 2000 tty16 crw------- 1 root root 4, 17 Jan 1 2000 tty17 crw------- 1 root root 4, 18 Jan 1 2000 tty18 crw------- 1 root root 4, 19 Jan 1 2000 tty19 crw------- 1 root root 4, 2 Jan 1 2000 tty2 crw------- 1 root root 4, 20 Jan 1 2000 tty20 crw------- 1 root root 4, 21 Jan 1 2000 tty21 crw------- 1 root root 4, 22 Jan 1 2000 tty22 crw------- 1 root root 4, 23 Jan 1 2000 tty23 crw------- 1 root root 4, 24 Jan 1 2000 tty24 crw------- 1 root root 4, 25 Jan 1 2000 tty25 crw------- 1 root root 4, 26 Jan 1 2000 tty26 crw------- 1 root root 4, 27 Jan 1 2000 tty27 crw------- 1 root root 4, 28 Jan 1 2000 tty28 crw------- 1 root root 4, 29 Jan 1 2000 tty29 crw------- 1 root root 4, 3 Jan 1 2000 tty3 crw------- 1 root root 4, 30 Jan 1 2000 tty30 crw------- 1 root root 4, 31 Jan 1 2000 tty31 crw------- 1 root root 4, 32 Jan 1 2000 tty32 crw------- 1 root root 4, 33 Jan 1 2000 tty33 crw------- 1 root root 4, 34 Jan 1 2000 tty34 crw------- 1 root root 4, 35 Jan 1 2000 tty35 crw------- 1 root root 4, 36 Jan 1 2000 tty36 crw------- 1 root root 4, 37 Jan 1 2000 tty37 crw------- 1 root root 4, 38 Jan 1 2000 tty38 crw------- 1 root root 4, 39 Jan 1 2000 tty39 crw------- 1 root root 4, 4 Jan 1 2000 tty4 crw------- 1 root root 4, 40 Jan 1 2000 tty40 crw------- 1 root root 4, 41 Jan 1 2000 tty41 crw------- 1 root root 4, 42 Jan 1 2000 tty42 crw------- 1 root root 4, 43 Jan 1 2000 tty43 crw------- 1 root root 4, 44 Jan 1 2000 tty44 crw------- 1 root root 4, 45 Jan 1 2000 tty45 crw------- 1 root root 4, 46 Jan 1 2000 tty46 crw------- 1 root root 4, 47 Jan 1 2000 tty47 crw------- 1 root root 4, 48 Jan 1 2000 tty48 crw------- 1 root root 4, 49 Jan 1 2000 tty49 crw------- 1 root root 4, 5 Jan 1 2000 tty5 crw------- 1 root root 4, 50 Jan 1 2000 tty50 crw------- 1 root root 4, 51 Jan 1 2000 tty51 crw------- 1 root root 4, 52 Jan 1 2000 tty52 crw------- 1 root root 4, 53 Jan 1 2000 tty53 crw------- 1 root root 4, 54 Jan 1 2000 tty54 crw------- 1 root root 4, 55 Jan 1 2000 tty55 crw------- 1 root root 4, 56 Jan 1 2000 tty56 crw------- 1 root root 4, 57 Jan 1 2000 tty57 crw------- 1 root root 4, 58 Jan 1 2000 tty58 crw------- 1 root root 4, 59 Jan 1 2000 tty59 crw------- 1 root root 4, 6 Jan 1 2000 tty6 crw------- 1 root root 4, 60 Jan 1 2000 tty60 crw------- 1 root root 4, 61 Jan 1 2000 tty61 crw------- 1 root root 4, 62 Jan 1 2000 tty62 crw------- 1 root root 4, 63 Jan 1 2000 tty63 crw------- 1 root root 4, 7 Jan 1 2000 tty7 crw------- 1 root root 4, 8 Jan 1 2000 tty8 crw------- 1 root root 4, 9 Jan 1 2000 tty9 crw-rw---- 1 root tty 241, 0 May 15 2014 ttyGS0 crw------- 1 debian tty 248, 0 Feb 24 02:25 ttyO0 crw-rw---T 1 root dialout 4, 64 Jan 1 2000 ttyS0 crw-rw---T 1 root dialout 4, 65 Jan 1 2000 ttyS1 crw-rw---T 1 root dialout 4, 66 Jan 1 2000 ttyS2 crw-rw---T 1 root dialout 4, 67 Jan 1 2000 ttyS3 crw------- 1 root root 10, 60 Jan 1 2000 ubi_ctrl crw------T 1 root root 10, 223 Jan 1 2000 uinput crw-rw-rw- 1 root root 1, 9 Jan 1 2000 urandom crw------- 1 root root 245, 0 Jan 1 2000 usbmon0 crw------- 1 root root 245, 1 Jan 1 2000 usbmon1 crw------- 1 root root 245, 2 May 15 2014 usbmon2 crw------- 1 root root 7, 0 Jan 1 2000 vcs crw------- 1 root root 7, 1 Jan 1 2000 vcs1 crw------- 1 root root 7, 2 Jan 1 2000 vcs2 crw------- 1 root root 7, 3 Jan 1 2000 vcs3 crw------- 1 root root 7, 4 Jan 1 2000 vcs4 crw------- 1 root root 7, 5 Jan 1 2000 vcs5 crw------- 1 root root 7, 6 Jan 1 2000 vcs6 crw------- 1 root root 7, 7 May 15 2014 vcs7 crw------- 1 root root 7, 128 Jan 1 2000 vcsa crw------- 1 root root 7, 129 Jan 1 2000 vcsa1 crw------- 1 root root 7, 130 Jan 1 2000 vcsa2 crw------- 1 root root 7, 131 Jan 1 2000 vcsa3 crw------- 1 root root 7, 132 Jan 1 2000 vcsa4 crw------- 1 root root 7, 133 Jan 1 2000 vcsa5 crw------- 1 root root 7, 134 Jan 1 2000 vcsa6 crw------- 1 root root 7, 135 May 15 2014 vcsa7 crw------- 1 root root 10, 130 Jan 1 2000 watchdog crw------- 1 root root 251, 0 Jan 1 2000 watchdog0 prw-r----- 1 root adm 0 Feb 24 02:10 xconsole crw-rw-rw- 1 root root 1, 5 Jan 1 2000 zero
mount情報。
debian@beaglebone:/$ mount sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) proc on /proc type proc (rw,nosuid,nodev,noexec,relatime) udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=62919,mode=755) devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620) tmpfs on /run type tmpfs (rw,nosuid,relatime,size=102072k,mode=755) /dev/mmcblk0p2 on / type ext4 (rw,noatime,errors=remount-ro,data=ordered) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,relatime) tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,relatime,mode=755) cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd) cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu) cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory) cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio) systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=24,pgrp=1,timeout=300,minproto=5,maxproto=5,direct) tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k) tmpfs on /run/user type tmpfs (rw,nosuid,nodev,noexec,relatime,size=102400k,mode=755) debugfs on /sys/kernel/debug type debugfs (rw,relatime) securityfs on /sys/kernel/security type securityfs (rw,relatime) mqueue on /dev/mqueue type mqueue (rw,relatime) /dev/mmcblk0p1 on /boot/uboot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro) /dev/mmcblk1p2 on /media/rootfs type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks) /dev/mmcblk1p1 on /media/boot type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1002,fmask=0022,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks) binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
rootfs”/”は/dev/mmcblk0p2となっている。
/dev/mmcblk0p2 on / type ext4 (rw,noatime,errors=remount-ro,data=ordered)
/dev/mmcblk0はmicro SDカードのraw deviceであり、/dev/mmcblk0p2はmicro SDカードの二番目のパーティション。
起動の途中までrootfs”/”はinitrdであり、その後/dev/mmcblk0p2に切り替えられる。
micro SDカードの一番目のパーティションは/dev/mmcblk0p1にmountされる。
/dev/mmcblk0p1 on /boot/uboot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
eMMC(/dev/mmcblk1)の二つのディレクトリは/media/bootおよび/media/rootfsにmountされる。
/dev/mmcblk1p2 on /media/rootfs type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks) /dev/mmcblk1p1 on /media/boot type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1002,fmask=0022,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks)
eMMC内の情報を参照したいときにmicro SDカードを抜いて再起動させる必要がないので便利といえば便利であるが、間違って内容を壊す可能性も あるので慎重さが求められる。
各ファイルシステムの容量情報も見てみよう。
debian@beaglebone:~$ df Filesystem 1K-blocks Used Available Use% Mounted on rootfs 3581632 1684352 1736568 50% / udev 10240 0 10240 0% /dev tmpfs 102072 664 101408 1% /run /dev/mmcblk0p2 3581632 1684352 1736568 50% / tmpfs 255176 0 255176 0% /dev/shm tmpfs 255176 0 255176 0% /sys/fs/cgroup tmpfs 102400 0 102400 0% /run/user tmpfs 5120 0 5120 0% /run/lock /dev/mmcblk0p1 98094 79500 18594 82% /boot/uboot /dev/mmcblk1p2 3553816 1392824 1977136 42% /media/rootfs /dev/mmcblk1p1 98094 73336 24758 75% /media/boot debian@beaglebone:~$
rootfsの空き容量が約1.8GBあるのでサーバーとしての実運用やログの内部保存を行わない限りは当分問題ない。
cpuinfoを見る。
debian@beaglebone:/$ cat /proc/cpuinfo processor : 0 model name : ARMv7 Processor rev 2 (v7l) BogoMIPS : 298.24 Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x3 CPU part : 0xc08 CPU revision : 2 Hardware : Generic AM33XX (Flattened Device Tree) Revision : 0000 Serial : 0000000000000000
Featuresに応じて最適なコンパイルオプションが変わるが課題とする。
Serialがオールゼロになっているが別に加工はしていない。
CPU Serialがオールゼロである分けが無いので取得していないのか取得できなかったのだろう。
引き続きプロセス情報を見てゆく。
debian@beaglebone:~$ lsmod Module Size Used by g_multi 47200 2 libcomposite 13856 1 g_multi arc4 1644 2 rt2800usb 12384 0 rt2800lib 40792 1 rt2800usb rt2x00usb 9375 1 rt2800usb rt2x00lib 34321 3 rt2x00usb,rt2800lib,rt2800usb mac80211 270402 3 rt2x00lib,rt2x00usb,rt2800lib cfg80211 149666 2 mac80211,rt2x00lib rfkill 16510 2 cfg80211 ipv6 229989 23 autofs4 17432 2 btrfs 544415 0
insmodされているのはUSB関連のみ。
debian@beaglebone:~$ ps ax PID TTY STAT TIME COMMAND 1 ? Ss 0:01 /lib/systemd/systemd 2 ? S 0:00 [kthreadd] 3 ? S 0:00 [ksoftirqd/0] 5 ? S< 0:00 [kworker/0:0H] 6 ? S 0:01 [kworker/u:0] 7 ? S< 0:00 [kworker/u:0H] 8 ? S 0:00 [migration/0] 9 ? S 0:00 [rcu_bh] 10 ? S 0:00 [rcu_sched] 11 ? S 0:00 [watchdog/0] 12 ? S< 0:00 [khelper] 13 ? S 0:00 [kdevtmpfs] 14 ? S< 0:00 [netns] 15 ? S 0:00 [kworker/0:1] 16 ? S 0:00 [bdi-default] 17 ? S< 0:00 [kintegrityd] 18 ? S< 0:00 [kblockd] 19 ? S 0:00 [khubd] 20 ? S 0:00 [irq/86-44e0b000] 21 ? S 0:01 [kworker/u:1] 24 ? S 0:00 [irq/23-tps65217] 27 ? S 0:00 [irq/46-4819c000] 36 ? S< 0:00 [rpciod] 38 ? S 0:00 [khungtaskd] 39 ? S 0:00 [kswapd0] 40 ? S 0:00 [fsnotify_mark] 41 ? S< 0:00 [nfsiod] 42 ? S< 0:00 [crypto] 45 ? S< 0:00 [pencrypt] 46 ? S< 0:00 [pdecrypt] 53 ? S< 0:00 [OMAP UART0] 57 ? S< 0:00 [kpsmoused] 58 ? S 0:00 [irq/150-mmc0] 70 ? S 0:01 [kworker/u:2] 71 ? S 0:00 [mmcqd/0] 74 ? S 0:00 [kworker/0:2] 75 ? S 0:00 [mmcqd/1] 76 ? S 0:00 [mmcqd/1boot0] 77 ? S 0:00 [mmcqd/1boot1] 78 ? S< 0:00 [deferwq] 131 ? S< 0:00 [kworker/0:1H] 184 ? S 0:00 [jbd2/mmcblk0p2-] 185 ? S< 0:00 [ext4-dio-unwrit] 213 ? Ss 0:00 /lib/systemd/systemd-journald 232 ? Ss 0:00 /sbin/udevd 332 ? S 0:00 /sbin/udevd 384 ? S< 0:00 [cfg80211] 496 ? Ss 0:00 /sbin/rpcbind -w 563 ? Ss 0:00 /sbin/rpc.statd 605 ? S 0:00 [flush-179:0] 619 ? Ss 0:00 /usr/sbin/rpc.idmapd 620 ? Ss 0:00 /sbin/wpa_supplicant -s -B -P /var/run/wpa_supplicant 661 ? Ss 0:00 dhclient -v -pf /run/dhclient.wlan0.pid -lf /var/lib/ 739 ? Ss 0:00 avahi-daemon: running [beaglebone.local] 747 ? Ss 0:00 /usr/sbin/acpid 752 ? Ss 0:03 /usr/bin/dbus-daemon --system --address=systemd: --no 756 ? Ss 0:00 /sbin/wpa_supplicant -u -s -O /var/run/wpa_supplicant 757 ? Ssl 0:01 /usr/bin/node autorun.js 759 ? Ss 0:00 /lib/systemd/systemd-logind 760 ? Ssl 0:00 /usr/lib/upower/upowerd 761 ? Ssl 0:00 /usr/sbin/console-kit-daemon --no-daemon 762 ? Ssl 0:00 /usr/sbin/rsyslogd -n -c5 787 tty1 Ss+ 0:00 /sbin/agetty tty1 38400 789 ttyO0 Ss 0:00 /bin/login -- 817 ? S 0:00 avahi-daemon: chroot helper 858 ? Sl 0:00 /usr/sbin/lightdm 950 ? S 0:00 /usr/sbin/xrdp 987 ? Ss 0:00 /usr/sbin/cron 994 ? Ss 0:00 /usr/sbin/sshd 995 ? Ssl 0:00 /usr/lib/policykit-1/polkitd --no-debug 999 ? S 0:00 /usr/sbin/xrdp-sesman 1019 tty7 Ss+ 0:01 /usr/bin/X :0 -auth /var/run/lightdm/root/:0 -noliste 1028 ? Ss 0:00 /usr/sbin/apache2 -k start 1031 ? S 0:00 /usr/sbin/apache2 -k start 1033 ? Sl 0:00 /usr/sbin/apache2 -k start 1034 ? Sl 0:00 /usr/sbin/apache2 -k start 1118 ? S 0:00 [file-storage] 1121 ttyGS0 Ss+ 0:03 /sbin/agetty -s ttyGS0 115200 38400 9600 1124 ? S 0:00 /sbin/udevd 1197 ? Sl 0:00 lightdm --session-child 12 15 1204 ? Ss 0:00 /usr/sbin/udhcpd -S /etc/udhcpd.conf 1237 ? Ssl 0:00 /usr/bin/lxsession -s LXDE -e LXDE 1238 ? S 0:07 /usr/bin/python -O /usr/share/wicd/daemon/wicd-daemon 1262 ? Ss 0:00 /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-s 1265 ? S 0:00 /usr/bin/dbus-launch --exit-with-session x-session-ma 1266 ? Ss 0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-add 1272 ? S 0:00 openbox --config-file /home/debian/.config/openbox/lx 1274 ? S 0:01 lxpanel --profile LXDE 1278 ? S 0:01 pcmanfm --desktop --profile LXDE 1280 ? S 0:02 /usr/bin/python -O /usr/share/wicd/gtk/wicd-client.py 1282 ? Sl 0:00 /usr/lib/notification-daemon/notification-daemon 1284 ? S 0:03 /usr/bin/python -O /usr/share/wicd/daemon/monitor.py 1288 ? S 0:00 /usr/lib/arm-linux-gnueabihf/libmenu-cache1/libexec/m 1292 ? S 0:00 /usr/lib/gvfs/gvfsd 1299 ? Ssl 0:03 /usr/bin/node server.js 1311 ? S 0:00 /usr/lib/gvfs/gvfs-gdu-volume-monitor 1312 ? Ssl 0:00 /usr/lib/udisks/udisks-daemon --no-debug 1313 ? S 0:00 udisks-daemon: not polling any devices 1316 ? Sl 0:00 /usr/lib/gvfs/gvfs-afc-volume-monitor 1319 ? S 0:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor 1322 ? S 0:00 [jbd2/mmcblk1p2-] 1323 ? S< 0:00 [ext4-dio-unwrit] 1332 ? S 0:00 [flush-179:8] 1394 ttyO0 S 0:00 -bash 1535 ttyO0 R+ 0:00 ps ax
/proc/interruptsも一応。
debian@beaglebone:/$ cat /proc/interrupts CPU0 23: 3 INTC tps65217 28: 5147 INTC edma 30: 0 INTC edma_error 34: 0 INTC musb-hdrc.0.auto 35: 435670 INTC musb-hdrc.1.auto 44: 2204 INTC mmc1 46: 96 INTC 4819c000.i2c 52: 0 INTC tilcdc 56: 0 INTC 4a100000.ethernet 57: 0 INTC 4a100000.ethernet 58: 0 INTC 4a100000.ethernet 59: 0 INTC 4a100000.ethernet 80: 14032 INTC mmc0 83: 232641 INTC gp_timer 86: 5346 INTC 44e0b000.i2c 88: 234 INTC OMAP UART0 91: 0 INTC rtc0 92: 1 INTC rtc0 125: 0 INTC 53100000.sham 150: 0 GPIO mmc0 IPI0: 0 CPU wakeup interrupts IPI1: 0 Timer broadcast interrupts IPI2: 0 Rescheduling interrupts IPI3: 0 Function call interrupts IPI4: 0 Single function call interrupts IPI5: 0 CPU stop interrupts Err: 0
/proc配下のメモリ関連の情報を見て行く。
DDRメモリは512MBしかないのでLow Memoryしかアサインされてなく、少し寂しい。
/proc/meminfoから。
debian@beaglebone:/$ cat /proc/meminfo MemTotal: 510356 kB MemFree: 325484 kB Buffers: 12744 kB Cached: 77104 kB SwapCached: 0 kB Active: 90988 kB Inactive: 69900 kB Active(anon): 71472 kB Inactive(anon): 1224 kB Active(file): 19516 kB Inactive(file): 68676 kB Unevictable: 0 kB Mlocked: 0 kB HighTotal: 0 kB HighFree: 0 kB LowTotal: 510356 kB LowFree: 325484 kB SwapTotal: 0 kB SwapFree: 0 kB Dirty: 0 kB Writeback: 0 kB AnonPages: 71044 kB Mapped: 25896 kB Shmem: 1664 kB Slab: 14400 kB SReclaimable: 7244 kB SUnreclaim: 7156 kB KernelStack: 1904 kB PageTables: 1772 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 255176 kB Committed_AS: 810780 kB VmallocTotal: 499712 kB VmallocUsed: 29208 kB VmallocChunk: 379892 kB
/proc/iomem。
debian@beaglebone:/$ cat /proc/iomem 44e07000-44e07fff : /ocp/gpio@44e07000 44e07000-44e07fff : 44e07000.gpio 44e09000-44e0afff : /ocp/serial@44e09000 44e09000-44e0afff : omap_uart 44e0b000-44e0bfff : /ocp/i2c@44e0b000 44e0b000-44e0bfff : /ocp/i2c@44e0b000 44e10448-44e1044f : /ocp/bandgap@44e10448 44e10448-44e1044f : /ocp/bandgap@44e10448 44e10620-44e10623 : 47400000.usb 44e10628-44e1062b : /ocp/usb@47400000 44e10800-44e10a37 : /pinmux@44e10800 44e10800-44e10a37 : pinctrl-single 44e10f90-44e10fcf : /ocp/edma@49000000 44e35000-44e35fff : /ocp/wdt@44e35000 44e35000-44e35fff : 44e35000.wdt 44e3e000-44e3efff : /ocp/rtc@44e3e000 44e3e000-44e3efff : 44e3e000.rtc 47400000-47400fff : /ocp/usb@47400000 47401000-474017ff : /ocp/usb@47400000 47401000-474017ff : /ocp/usb@47400000 47401800-47401fff : /ocp/usb@47400000 47401800-47401fff : /ocp/usb@47400000 48038000-48039fff : /ocp/mcasp@48038000 48038000-48039fff : 48038000.mcasp 48042000-480423ff : /ocp/timer@48042000 48042000-480423ff : /ocp/timer@48042000 48044000-480443ff : /ocp/timer@48044000 48044000-480443ff : /ocp/timer@48044000 48046000-480463ff : /ocp/timer@48046000 48046000-480463ff : /ocp/timer@48046000 48048000-480483ff : /ocp/timer@48048000 48048000-480483ff : /ocp/timer@48048000 4804a000-4804a3ff : /ocp/timer@4804a000 4804a000-4804a3ff : /ocp/timer@4804a000 4804c000-4804cfff : /ocp/gpio@4804c000 4804c000-4804cfff : 4804c000.gpio 48060100-480610ff : mmc.5 48060100-480610ff : mmc.5 480c8000-480c8fff : omap-mailbox 480ca000-480cafff : omap_hwspinlock.0 4819c000-4819cfff : /ocp/i2c@4819c000 4819c000-4819cfff : /ocp/i2c@4819c000 481ac000-481acfff : /ocp/gpio@481ac000 481ac000-481acfff : 481ac000.gpio 481ae000-481aefff : /ocp/gpio@481ae000 481ae000-481aefff : 481ae000.gpio 481d8100-481d90ff : mmc.11 481d8100-481d90ff : mmc.11 48200000-48200fff : /ocp/interrupt-controller@48200000 4830e000-4830efff : /ocp/fb 49000000-4900ffff : /ocp/edma@49000000 49000000-4900ffff : 49000000.edma 4a100000-4a1007ff : /ocp/ethernet@4a100000 4a100000-4a1007ff : eth0 4a101000-4a1010ff : /ocp/ethernet@4a100000/mdio@4a101000 4a101000-4a1010ff : 4a101000.mdio 4a101200-4a1012ff : /ocp/ethernet@4a100000 4a101200-4a1012ff : eth0 53100000-531001ff : /ocp/sham@53100000 53100000-531001ff : /ocp/sham@53100000 53500000-5350009f : /ocp/aes@53500000 53500000-5350009f : /ocp/aes@53500000 80000000-9fefffff : System RAM 80008000-80644c67 : Kernel code 8067c000-8074bf3b : Kernel data debian@beaglebone:/proc$
/proc/vmallocinfo。
debian@beaglebone:/$ sudo cat /proc/vmallocinfo 0xbf800000-0xbf886000 548864 module_alloc_update_bounds+0x9/0x42 pages=133 vmalloc 0xbf8a4000-0xbf8aa000 24576 module_alloc_update_bounds+0x9/0x42 pages=5 vmalloc 0xbf8ae000-0xbf8e8000 237568 module_alloc_update_bounds+0x9/0x42 pages=57 vmalloc 0xbf8fe000-0xbf904000 24576 module_alloc_update_bounds+0x9/0x42 pages=5 vmalloc 0xbf908000-0xbf92e000 155648 module_alloc_update_bounds+0x9/0x42 pages=37 vmalloc 0xbf93e000-0xbf982000 278528 module_alloc_update_bounds+0x9/0x42 pages=67 vmalloc 0xbf99b000-0xbf9a5000 40960 module_alloc_update_bounds+0x9/0x42 pages=9 vmalloc 0xbf9ac000-0xbf9b0000 16384 module_alloc_update_bounds+0x9/0x42 pages=3 vmalloc 0xbf9b3000-0xbf9be000 45056 module_alloc_update_bounds+0x9/0x42 pages=10 vmalloc 0xbf9c3000-0xbf9c8000 20480 module_alloc_update_bounds+0x9/0x42 pages=4 vmalloc 0xbf9cd000-0xbf9cf000 8192 module_alloc_update_bounds+0x9/0x42 pages=1 vmalloc 0xbf9d1000-0xbf9d6000 20480 module_alloc_update_bounds+0x9/0x42 pages=4 vmalloc 0xbf9da000-0xbf9e7000 53248 module_alloc_update_bounds+0x9/0x42 pages=12 vmalloc 0xe0804000-0xe0806000 8192 _init+0x77/0x1c8 phys=4c000000 ioremap 0xe0806000-0xe0808000 8192 _init+0x77/0x1c8 phys=47400000 ioremap 0xe0808000-0xe080b000 12288 _init+0x77/0x1c8 phys=50000000 ioremap 0xe080c000-0xe080f000 12288 _init+0x77/0x1c8 phys=49800000 ioremap 0xe0810000-0xe0819000 36864 _init+0x77/0x1c8 phys=49000000 ioremap 0xe081a000-0xe081c000 8192 _init+0x77/0x1c8 phys=4a100000 ioremap 0xe081c000-0xe081f000 12288 _init+0x77/0x1c8 phys=49900000 ioremap 0xe0820000-0xe0832000 73728 _init+0x77/0x1c8 phys=47810000 ioremap 0xe0832000-0xe0834000 8192 _init+0x77/0x1c8 phys=53100000 ioremap 0xe0834000-0xe0837000 12288 _init+0x77/0x1c8 phys=49a00000 ioremap 0xe0837000-0xe0878000 266240 phys=9f0c0000 user 0xe0878000-0xe087b000 12288 jffs2_lzo_init+0x17/0x48 pages=2 vmalloc 0xe087c000-0xe087e000 8192 musb_probe+0x39/0x3d4 phys=47401000 ioremap 0xe087e000-0xe0880000 8192 musb_probe+0x39/0x3d4 phys=47401000 ioremap 0xe0880000-0xe0891000 69632 omap_map_sram+0x21/0x50 phys=40300000 ioremap 0xe0891000-0xe089d000 49152 cramfs_uncompress_init+0x15/0x34 pages=11 vmalloc 0xe089e000-0xe08a0000 8192 devm_ioremap_nocache+0x21/0x42 phys=53100000 ioremap 0xe08a0000-0xe08b1000 69632 edma_probe+0x35b/0x6e4 phys=49000000 ioremap 0xe08b1000-0xe08f4000 274432 jffs2_zlib_init+0x11/0x4c pages=66 vmalloc 0xe08f4000-0xe0900000 49152 jffs2_zlib_init+0x1d/0x4c pages=11 vmalloc 0xe0900000-0xe0981000 528384 _init+0x77/0x1c8 phys=4a300000 ioremap 0xe0981000-0xe0992000 69632 jffs2_lzo_init+0xb/0x48 pages=16 vmalloc 0xe0992000-0xe0994000 8192 devm_ioremap_nocache+0x21/0x42 phys=53500000 ioremap 0xe0994000-0xe09b5000 135168 davinci_pcm_preallocate_dma_buffer+0x51/0x6c phys=9dbe0000 user 0xe09b5000-0xe09c6000 69632 lzo_init+0xd/0x1a pages=16 vmalloc 0xe09c6000-0xe09eb000 151552 deflate_init+0x17/0x86 pages=36 vmalloc 0xe09eb000-0xe09f7000 49152 deflate_init+0x6b/0x86 pages=11 vmalloc 0xe09f7000-0xe09fc000 20480 drm_ht_create+0x27/0x48 pages=4 vmalloc 0xe09fc000-0xe09fe000 8192 devm_ioremap_nocache+0x21/0x42 phys=4a101000 ioremap 0xe09fe000-0xe0a00000 8192 cpsw_probe+0x3ed/0x8a4 phys=4a100000 ioremap 0xe0a00000-0xe0b01000 1052672 _init+0x77/0x1c8 phys=53500000 ioremap 0xe0b01000-0xe0b06000 20480 drm_ht_create+0x27/0x48 pages=4 vmalloc 0xe0b06000-0xe0c87000 1576960 drm_gem_cma_create+0x51/0xac phys=9de00000 user 0xe0c88000-0xe0c8a000 8192 cpsw_probe+0x467/0x8a4 phys=4a101000 ioremap 0xe0c8c000-0xe0c8f000 12288 cpdma_ctlr_create+0xcd/0x148 phys=4a102000 ioremap 0xe1000000-0xe2001000 16781312 _init+0x77/0x1c8 phys=56000000 ioremap 0xe2900000-0xe2903000 12288 _request_firmware_load+0x73/0x2c4 pages=2 vmalloc 0xf9c00000-0xfa000000 4194304 iotable_init+0x1/0x8c phys=44c00000 ioremap 0xfa000000-0xfa400000 4194304 iotable_init+0x1/0x8c phys=48000000 ioremap
/proc/pagetypeinfo。
debian@beaglebone:/$ cat /proc/pagetypeinfo Page block order: 11 Pages per block: 2048 Free pages count per migrate type at order 0 1 2 3 4 5 6 7 8 9 10 11 Node 0, zone Normal, type Unmovable 2 6 3 1 0 1 1 0 1 3 2 0 Node 0, zone Normal, type Reclaimable 1 0 1 1 0 1 1 1 0 0 0 0 Node 0, zone Normal, type Movable 12 10 1 1 0 0 1 0 1 0 1 36 Node 0, zone Normal, type Reserve 0 0 0 0 0 0 0 0 0 0 0 1 Node 0, zone Normal, type Isolate 0 0 0 0 0 0 0 0 0 0 0 0 Number of blocks type Unmovable Reclaimable Movable Reserve Isolate Node 0, zone Normal 4 1 58 1 0
/proc/zoneinfo。
debian@beaglebone:/$ cat /proc/zoneinfo Node 0, zone Normal pages free 81270 min 720 low 900 high 1080 scanned 0 spanned 131072 present 129792 managed 125839 nr_free_pages 81270 nr_inactive_anon 306 nr_active_anon 17875 nr_inactive_file 17113 nr_active_file 5013 nr_unevictable 0 nr_mlock 0 nr_anon_pages 17767 nr_mapped 6470 nr_file_pages 22541 nr_dirty 0 nr_writeback 0 nr_slab_reclaimable 1814 nr_slab_unreclaimable 1793 nr_page_table_pages 443 nr_kernel_stack 240 nr_unstable 0 nr_bounce 0 nr_vmscan_write 0 nr_vmscan_immediate_reclaim 0 nr_writeback_temp 0 nr_isolated_anon 0 nr_isolated_file 0 nr_shmem 417 nr_dirtied 243 nr_written 239 nr_anon_transparent_hugepages 0 nr_free_cma 0 protection: (0, 0, 0) pagesets cpu: 0 count: 140 high: 186 batch: 31 vm stats threshold: 6 all_unreclaimable: 0 start_pfn: 524288 inactive_ratio: 1
/proc/buddyinfo。
debian@beaglebone:/proc$ cat buddyinfo Node 0, zone Normal 37 6 3 3 0 2 3 1 2 3 3 37
/proc/vmstat。
debian@beaglebone:/$ cat /proc/vmstat nr_free_pages 81239 nr_inactive_anon 306 nr_active_anon 17877 nr_inactive_file 17106 nr_active_file 5026 nr_unevictable 0 nr_mlock 0 nr_anon_pages 17768 nr_mapped 6470 nr_file_pages 22548 nr_dirty 8 nr_writeback 0 nr_slab_reclaimable 1820 nr_slab_unreclaimable 1795 nr_page_table_pages 443 nr_kernel_stack 240 nr_unstable 0 nr_bounce 0 nr_vmscan_write 0 nr_vmscan_immediate_reclaim 0 nr_writeback_temp 0 nr_isolated_anon 0 nr_isolated_file 0 nr_shmem 418 nr_dirtied 253 nr_written 241 nr_anon_transparent_hugepages 0 nr_free_cma 0 nr_dirty_threshold 10229 nr_dirty_background_threshold 5114 pgpgin 94369 pgpgout 2028 pswpin 0 pswpout 0 pgalloc_normal 304166 pgalloc_high 0 pgalloc_movable 0 pgfree 385564 pgactivate 7077 pgdeactivate 0 pgfault 918609 pgmajfault 604 pgrefill_normal 0 pgrefill_high 0 pgrefill_movable 0 pgsteal_kswapd_normal 0 pgsteal_kswapd_high 0 pgsteal_kswapd_movable 0 pgsteal_direct_normal 0 pgsteal_direct_high 0 pgsteal_direct_movable 0 pgscan_kswapd_normal 0 pgscan_kswapd_high 0 pgscan_kswapd_movable 0 pgscan_direct_normal 0 pgscan_direct_high 0 pgscan_direct_movable 0 pgscan_direct_throttle 0 pginodesteal 0 slabs_scanned 0 kswapd_inodesteal 0 kswapd_low_wmark_hit_quickly 0 kswapd_high_wmark_hit_quickly 0 kswapd_skip_congestion_wait 0 pageoutrun 0 allocstall 0 pgrotated 0 unevictable_pgs_culled 0 unevictable_pgs_scanned 0 unevictable_pgs_rescued 0 unevictable_pgs_mlocked 0 unevictable_pgs_munlocked 0 unevictable_pgs_cleared 0 unevictable_pgs_stranded 0
今回作成したBBB実行環境の最低限の各種情報の取得を行った。
環境を弄る前にこのような情報の取得をおこなっておくと問題が発生した際に戻るべき指標となる。