Page 333 - Hacking Roomba
P. 333
314 Part III — More Complex Interfacing
Playing Around on Your Embedded Linux System
Just like any good Linux system, OpenWrt has an SSH server. You can log into it like any
other Linux box:
% ssh root@192.168.0.100
root@192.168.0.100’s password:
BusyBox v1.00 (2006.03.27-00:00+0000) Built-in shell (ash)
Enter ‘help’ for a list of built-in commands.
_______ ________ __
| |. — — -. — — -. — — -.| | | |. — — .| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
WHITE RUSSIAN (RC5) — — — — — — — — — — — — — — — -
* 2 oz Vodka Mix the Vodka and Kahlua together
* 1 oz Kahlua over ice, then float the cream or
* 1/2oz cream milk on the top.
— — — — — — — — — — — — — — — — — — — — — — — — — -
root@OpenWrt:~#
Of course, unlike a normal Linux system, the disk space situation is very different:
root@OpenWrt:~# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 3.2M 1.8M 1.4M 57% /
none 7.0M 20.0k 7.0M 0% /tmp
Notice you only have 3.2 MB of disk total, and over half of it is already in use. But otherwise,
it’s very much like any other command line Linux system. You can ping Google:
root@OpenWrt:~# ping google.com
PING google.com (64.233.167.99): 56 data bytes
64 bytes from 64.233.167.99: icmp_seq=0 ttl=246 time=82.1 ms
64 bytes from 64.233.167.99: icmp_seq=1 ttl=246 time=84.7 ms
64 bytes from 64.233.167.99: icmp_seq=2 ttl=246 time=83.5 ms
Inspecting the Running System
As with any Linux system, you have access to a variety of command line tools to inspect the
running system. You can run top to see what processes are running.
Mem: 8116K used, 6232K free, 0K shrd, 0K buff, 3140K cached
Load average: 0.00, 0.00, 0.00 (State: S=sleeping R=running, i
W=waiting)
PID USER STATUS RSS PPID %CPU %MEM COMMAND
2201 root R 388 2196 0.9 2.7 top
2195 root S 600 296 0.5 4.1 dropbear
2196 root S 436 2195 0.0 3.0 ash
296 root S 400 1 0.0 2.7 dropbear
299 root S 380 1 0.0 2.6 httpd
291 nobody S 364 1 0.0 2.5 dnsmasq