• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    Low disk space on MANGO

    Mango General
    4
    7
    2.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      georgestefan
      last edited by

      Hello, I have an 8GB MangoES and it's running low on space. This is a picture of the space usage from the putty:

      0_1531995515199_2018-07-19_13-17-14.jpg

      And if I run this command: du -sh /opt/* it gives me this result:

      0_1531995572058_2018-07-19_13-17-30.jpg

      So from this it seems that my files are not so big in the mango folder. Any idea why my disk space is almost full or how I can clear some space?

      Thank you!

      1 Reply Last reply Reply Quote 0
      • JoelHaggarJ
        JoelHaggar
        last edited by

        Can you run the same command on the root file system to see other folders taking up space? Is your MangoES running the latest version? There were some issues resolve in the MangoES Configuration Module that stopped system logs from taking up space?

        Here are two relevant release notes from the MangoES Configuration Module:

        Version 3.3.1
        Fixes to prevent /var/mail/mail file from growing, delete that file if present
        Version 1.2.1
        Fix for inodes filling /var/spool/exim4/input from /etc/cron.d/system-info cron commands

        G 1 Reply Last reply Reply Quote 1
        • G
          georgestefan @JoelHaggar
          last edited by

          @joelhaggar Yes, it is an older version.

          I checked the /var/mail/mail file and that one was the problem. I deleted the file and now it's ok.

          Thank you!

          1 Reply Last reply Reply Quote 0
          • A
            andrewh
            last edited by andrewh

            We have 6 older mangoES'es (8GB) that we started using a couple of years ago and have been updated to v3.5.6. I noticed that one of them was running out of disk space yesterday and discovered the file /var/mail/mail was about 750MB. I checked this forum and discovered this topic. So I deleted the 'mail' file from all 6 mangoES devices, saving around 750MB on each.
            I have checked again today, and the 'mail' files have been recreated and they are already up to 3.3MB on each device I deleted the file from. If this continues, the files will be over 1GB within a year, which is a very large chunk of the 8GB available. I don't want to have to manually delete these files every few months.
            Can you please confirm whether there is a permanent fix?

            1 Reply Last reply Reply Quote 0
            • phildunlapP
              phildunlap
              last edited by

              Hi andrewh,

              Can you share the output of tail -n 50 /var/mail/mail ?

              Also perhaps can you ensure the /etc/cron.d/system-info cron job is directing its stdout and stderr to /dev/null, > /dev/null 2>&1 ? This should have occurred in updating the MangoESConfiguration module to the versions Joel mentioned (or later versions).

              A 1 Reply Last reply Reply Quote 0
              • A
                andrewh @phildunlap
                last edited by andrewh

                @phildunlap Hi Phil

                Here is the output from one of the older mangoes that DOES exhibit the problem:

                mango@mangoES3047:~$sudo tail -n 50 /var/mail/mail
                [sudo] password for mango:
                Envelope-to: root@mangoes
                Delivery-date: Thu, 13 Jun 2019 17:15:02 +0800
                Received: from root by mangoES3047 with local (Exim 4.84)
                (envelope-from root@mangoes)
                id 1hbLp0-0003k9-7R
                for root@mangoes; Thu, 13 Jun 2019 17:15:02 +0800
                From: root@mangoes (Cron Daemon)
                To: root@mangoes
                Subject: Cron root@mangoES3047 /usr/sbin/systemInfo/getAll
                MIME-Version: 1.0
                Content-Type: text/plain; charset=UTF-8
                Content-Transfer-Encoding: 8bit
                X-Cron-Env: <SHELL=/bin/sh>
                X-Cron-Env: <HOME=/root>
                X-Cron-Env: <PATH=/usr/bin:/bin>
                X-Cron-Env: <LOGNAME=root>
                Message-Id: E1hbLp0-0003k9-7R@mangoES3047
                Date: Thu, 13 Jun 2019 17:15:02 +0800

                • Dir=/opt/info/
                • LogFile=systemInfo-new.txt
                • Together=/opt/info/systemInfo-new.txt
                  ++ uname -m
                • arch=armv7l
                • [[ armv7l == \a\r\m\v\7\l ]]
                  ++ mount
                  ++ grep 'on / type'
                  ++ awk '{print $1}'
                • DiskName=/dev/mmcblk0p2
                • echo '########DISK##########'
                • echo -ne 'Disk Name: '
                • echo /dev/mmcblk0p2
                • echo -ne 'Disk Total Size: '
                • df -m /
                • tail -1
                • awk '{print $2}'
                • echo -ne 'Disk Space Used: '
                • df -m /
                • tail -1
                • awk '{print $3}'
                • echo -ne 'Disk Space Left: '
                • df -m /
                • tail -1
                • awk '{print $4}'
                • echo -ne 'Disk Percent Used: '
                • df -m /
                • tail -1
                • awk '{print $5}'
                  /usr/sbin/systemInfo/getAll: line 10: /usr/sbin/systemInfo/timeAlive: No such file or directory

                mango@mangoES3047:~$

                I tried running this frequently for a minute or so - it looks like an entry is added every 30 seconds.

                And here is the output for a new Mango that does NOT exhibit the problem (date is old):
                mango@mangoES3546:/etc/rc1.d$sudo tail -n 50 /var/mail/mail
                [sudo] password for mango:
                Return-path: root@mangoes
                Envelope-to: root@mangoes
                Delivery-date: Fri, 30 Mar 2018 12:36:32 -0600
                Received: from root by mangoes with local (Exim 4.84_2)
                (envelope-from root@mangoes)
                id 1f1yt6-0004zh-CB
                for root@mangoes; Fri, 30 Mar 2018 12:36:32 -0600
                From: root@mangoes (Cron Daemon)
                To: root@mangoes
                Subject: Cron root@mangoes (sleep 30; [ -x /usr/sbin/systemInfo/cronRunner ] & & /usr/sbin/systemInfo/cronRunner);
                MIME-Version: 1.0
                Content-Type: text/plain; charset=UTF-8
                Content-Transfer-Encoding: 8bit
                X-Cron-Env: <SHELL=/bin/sh>
                X-Cron-Env: <HOME=/root>
                X-Cron-Env: <PATH=/usr/bin:/bin>
                X-Cron-Env: <LOGNAME=root>
                Message-Id: E1f1yt6-0004zh-CB@mangoes
                Date: Fri, 30 Mar 2018 12:36:32 -0600

                • Dir=/opt/info/
                • LogFile=systemInfo-new.txt
                • Together=/opt/info/systemInfo-new.txt
                  ++ uname -m
                • arch=armv7l
                • [[ armv7l == \a\r\m\v\7\l ]]
                  ++ mount
                  ++ grep 'on / type'
                  ++ awk '{print $1}'
                • DiskName=/dev/mmcblk0p2
                • echo '########DISK##########'
                • echo -ne 'Disk Name: '
                • echo /dev/mmcblk0p2
                • echo -ne 'Disk Total Size: '
                • df -m /
                • tail -1
                • awk '{print $2}'
                • echo -ne 'Disk Space Used: '
                • df -m /
                • tail -1
                • awk '{print $3}'
                • echo -ne 'Disk Space Left: '
                • df -m /
                • tail -1
                • awk '{print $4}'
                • echo -ne 'Disk Percent Used: '
                • df -m /
                • tail -1
                • awk '{print $5}'

                mango@mangoES3546:/etc/rc1.d$tail -n 50 /var/mail/mail

                The cron job looks OK:

                mango@mangoES3047:/etc/cron.d$more system-info

                Regular cron jobs for the system-info package

                        • root [ -x /usr/sbin/systemInfo/cronRunner ] && /usr/sbin/systemInfo/cr
                          onRunner >/dev/null 2>&1;
                        • root (sleep 30; [ -x /usr/sbin/systemInfo/cronRunner ] && /usr/sbin/sy
                          stemInfo/cronRunner) >/dev/null 2>&1;
                          0 0,6,12,18 * * * /usr/sbin/systemInfo/packages;
                          mango@mangoES3047:/etc/cron.d$

                I compared this to the file on the newer mango, and the only difference I can see is the addition of 'root ' before the path in the last line.
                ie, it's "#0 0,6,12,18 * * * root /usr/sbin/systemInfo/packages;

                Shall I try adding this?

                1 Reply Last reply Reply Quote 0
                • phildunlapP
                  phildunlap
                  last edited by

                  Hmm, that looks okay. I wonder if maybe there's another cron definition invoking the script? You could try commenting out the line that tries to invoke /usr/sbin/systemInfo/timeAlive in /usr/sbin/systemInfo/getAll to see if that error is what's getting there, but I have the same line in the device I'm looking at and it doesn't produce /var/mail/mail contents. That definitely looks a lot like what was happening when the output of the cron job was not being redirected to /dev/null

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post