Caught signal SIGINT (2, "Inte [root@stb:/] # [root@stb:/] #
Acceder a la shell y listado de utilidades de BusyBox
[root@stb:/] # sh / # busybox BusyBox v1.12.4 (2010-11-15 09:44:53 CET) multi-call binary Copyright (C) 1998-2008 Erik Andersen, Rob Landley, Denys Vlasenko and others. Licensed under GPLv2. See source distribution for full notice. Usage: busybox [function] [arguments]... or: function [arguments]... BusyBox is a multi-call binary that combines many common Unix utilities into a single executable. Most people will create a link to busybox for each function they wish to use and BusyBox will act like whatever it was invoked as! Currently defined functions: [, [[, ash, awk, basename, bunzip2, bzcat, cat, chgrp, chmod, chown, clear, cp, cpio, cut, date, dd, df, dirname, dmesg, du, echo, egrep, env, expr, false, fdisk, fgrep, find, fold, fsck, getty, grep, gunzip, gzip, halt, head, hexdump, hostid, hostname, hwclock, id, ifconfig, ifdown, ifup, inetd, init, insmod, kill, killall, killall5, klogd, length, less, linuxrc, ln, logger, login, logname, ls, lsmod, mdev, mesg, mkdir, mkfifo, mknod, mktemp, modprobe, more, mount, mv, netstat, nice, nohup, nslookup, od, ping, poweroff, printenv, printf, ps, pwd, rdev, realpath, reboot, reset, rm, rmdir, rmmod, route, rtcwake, script, sed, sh, sleep, stty, sync, syslogd, tail, tar, tee, telnet, telnetd, test, tftp, tftpd, top, touch, tr, traceroute, true, tty, udhcpc, umount, uname, uniq, usleep, vi, watch, wc, wget, which, whoami, zcat, zcip / #
Listado de directorios de la ubicación actual. # ls
[root@stb:/] # ls bin etc lib opt rw sys var boot home linuxrc proc sbin tmp dev init mnt root share usr [root@stb:/] #
Información acerca del sistema de archivo. # df
[root@stb:/] # df -h Filesystem Size Used Available Use% Mounted on /dev/romblock7 3.3M 3.3M 0 100% /usr /dev/romblock8 14.8M 14.8M 0 100% /usr/local /dev/romblock9 9.9M 9.9M 0 100% /usr/lib/MediaBrowser /dev/romblock10 1.0M 1.0M 0 100% /usr/lib/MediaServer /dev/mtdblock17 814.0M 2.3M 811.7M 0% /rw tmpfs 32.0M 24.0k 32.0M 0% /tmp [root@stb:/] #
Información del sistema. # ls /proc/
[root@stb:/] # ls /proc/ 1 20 359 devices loadavg swaps 10 21 364 diskstats locks sys 11 22 4 driver meminfo sysvipc 12 23 5 execdomains misc tty 13 24 6 filesystems modules uptime 132 25 7 fs mounts version 14 26 8 interrupts mtd vmstat 15 27 9 iomem net yaffs 16 28 bcmdriver ioports partitions zoneinfo 17 29 buddyinfo irq scsi 18 3 bus kallsyms self 19 313 cmdline kcore slabinfo 2 314 cpuinfo kmsg stat [root@stb:/] #
Mediante algunos comandos de BusyBox, podemos obtener información sobre la CPU, memoria, dispositivos, etc.
Información acerca del procesador, tipo, modelo, etc. # cat /proc/cpuinfo
[root@stb:/] # cat /proc/cpuinfo system type : BCM97xxx Settop Platform build target : unknown processor : 0 cpu model : BMIPS4380 V4.4 FPU V0.1 cpu MHz : 402.43 BogoMIPS : 402.43 ( udelay_val : 201216 HZ = 1000 ) wait instruction : yes microsecond timers : yes tlb_entries : 32 extra interrupt vector : yes hardware watchpoint : no ASEs implemented : mips16 VCED exceptions : not available VCEI exceptions : not available RAC setting : Unknown unaligned access : 7 rdhwr/brdhwr traps : 0 / 0 process migrations : 290 processor : 1 cpu model : BMIPS4380 V4.4 FPU V0.1 cpu MHz : 404.48 BogoMIPS : 404.48 ( udelay_val : 202240 HZ = 1000 ) wait instruction : yes microsecond timers : yes tlb_entries : 32 extra interrupt vector : yes hardware watchpoint : no ASEs implemented : mips16 VCED exceptions : not available VCEI exceptions : not available RAC setting : Unknown [root@stb:/] #
Información sobre la memoria física. # cat /proc/meminfo
[root@stb:/] # cat /proc/meminfo MemTotal: 122488 kB MemFree: 59528 kB Buffers: 13300 kB Cached: 36880 kB SwapCached: 0 kB Active: 21296 kB Inactive: 29184 kB HighTotal: 0 kB HighFree: 0 kB LowTotal: 122488 kB LowFree: 59528 kB SwapTotal: 0 kB SwapFree: 0 kB Dirty: 0 kB Writeback: 0 kB AnonPages: 276 kB Mapped: 504 kB Slab: 8352 kB PageTables: 48 kB NFS_Unstable: 0 kB Bounce: 0 kB CommitLimit: 91864 kB Committed_AS: 1156 kB VmallocTotal: 786424 kB VmallocUsed: 3212 kB VmallocChunk: 781648 kB [root@stb:/] #
Información sobre el mapa actual de memoria. # cat /proc/iomem
[root@stb:/] # cat /proc/iomem 00000000-0fffffff : System RAM 00001000-0031544f : Kernel code 00315450-003bf4ff : Kernel data 10480300-104803a8 : brcm-ehci0-IO 10480300-104803a8 : ehci_hcd 10480400-1048046f : brcm-ohci0-IO 10480400-1048046f : ohci_hcd 10480500-104805a8 : brcm-ehci1-IO 10480500-104805a8 : ehci_hcd 10480600-1048066f : brcm-ohci1-IO 10480600-1048066f : ohci_hcd 10510000-1051ffff : sata pci memory space 10510000-10517fff : 0000:01:00.0 10510000-10517fff : sata_svw b0002800-b00028c0 : brcmnand-base d0000000-efffffff : ext pci memory space d0000000-d0003fff : 0000:00:04.0 [root@stb:/] #
Información sobre los dispositivos configurados. # cat /proc/devices
[root@stb:/] # cat /proc/devices Character devices: 1 mem 4 ttyS 5 /dev/tty 5 /dev/console 5 /dev/ptmx 10 misc 13 input 21 sg 30 brcm 90 mtd 128 ptm 136 pts 180 usb 189 usb_device Block devices: 7 loop 8 sd 11 sr 31 mtdblock 65 sd 66 sd 67 sd 68 sd 69 sd 70 sd 71 sd 128 sd 129 sd 130 sd 131 sd 132 sd 133 sd 134 sd 135 sd 253 romblock [root@stb:/] #
Información sobre los sistemas de ficheros montados. # cat /proc/mounts
[root@stb:/] # cat /proc/mounts rootfs / rootfs rw 0 0 none /proc proc rw 0 0 none /sys sysfs rw 0 0 none /dev/pts devpts rw 0 0 none /proc/bus/usb usbfs rw 0 0 /dev/romblock7 /usr squashfs ro 0 0 /dev/romblock8 /usr/local squashfs ro 0 0 /dev/romblock9 /usr/lib/MediaBrowser squashfs ro 0 0 /dev/romblock10 /usr/lib/MediaServer squashfs ro 0 0 /dev/mtdblock17 /rw yaffs rw 0 0 tmpfs /tmp tmpfs rw 0 0 [root@stb:/] #
Información sobre las particiones en la memoria flash y sus puntos de montaje. # cat /proc/mtd
[root@stb:/] # cat /proc/mtd dev: size erasesize name mtd0: 00080000 00010000 "CFE" mtd1: 00020000 00010000 "CFE config" mtd2: 00320000 00010000 "reserved" mtd3: 00020000 00010000 "secure storage" mtd4: 0001f800 00010000 "MAC address" mtd5: 00000800 00010000 "hdcp" mtd6: 00800000 00020000 "Kernel" mtd7: 00c00000 00020000 "/usr" mtd8: 01000000 00020000 "/usr/local" mtd9: 02000000 00020000 "/usr/lib/MediaBrowser" mtd10: 02000000 00020000 "/usr/lib/MediaServer" mtd11: 00800000 00020000 "Kernel (alt)" mtd12: 00c00000 00020000 "/usr (alt)" mtd13: 01000000 00020000 "/usr/local (alt)" mtd14: 02000000 00020000 "/usr/lib/MediaBrowser (alt)" mtd15: 02000000 00020000 "/usr/lib/MediaServer (alt)" mtd16: 00400000 00020000 "Splash" mtd17: 32e00000 00020000 "/rw/yaffs" [root@stb:/] #
Listado de las particiones y su tamaño. # cat /proc/partitions
[root@stb:/] # cat /proc/partitions major minor #blocks name 31 0 512 mtdblock0 31 1 128 mtdblock1 31 2 3200 mtdblock2 31 3 128 mtdblock3 31 4 126 mtdblock4 31 5 2 mtdblock5 31 6 8192 mtdblock6 31 7 12288 mtdblock7 31 8 16384 mtdblock8 31 9 32768 mtdblock9 31 10 32768 mtdblock10 31 11 8192 mtdblock11 31 12 12288 mtdblock12 31 13 16384 mtdblock13 31 14 32768 mtdblock14 31 15 32768 mtdblock15 31 16 4096 mtdblock16 31 17 833536 mtdblock17 253 0 512 romblock0 253 1 128 romblock1 253 2 3200 romblock2 253 3 128 romblock3 253 4 126 romblock4 253 5 2 romblock5 253 6 8192 romblock6 253 7 12288 romblock7 253 8 16384 romblock8 253 9 32768 romblock9 253 10 32768 romblock10 253 11 8192 romblock11 253 12 12288 romblock12 253 13 16384 romblock13 253 14 32768 romblock14 253 15 32768 romblock15 253 16 4096 romblock16 253 17 833536 romblock17 [root@stb:/] #
Sigue leyendo Parte V