1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Thibor - memory leak?

Discussion in 'HyperWRT Firmware' started by SirDracula, Nov 16, 2005.

  1. SirDracula

    SirDracula Network Guru Member

    Firmware Version : Hyperwrt_2.1b1_v4.70.6-Thibor, Oct. 19, 2005

    The router has been up for 26 days, when it first started it used about 9.5MB of memory. Now the usage is up to 11.7MB and it's growing, while my usage pattern has not changed.

    I can see how the memory usage can go up a little bit due to caching, buffers, etc. but it looks like it keeps going.

    Are there any known memory leaks (not necessarily in the Thibor code, but maybe in the core firmware, etc.)?

  2. Thibor

    Thibor Super Moderator Staff Member Member

    httpd has always had a memory leak. monitor your free memory using telnet while browsing the routers' gui. you'll see it rising
  3. SirDracula

    SirDracula Network Guru Member

    OK, so if I reboot the router and don't touch the web interface then there should not be any memory leaks, right? I'm wondering if I kill httpd, will it be auotmatically restarted? Once the router is configured I don't need the web interface, telnet is good enough for monitoring.
  4. Thibor

    Thibor Super Moderator Staff Member Member

    that's pretty much what i do to monitor it.
  5. VladTepes77

    VladTepes77 Network Guru Member

    so, the HTTPD service is the answer to my previous post, thnx for informing, now I know the reason for less memory...
  6. SirDracula

    SirDracula Network Guru Member

    Hmm, I'm not sure it's httpd ... I killed it and it only freed about 200K, then a few seconds later it started again (I guess the process_monitor kicks it again) and the memory usage went up by 200K.
  7. SirDracula

    SirDracula Network Guru Member

    Btw, what is VmSize in the ps report below? Is that how much memory each process is using? Or is there another tool that reports that? The same numbers are reported by top.

    If that's the used memory, then I can take a snapshot after a fresh reboot and then at various intervals and compare.

    # uptime
     18:09:49 up 27 days, 19:17, load average: 0.00, 0.01, 0.00
    # free
                  total         used         free       shared      buffers
      Mem:        30676        11736        18940            0         1568
     Swap:            0            0            0
    Total:        30676        11736        18940
    # ps
      PID  Uid     VmSize Stat Command
        1 0           768 S   init noinitrd
        2 0               SW  [keventd]
        3 0               SWN [ksoftirqd_CPU0]
        4 0               SW  [kswapd]
        5 0               SW  [bdflush]
        6 0               SW  [kupdated]
        7 0               SW  [mtdblockd]
       21 0           444 S   resetbutton
       59 0           332 S   tftpd -s /tmp -c -l
       67 0           512 S   nas /tmp/nas.lan.conf /tmp/nas.lan.pid lan
       73 0           292 S   /sbin/telnetd -l /bin/sh
       84 0           344 S   udhcpd /tmp/udhcpd.conf
       88 0           332 S   dnsmasq -i br0 -r /tmp/resolv.conf
       93 0           528 S   process_monitor
      101 0           324 S   cron
    27989 0           400 S   /bin/sh
    28021 0           620 S   httpd
    28087 0           336 R   ps
  8. snwbdr

    snwbdr Network Guru Member

    Newbie question, when I telnet in, I type in top to monitor right?
    then it automatically refreshes.
    It gives the same info when I run command top from the gui. Anyway to automaticaly refresh the top command? Or am I doing this wrong?
    Just curious
  9. albunix

    albunix Network Guru Member


    top -d 1

    will refresh in 1 sec :)

Share This Page