The “free” command does not display the correct values

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
-1
down vote

favorite
1












We have a very strange issue on one of our machine redhat 7.2.



How it can be free - 0 , while used is 43 from total 47?



[root@master ~]# free -g
total used free shared buff/cache available
Mem: 47 43 0 0 3 3
Swap: 7 5 1
[root@master ~]# free -k
total used free shared buff/cache available
Mem: 49552508 45570336 296216 237396 3685956 3510224
Swap: 8093692 6053196 2040496


From top:



top - 17:34:40 up 10:39, 2 users, load average: 0.77, 0.81, 0.83
Tasks: 789 total, 1 running, 788 sleeping, 0 stopped, 0 zombie
%Cpu(s): 1.7 us, 0.4 sy, 0.0 ni, 97.7 id, 0.2 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 49552508 total, 831304 free, 45669236 used, 3051968 buff/cache
KiB Swap: 8093692 total, 2056872 free, 6036820 used. 3412568 avail Mem






share|improve this question





















  • 3685956 buff/cache, combined with rounding errors make the last 4G be 'not free', but not used, either. linuxatemyram.com
    – Mioriin
    May 3 at 18:27










  • A quick read of the manpage should clarify why this isn’t amazing.
    – Stephen Kitt
    May 3 at 20:12










  • There is a detailed explanation on how ram is consumed and reported by free on linuxatemyram.com sometimes what we call free to be consumed linux calls it used but available to be consumed.
    – GiannakopoulosJ
    May 4 at 8:16















up vote
-1
down vote

favorite
1












We have a very strange issue on one of our machine redhat 7.2.



How it can be free - 0 , while used is 43 from total 47?



[root@master ~]# free -g
total used free shared buff/cache available
Mem: 47 43 0 0 3 3
Swap: 7 5 1
[root@master ~]# free -k
total used free shared buff/cache available
Mem: 49552508 45570336 296216 237396 3685956 3510224
Swap: 8093692 6053196 2040496


From top:



top - 17:34:40 up 10:39, 2 users, load average: 0.77, 0.81, 0.83
Tasks: 789 total, 1 running, 788 sleeping, 0 stopped, 0 zombie
%Cpu(s): 1.7 us, 0.4 sy, 0.0 ni, 97.7 id, 0.2 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 49552508 total, 831304 free, 45669236 used, 3051968 buff/cache
KiB Swap: 8093692 total, 2056872 free, 6036820 used. 3412568 avail Mem






share|improve this question





















  • 3685956 buff/cache, combined with rounding errors make the last 4G be 'not free', but not used, either. linuxatemyram.com
    – Mioriin
    May 3 at 18:27










  • A quick read of the manpage should clarify why this isn’t amazing.
    – Stephen Kitt
    May 3 at 20:12










  • There is a detailed explanation on how ram is consumed and reported by free on linuxatemyram.com sometimes what we call free to be consumed linux calls it used but available to be consumed.
    – GiannakopoulosJ
    May 4 at 8:16













up vote
-1
down vote

favorite
1









up vote
-1
down vote

favorite
1






1





We have a very strange issue on one of our machine redhat 7.2.



How it can be free - 0 , while used is 43 from total 47?



[root@master ~]# free -g
total used free shared buff/cache available
Mem: 47 43 0 0 3 3
Swap: 7 5 1
[root@master ~]# free -k
total used free shared buff/cache available
Mem: 49552508 45570336 296216 237396 3685956 3510224
Swap: 8093692 6053196 2040496


From top:



top - 17:34:40 up 10:39, 2 users, load average: 0.77, 0.81, 0.83
Tasks: 789 total, 1 running, 788 sleeping, 0 stopped, 0 zombie
%Cpu(s): 1.7 us, 0.4 sy, 0.0 ni, 97.7 id, 0.2 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 49552508 total, 831304 free, 45669236 used, 3051968 buff/cache
KiB Swap: 8093692 total, 2056872 free, 6036820 used. 3412568 avail Mem






share|improve this question













We have a very strange issue on one of our machine redhat 7.2.



How it can be free - 0 , while used is 43 from total 47?



[root@master ~]# free -g
total used free shared buff/cache available
Mem: 47 43 0 0 3 3
Swap: 7 5 1
[root@master ~]# free -k
total used free shared buff/cache available
Mem: 49552508 45570336 296216 237396 3685956 3510224
Swap: 8093692 6053196 2040496


From top:



top - 17:34:40 up 10:39, 2 users, load average: 0.77, 0.81, 0.83
Tasks: 789 total, 1 running, 788 sleeping, 0 stopped, 0 zombie
%Cpu(s): 1.7 us, 0.4 sy, 0.0 ni, 97.7 id, 0.2 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 49552508 total, 831304 free, 45669236 used, 3051968 buff/cache
KiB Swap: 8093692 total, 2056872 free, 6036820 used. 3412568 avail Mem








