Loading ...
Sorry, an error occurred while loading the content.

Re: [nslu2-linux] Re: Need advice- memory

Expand Messages
  • Ovidiu Sas
    Even if you mess with the diversion scripts, the QuickSet will be restarted. Here are my modified scripts to free up more memory for my asterisk server and
    Message 1 of 7 , Jul 31, 2007
    • 0 Attachment
      Even if you mess with the diversion scripts, the  QuickSet will be restarted.


      Here are my modified scripts to free up more memory for my asterisk server and save the flash (unslung 5.5):

      $ diff -w rc.1 rc.1.bak
      25c25
      < if ( ( [ ! -f /.sda1root ] && [ ! -f /.sda2root ] && [ ! -f /.sdb1root ] && [ ! -f /.sdb2root ] ) || [ -f /.ext3flash ] ) ; then
      ---
      > if ( [ ! -f /.sda1root ] && [ ! -f /.sda2root ] && [ ! -f /.sdb1root ] && [ ! -f /.sdb2root ] ) ; then


      $ diff -w rc.local rc.local.bak
      9c9
      < #/usr/sbin/do_umount 2>/dev/null
      ---
      > /usr/sbin/do_umount 2>/dev/null
      13c13
      < #/etc/rc.d/rc.quota 2>/dev/null
      ---
      > /etc/rc.d/rc.quota 2>/dev/null


      $ diff -w rc.quickset rc.quickset.bak
      5,7c5,7
      < #/usr/sbin/QuickSet; check_status
      < #/usr/sbin/USB_Detect; check_status
      < #/usr/sbin/onetouch_detect; check_status
      ---
      > /usr/sbin/QuickSet; check_status
      > /usr/sbin/USB_Detect; check_status
      > /usr/sbin/onetouch_detect; check_status


      $ diff -w rc.samba rc.samba.bak
      18,21c18,20
      < #sleep 2
      < sleep 1
      < #/usr/sbin/smbd -D;
      < #/usr/sbin/nmbd -D;
      ---
      > sleep 2
      > /usr/sbin/smbd -D;
      > /usr/sbin/nmbd -D;


      $ diff -w rc.sysinit rc.sysinit.bak
      11c11
      < if ( ( [ ! -f /.sda1root ] && [ ! -f /.sda2root ] && [ ! -f /.sdb1root ] && [ ! -f /.sdb2root ] ) || [ -f /.ext3flash ] ) ; then
      ---
      > if ( [ ! -f /.sda1root ] && [ ! -f /.sda2root ] && [ ! -f /.sdb1root ] && [ ! -f /.sdb2root ] ) ; then


      $ diff -w rc.xinetd rc.xinetd.bak
      10c10
      < #/bin/inetd &>/dev/null
      ---
      > /bin/inetd &>/dev/null



      And here's the memory usage with asterisk running on my slug:
      $ free
                   total       used       free     shared    buffers     cached
      Mem:         30520      27232       3288          0       2028      14356
      -/+ buffers/cache:      10848      19672
      Swap:            0          0          0



      Hope this helps,
      Ovidiu Sas

      On 7/31/07, quasi_quixotic <rob.hammond@...> wrote:

      --- In nslu2-linux@yahoogroups.com, "janne5011" <janne5011@...> wrote:
      >
      > Hi I need RAM for one app. I know I can comment out the onetouch line
      > in (/usr/sbin/onetouch_detect; check_status),but I thinking of remove
      > samba which I think is using most RAM.
      > Is there any diffrence if I simply kill samba after boot or is it
      > better remove it?
      > Other tips welcome.
      > I use Unslung, latest model.
      >
      Thought that I would follow up this old post because I am also on a
      memory quest.

      There is no doubt to get the best performance is to only run programs
      that are needed and free up as much user ram as possible.

      So regarding Samba I have upgraded to version Samba3 and I run it when
      needed using xinetd. Both smbd and nmbd seems to run just fine from
      xinetd.

      Also although my disk is a maxtor I use killall onetouch_detect in a
      diversion script to kill this daemon i.e I allow the daemon to load
      then I kill it after loading. Again this seems to cause no problems on
      my system.

      Question....
      Is there any scope to expand this to other daemons that seem to be
      loaded i.e by allowing them to load and no doubt do something then kill
      them with a diversion script.

      The list with my unslung 5.5 NSLU2 is :-

      QuickSet
      USB_Detect
      CheckResetButton
      CheckPowerButton
      do_umount

      Not too sure exactly what these do, seems to be little info avaliable
      apart from there title.
      Unsure what Quickset does, does any user have any details.
      I may try killing USB_Detect with my system, if it does what it seems
      to imply then I can probably kill it safely, I only have just the one
      disk attached and once this is detected there is probably no need for
      this daemon.
      CheckResetButton is probably not needed when running from the disk
      image, I cannot think of a reason to press this button.
      I will leave CheckPowerButton, I do press this to shut down.
      Does any user have details of the function of do_umount.


    Your message has been successfully submitted and would be delivered to recipients shortly.