[<<][openwrt][>>][..]
Sat Jun 23 12:53:06 EDT 2012

OpenWRT setup

Basic idea is to keep the OpenWRT install minimal: provide only an
"emergency stage" to debug the Debian system.  This would be routing +
ssh + openvpn.  OpenWRT is great, but I do prefer the luxury of a full
Debian install..

I do worry a bit about shared libraries, because they will not be the
same for OpenWRT and Debian.  This means there is duplication in RAM.
Might want to add swap space...

Somethint to remember:
authorized_keys goes in /etc/dropbear instead of /root/.ssh/

After killing most apps except init, dropbear and ash, there is still
50M used memory.  Why is this so high?  Most of the apps share
libraries, so is this all kernel stuff?


root@zuk:~# free
             total         used         free       shared      buffers
Mem:         62160        58552         3608            0         8588
-/+ buffers:              49964        12196
Swap:            0            0            0


root@zuk:~# ps
  PID USER       VSZ STAT COMMAND
    1 root      1504 S    init
    2 root         0 SW   [kthreadd]
    3 root         0 SW   [ksoftirqd/0]
    4 root         0 SW   [kworker/0:0]
    5 root         0 SW   [kworker/u:0]
    6 root         0 SW   [rcu_kthread]
    7 root         0 SW<  [khelper]
    8 root         0 SW   [kworker/u:1]
   29 root         0 SW   [sync_supers]
   31 root         0 SW   [bdi-default]
   33 root         0 SW<  [kblockd]
   68 root         0 SW   [kswapd0]
   69 root         0 SW   [fsnotify_mark]
   81 root         0 SW   [kworker/0:1]
   84 root         0 SW   [mtdblock0]
   89 root         0 SW   [mtdblock1]
   94 root         0 SW   [mtdblock2]
   99 root         0 SW   [mtdblock3]
  104 root         0 SW   [mtdblock4]
  272 root      1504 S    init
  324 root         0 SW   [khubd]
 1089 root         0 SW   [scsi_eh_0]
 1090 root         0 SW   [usb-storage]
 1099 root         0 SWN  [jffs2_gcd_mtd3]
 1152 root      1152 S    /usr/sbin/dropbear -P /var/run/dropbear.1.pid -p 22
 1172 root         0 SW   [jbd2/sda1-8]
 1173 root         0 SW<  [ext4-dio-unwrit]
22459 root      1216 S    /usr/sbin/dropbear -P /var/run/dropbear.1.pid -p 22
22460 root      1504 S    -ash
22575 root      1496 R    ps


root@zuk:/root# lsmod
Module                  Size  Used by    Tainted: P  
usb_storage            36096  1 
uhci_hcd               17936  0 
nf_nat_irc               848  0 
nf_conntrack_irc        2512  1 nf_nat_irc
nf_nat_ftp              1008  0 
nf_conntrack_ftp        4544  1 nf_nat_ftp
ipt_MASQUERADE           976  1 
iptable_nat             2128  1 
nf_nat                 10816  4 nf_nat_irc,nf_nat_ftp,ipt_MASQUERADE,iptable_nat
xt_conntrack            2128  3 
xt_CT                   1408  0 
xt_NOTRACK               576  0 
iptable_raw              560  1 
xt_state                 608  0 
nf_conntrack_ipv4       4016  6 iptable_nat,nf_nat
nf_defrag_ipv4           624  1 nf_conntrack_ipv4
nf_conntrack           40640 12 nf_nat_irc,nf_conntrack_irc,nf_nat_ftp,nf_conntrack_ftp,ipt_MASQUERADE,iptable_nat,nf_nat,xt_conntrack,xt_CT,xt_NOTRACK,xt_state,nf_conntrack_ipv4
ehci_hcd               33312  0 
sd_mod                 23264  2 
pppoe                   8320  0 
pppox                   1152  1 pppoe
ipt_REJECT              1776  2 
xt_TCPMSS               2000  0 
ipt_LOG                 6432  0 
xt_comment               400  0 
xt_multiport            1136  0 
xt_mac                   528  0 
xt_limit                1040  1 
iptable_mangle           816  1 
iptable_filter           624  1 
ip_tables               8896  4 iptable_nat,iptable_raw,iptable_mangle,iptable_filter
xt_tcpudp               1664  3 
x_tables                9968 18 ipt_MASQUERADE,iptable_nat,xt_conntrack,xt_CT,xt_NOTRACK,iptable_raw,xt_state,ipt_REJECT,xt_TCPMSS,ipt_LOG,xt_comment,xt_multiport,xt_mac,xt_limit,iptable_mangle,iptable_filter,ip_tables,xt_tcpudp
ppp_async               8128  0 
ppp_generic            19664  3 pppoe,pppox,ppp_async
slhc                    4736  1 ppp_generic
ext4                  242064  1 
jbd2                   49392  1 ext4
mbcache                 3712  1 ext4
wl                   1465968  0 
wl_glue                 1696  1 wl
usbcore               104896  4 usb_storage,uhci_hcd,ehci_hcd
switch_robo             4000  0 
switch_core             4640  1 switch_robo
scsi_mod               71936  2 usb_storage,sd_mod
nls_base                4576  1 usbcore
crc16                    944  1 ext4
crc_ccitt                944  1 ppp_async
ssb_hcd                 2000  0 
bgmac                   8544  0 
diag                    8064  0 

@zuk:/tmp# df /tmp
Filesystem           1K-blocks      Used Available Use% Mounted on
tmpfs                    31080        44     31036   0% /tmp



Funny.  "free" from OpenWRT and Debian do not agree:
Debian:
@zuk:/root# free
             total         used         free       shared      buffers
Mem:         62160        59948         2212            0         8760
-/+ buffers:              51188        10972
Swap:            0            0            0
OpenWRT:
@zuk:/root# free
             total         used         free       shared      buffers
Mem:         62160        59948         2212            0         8760
-/+ buffers:              51188        10972
Swap:            0            0            0



Fresh boot gives this:
root@OpenWrt:~# free
             total         used         free       shared      buffers
Mem:         62160        16108        46052            0         1656
-/+ buffers:              14452        47708
Swap:            0            0            0
Just a bug in free?



[Reply][About]
[<<][openwrt][>>][..]