share|improve this question












share|improve this question




share|improve this question








edited May 4 at 7:07









dr01

15.2k114768




15.2k114768









asked May 3 at 17:33









yael

1,9301144




1,9301144











  • 3685956 buff/cache, combined with rounding errors make the last 4G be 'not free', but not used, either. linuxatemyram.com
    – Mioriin
    May 3 at 18:27










  • A quick read of the manpage should clarify why this isn’t amazing.
    – Stephen Kitt
    May 3 at 20:12










  • There is a detailed explanation on how ram is consumed and reported by free on linuxatemyram.com sometimes what we call free to be consumed linux calls it used but available to be consumed.
    – GiannakopoulosJ
    May 4 at 8:16

















  • 3685956 buff/cache, combined with rounding errors make the last 4G be 'not free', but not used, either. linuxatemyram.com
    – Mioriin
    May 3 at 18:27










  • A quick read of the manpage should clarify why this isn’t amazing.
    – Stephen Kitt
    May 3 at 20:12










  • There is a detailed explanation on how ram is consumed and reported by free on linuxatemyram.com sometimes what we call free to be consumed linux calls it used but available to be consumed.
    – GiannakopoulosJ
    May 4 at 8:16
















3685956 buff/cache, combined with rounding errors make the last 4G be 'not free', but not used, either. linuxatemyram.com
– Mioriin
May 3 at 18:27




3685956 buff/cache, combined with rounding errors make the last 4G be 'not free', but not used, either. linuxatemyram.com
– Mioriin
May 3 at 18:27












A quick read of the manpage should clarify why this isn’t amazing.
– Stephen Kitt
May 3 at 20:12




A quick read of the manpage should clarify why this isn’t amazing.
– Stephen Kitt
May 3 at 20:12












There is a detailed explanation on how ram is consumed and reported by free on linuxatemyram.com sometimes what we call free to be consumed linux calls it used but available to be consumed.
– GiannakopoulosJ
May 4 at 8:16





There is a detailed explanation on how ram is consumed and reported by free on linuxatemyram.com sometimes what we call free to be consumed linux calls it used but available to be consumed.
– GiannakopoulosJ
May 4 at 8:16











1 Answer
1






active

oldest

votes

















up vote
2
down vote



accepted










You're looking at the wrong column. In the first output, the free memory i.e. the RAM available for new applications (without any swap usage) is shown in the available column. This correctly reports 3 Gb, or 3510224 Kb.



47 Gb - 43 Gb = (with rounding errors) 3 Gb



Linux borrows any unused memory for disk caching, that's why you see zero in the freecolumn. But the memory allocated for disk caching is released as soon as other applications request it.






share|improve this answer





















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );








     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f441614%2fthe-free-command-does-not-display-the-correct-values%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote



    accepted










    You're looking at the wrong column. In the first output, the free memory i.e. the RAM available for new applications (without any swap usage) is shown in the available column. This correctly reports 3 Gb, or 3510224 Kb.



    47 Gb - 43 Gb = (with rounding errors) 3 Gb



    Linux borrows any unused memory for disk caching, that's why you see zero in the freecolumn. But the memory allocated for disk caching is released as soon as other applications request it.






    share|improve this answer

























      up vote
      2
      down vote



      accepted










      You're looking at the wrong column. In the first output, the free memory i.e. the RAM available for new applications (without any swap usage) is shown in the available column. This correctly reports 3 Gb, or 3510224 Kb.



      47 Gb - 43 Gb = (with rounding errors) 3 Gb



      Linux borrows any unused memory for disk caching, that's why you see zero in the freecolumn. But the memory allocated for disk caching is released as soon as other applications request it.






      share|improve this answer























        up vote
        2
        down vote



        accepted







        up vote
        2
        down vote



        accepted






        You're looking at the wrong column. In the first output, the free memory i.e. the RAM available for new applications (without any swap usage) is shown in the available column. This correctly reports 3 Gb, or 3510224 Kb.



        47 Gb - 43 Gb = (with rounding errors) 3 Gb



        Linux borrows any unused memory for disk caching, that's why you see zero in the freecolumn. But the memory allocated for disk caching is released as soon as other applications request it.






        share|improve this answer













        You're looking at the wrong column. In the first output, the free memory i.e. the RAM available for new applications (without any swap usage) is shown in the available column. This correctly reports 3 Gb, or 3510224 Kb.



        47 Gb - 43 Gb = (with rounding errors) 3 Gb



        Linux borrows any unused memory for disk caching, that's why you see zero in the freecolumn. But the memory allocated for disk caching is released as soon as other applications request it.







        share|improve this answer













        share|improve this answer



        share|improve this answer











        answered May 4 at 6:58









        dr01

        15.2k114768




        15.2k114768






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f441614%2fthe-free-command-does-not-display-the-correct-values%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay