Linux free memory confusion.

Hi,
I am trying to know the amount of free memory in linux however get more confused.
all hereunder commands run during one minute at the same box:
1)
$ free -m
total used free shared buffers cached
Mem: 24118 23992 126 0 0 14193
-/+ buffers/cache: 9799 14319
Swap: 16383 0 16383
2)
$top
Mem: 24697152k total, 24573876k used, 123276k free, 0k buffers
Swap: 16777208k total, 84k used, 16777124k free, 14539380k cached
3)
$cat /proc/meminfo
MemTotal: 24697152 kB
MemFree: 122956 kB
Buffers: 0 kB
Cached: 14556828 kB
SwapCached: 0 kB
Active: 9905800 kB
Inactive: 14418416 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 24697152 kB
LowFree: 122956 kB
SwapTotal: 16777208 kB
SwapFree: 16777124 kB
Dirty: 36 kB
Writeback: 0 kB
AnonPages: 9767396 kB
Mapped: 57128 kB
Slab: 179524 kB
PageTables: 32464 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
CommitLimit: 29125784 kB
Committed_AS: 11207060 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 8516 kB
VmallocChunk: 34359729783 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
Hugepagesize: 2048 kB
3)
Script:
---memScriptStart----
TOT=`cat /proc/meminfo | grep MemTotal: | awk '{print $2}'`
USED=`cat /proc/meminfo | grep Active: | awk '{print $2}'`
FREE=$[$TOT - $USED ]
LOG=/tmp/mem_monitor.log
echo > $LOG
SEND=0
if [ "$USED" -gt "0" ]; then
USEDPERC=$[$USED * 100 / $TOT]
echo "Used Percentage : $USEDPERC %"
TOTMB=$[$TOT / 1024 ]
USEDMB=$[$USED / 1024 ]
FREEMB=$[$TOTMB - $USEDMB ]
# echo "Used Percentage : $USEDPERC"
if [ "$USEDPERC" -gt "30" ]; then
SEND=1
STATUS="Warning"
echo "------------------------------------------------------------------" >> $LOG
echo `hostname` >> $LOG
echo "------------------------------------------------------------------" >> $LOG
echo "Total Memory (MB) : $TOTMB" >> $LOG
echo "Used Memory (MB) : $USEDMB" >> $LOG
echo "Free Memory (MB) : $FREEMB" >> $LOG
echo "Used Percentage : $USEDPERC %" >> $LOG
echo "------------------------------------------------------------------" >> $LOG
if [ "$USEDPERC" -gt "95" ]; then
STATUS="Critical"
fi
fi
fi
if [ "$FREEMB" -eq "0" ]; then
SEND=1
STATUS="Fatal"
echo "------------------------------------------------------------------" >> $LOG
echo " No free memory available in " `hostname` >>$LOG
echo "------------------------------------------------------------------" >> $LOG
fi
cat $LOG
---memScriptEnd----
Samle output:
hostname
Total Memory (MB) : 24118
Used Memory (MB) : 10532
Free Memory (MB) : 13586
Used Percentage : 43 %
Thank you,
Edited by: user592759 on May 4, 2011 4:03 AM

Each of the methods you listed will show you memory information, so does also vmstat, which can also be helpful. But memory management is somewhat more complex than total, used and free. What about shared memory /dev/shm, for instance? From what I understand, reporting the free memory will not help you to determine if the computer has enough memory available to perform additional tasks. Your script seems to take the total amount of memory minus the active memory and considers the rest to be free, which is of course different than what the system tools report as free.
The following should describe some of the information available:
http://www.redhat.com/advice/tips/meminfo.html
As long as the server isn’t using swap space, there’s shouldn’t be a concern about physical memory. The memory that’s currency being registered as used can be replaced if another program needs it. To get a "true" reading of memory usage, look at is the -/+ buffers/cache. From an application perspective, the output above shows this server has about 14G of free memory.
http://stackoverflow.com/questions/1407643/how-is-the-linux-calculating-memfree
MemFree in /proc/meminfo is a count of how many pages are free in the buddy allocator. This buddy allocator is the fundamental unit of physical memory allocation in the kernel; however there are a lot of ways pages can be returned to the buddy allocator in time of need - for example, freeing empty SLABs, discarding cache/buffer RAM (even if this means invalidating PTEs in a running process), or as a last resort, swapping things out.
In fact, MemFree is generally controlled to be only 5-10% of total physical RAM, with any extra free RAM being coopted into cache as time goes on. As such, MemFree alone is a very incomplete view of the overall memory situation.

Similar Messages

  • High cache usage of free memory

    I dont know if this is normal but my fresh archlinux x86_64 install with Xfce uses round 300Mb of 4Gb ram space after boot but then after i start and close some programs i get to 3 Gb used of 3.87 Gb free memory when all applycation are closed. Now i understand that kernel caches some data in memory but i cant clear it all with commands:
    sync
    echo 1 > /proc/sys/vm/drop_caches
    echo 2 > /proc/sys/vm/drop_caches
    echo 3 > /proc/sys/vm/drop_caches
    After i do that system reports 540 Mb used compared to 300Mb from boot. Is there a way to limit the ammount of cache usage so i dont end up having all free memory used by cache?
    Last edited by Anril (2009-12-29 13:19:52)

    Ram that is unused is wasted ram, the linux kernel manages it very well so no worries there.
    If you have swap usage it's because most probably you have things stored in the ram that are not being used often but cannot be discarded too so things being used more often take precedence.
    If you think you have enough ram for all your needs then why not disable swap? I've read that there might be a speed penalty for running without swap but I've been running my system without swap (arch64 4G ram) and I've never had any bad surprises.
    There are a few things that might prompt swap usage (don't quote me on that though, it just seems to me to be the case), if you copy many files from one place to the other the kernel will use all the ram available to try to cache them, if you copy many GB then all the ram will get filled (and maybe other things will get evicted to swap).
    It's not a bug, free ram is there to be used, things that have been used/needed recently get to stay in the ram, other things can go to the swap, if you can cache a file that has been recently used and need to use it again shortly after then it's much faster if it is in the ram instead of having to read it again from the hard disk. The logic behind it is good, it's just that some corner cases may make behave badly.

  • How to get the size of free memory in unix?

    I have one oracle database running in unix, and I want to tune the memory used.
    additional, I want to create another database in this server.
    I don't know how many memory left in it.
    Could you tell which unix commands can be used to find out the size of free memory?
    Thanks

    %vmstat 3
    procs memory page disk faults cpu
    r b w swap free re mf pi po fr de sr s0 -- -- -- in sy cs us sy id
    0 0 0 3025816 994456 4 19 6 0 0 0 0 8 0 0 0 459 253 139 1 1 99
    0 0 0 2864688 777408 0 2 0 0 0 0 0 3 0 0 0 428 134 175 0 1 99
    0 0 0 2864688 777408 0 0 0 0 0 0 0 7 0 0 0 448 112 166 0 0 100
    one interesting observation about vmstat I found out is (mostly on Solaris)
    the first line of information always off chart, so I usually do a few interval to get constant result.
    if you use linux
    just
    cat /proc/meminfo

  • Free Memory alternative to iStat

    I used to have iStat which included a free memory tool. Apple forced the removal of the tool. Since then my iPhone experience has been horrible. It is slugglish, hangs, and constantly need rebooting. I've reinstalled, updated, etc.
    When I had iStat I used to simply free up memory when things became sluggish. Now I no longer have that option.
    Does anyone know of any alternative tool or method?

    I agree that resetting is not a viable solution. Whoever marked this thread as having one "solution" reply is not looking at the problem from the viewpoint of a user, but instead that of a programmer. Sure, I could restart a Windows box every time I have an issue, but, since I do not want to have to do this, I use Macs and Linux boxes. Not allowing people to use tools like the fantastic one offered as part of istat to fix a problem they cannot seem to fix is like saying "I gave you the clap and will now keep you from obtaining any treatment at all." Ridiculous.
    Put it back, Apple!

  • My macbook pro model mid 2009 is running slow. free memory is 35 mbs and inactive memory is  1.36 gb with a total of 5 gb RAM memory

    Problem description:
    too much inactive memory 1.87 gb and free memory only 35 mb
    EtreCheck version: 2.1.1 (104)
    Report generated 10 December 2014 3:30:26 pm IST
    Hardware Information: ℹ️
      MacBook Pro (13-inch, Mid 2009) (Verified)
      MacBook Pro - model: MacBookPro5,5
      1 2.26 GHz Intel Core 2 Duo CPU: 2-core
      5 GB RAM Upgradeable
      BANK 0/DIMM0
      1 GB DDR3 1067 MHz ok
      BANK 1/DIMM0
      4 GB DDR3 1067 MHz ok
      Bluetooth: Old - Handoff/Airdrop2 not supported
      Wireless:  en1: 802.11 a/b/g/n
    Video Information: ℹ️
      NVIDIA GeForce 9400M - VRAM: 256 MB
      Color LCD 1280 x 800
    System Software: ℹ️
      OS X 10.10.1 (14B25) - Uptime: 4:42:54
    Disk Information: ℹ️
      WDC WD5000LPVT-80G33T2 disk0 : (500.11 GB)
      S.M.A.R.T. Status: Verified
      EFI (disk0s1) <not mounted> : 210 MB
      [redacted] (disk0s2) / : 499.25 GB (142.01 GB free)
      Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
      HL-DT-ST DVDRW  GS23N 
    USB Information: ℹ️
      Apple Inc. Built-in iSight
      Apple Internal Memory Card Reader
      Apple Inc. Apple Internal Keyboard / Trackpad
      Apple Computer, Inc. IR Receiver
      Apple Inc. BRCM2046 Hub
      Apple Inc. Bluetooth USB Host Controller
    Gatekeeper: ℹ️
      Anywhere
    Kernel Extensions: ℹ️
      /System/Library/Extensions
      [not loaded] com.driver.KUSBModemCDC07 (4.0.2) [Support]
      [not loaded] com.driver.KUSBModemDataA07 (4.0.2) [Support]
    Startup Items: ℹ️
      JHHPortDetect: Path: /Library/StartupItems/JHHPortDetect
      Sudochmod: Path: /Library/StartupItems/Sudochmod
      Startup items are obsolete in OS X Yosemite
    Launch Agents: ℹ️
      [not loaded] com.adobe.AAM.Updater-1.0.plist [Support]
      [running] com.bjango.istatmenusagent.plist [Support]
      [loaded] com.google.keystone.agent.plist [Support]
      [loaded] com.oracle.java.Java-Updater.plist [Support]
      [running] jp.co.canon.CUPSCAPT.BG.plist [Support]
      [loaded] org.macosforge.xquartz.startx.plist [Support]
    Launch Daemons: ℹ️
      [loaded] com.adobe.fpsaud.plist [Support]
      [invalid?] com.adobe.SwitchBoard.plist [Support]
      [running] com.bjango.istatmenusdaemon.plist [Support]
      [loaded] com.google.keystone.daemon.plist [Support]
      [loaded] com.microsoft.office.licensing.helper.plist [Support]
      [loaded] com.oracle.java.Helper-Tool.plist [Support]
      [loaded] com.oracle.java.JavaUpdateHelper.plist [Support]
      [loaded] org.macosforge.xquartz.privileged_startx.plist [Support]
      [loaded] org.tcpdump.chmod_bpf.plist [Support]
    User Launch Agents: ℹ️
      [loaded] com.adobe.ARM.[...].plist [Support]
    User Login Items: ℹ️
      iTunesHelper Application (/Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)
      Caffeine Application (/Applications/Caffeine.app)
      AdobeResourceSynchronizer ApplicationHidden (/Applications/Adobe Reader.app/Contents/Support/AdobeResourceSynchronizer.app)
      Dropbox Application (/Applications/Dropbox.app)
      HyperDock Helper UNKNOWN (missing value)
    Internet Plug-ins: ℹ️
      o1dbrowserplugin: Version: 5.38.6.0 - SDK 10.8 [Support]
      Default Browser: Version: 600 - SDK 10.10
      AdobePDFViewerNPAPI: Version: 11.0.09 - SDK 10.6 [Support]
      FlashPlayer-10.6: Version: 15.0.0.246 - SDK 10.6 [Support]
      Flash Player: Version: 15.0.0.246 - SDK 10.6 Mismatch! Adobe recommends 16.0.0.235
      QuickTime Plugin: Version: 7.7.3
      googletalkbrowserplugin: Version: 5.38.6.0 - SDK 10.8 [Support]
      SharePointBrowserPlugin: Version: 14.0.0 [Support]
      AdobePDFViewer: Version: 11.0.09 - SDK 10.6 [Support]
      zako: Version: zako 1.0.0.0 - SDK 10.8 [Support]
      iPhotoPhotocast: Version: 7.0 - SDK 10.8
      JavaAppletPlugin: Version: Java 7 Update 71 Check version
    User internet Plug-ins: ℹ️
      BlueStacks Install Detector: Version: Unknown
    Safari Extensions: ℹ️
      AdBlock
      ClickToFlash
      Awesome Screenshot
      Breaking News
      The New York Times
    3rd Party Preference Panes: ℹ️
      Flash Player  [Support]
      Java  [Support]
    Time Machine: ℹ️
      Skip System Files: NO
      Mobile backups: ON
      Auto backup: YES
      Volumes being backed up:
      Arupreet: Disk size: 499.25 GB Disk used: 357.24 GB
      Destinations:
      CHIKKI [Local]
      Total size: 331.41 GB
      Total number of backups: 2
      Oldest backup: 2014-06-10 13:36:00 +0000
      Last backup: 2014-09-08 13:57:40 +0000
      Size of backup disk: Too small
      Backup size 331.41 GB < (Disk used 357.24 GB X 3)
    Top Processes by CPU: ℹ️
          8% python
          3% WindowServer
          3% uTorrent
          2% SystemUIServer
          0% mtmfs
    Top Processes by Memory: ℹ️
      1.29 GB JavaAppLauncher
      123 MB SystemUIServer
      102 MB iStatMenusDaemon
      86 MB com.apple.WebKit.WebContent
      81 MB WindowServer
    Virtual Memory Information: ℹ️
      50 MB Free RAM
      1.97 GB Active RAM
      1.90 GB Inactive RAM
      673 MB Wired RAM
      6.70 GB Page-ins
      8 MB Page-outs
    Diagnostics Information: ℹ️
      Dec 10, 2014, 10:48:11 AM Self test - passed
      Dec 9, 2014, 02:54:15 AM VLC_2014-12-09-025415_Arus-MacBook-Pro.crash

    Not sure if using Terminal would help:
    Launch Activity Monitor
    Select Memory tab
    Launch Terminal
    type sudo purge
    password
    10-15 sec later Terminal should refresh and show freed memory & cache

  • Set get parameter but free memory id is not working

    Hi All,
    I am using set get parameter  to transfer data from one module to another .
    But when i am trying to clear the memory id using Free memory id .
    it is not doing that.
    Does it work with import export.
    What method i should use to clear this memory id ..
    Thanks in advance
    ANit gautam

    Clears the memory:
    SET PARAMETER ID pid FIELD space.

  • I have two iphones, different telcos, i am using the same apple id for both - how can i use the 10GB icloud free memory of my new iphone 5?

    I have two iphones, different telcos, i am using the same apple id for both - how can i use the 10GB icloud free memory of my new iphone 5?

    Thank you KiltedTim!
    YES, that is the free 5GB icloud memory for each apple ID. Can I not add the free 5Gb of my second Iphone to my original apple ID (5GB also) as I want to use one Apple ID name on both 2 Iphones? Is it necessary to have a different apple ID for the second Iphone to avail the free 5GB it carries with it?

  • I have copied videos onto an external hard drive. to free memory on my macbook. When I try to delete these I am warned that I will not be able to use this video in existing projects   How do I point iMovie to events in my external  hard drive so I can pl

    I have copied videos onto an external hard drive. to free memory on my macbook. When I try to delete these I am woarned that I will not be able to use this video in existing projects
    How do I point iMovie to events in my external  hard drive so I can play projects which use them?
    MacBook, iMovie 9.0.4

    Hi
    You can do this - by not doing it the way You describe as it will not work.
    a. the external hard disk - MUST BE - Mac OS extended (hfs) formatted -
    UNIX/DOS/FAT32/Mac OS Exchange - will work for most things - BUT NOT FOR VIDEO (iMovie, iDVD or FinalCut doesn't matter)
    b. Do not alter or move any folder named
    • iMovie Event's - or -
    • iMovie Project's
    on DeskTop/Finder - at all
    All moving's of Events and Projects must be done within the iMovie Application - then connections will not break.
    (move them back and see if iMovie remembers them - then do move as described above)
    Yours Bengt W

  • My macbook air has no longer free memory. Now, when i turn it on, all i can see is a blue landskape and can`t see de dock anymore. how can i clean the memory and get free space?

    hi, my macbook air has no longer free memory space. I haven`t done anything since it started to comunicate me that. now when i turn it on all i can see is de apple on the top left corner and the rest of the monitor is blue. how can i get some memory space since i can`t even onpen the finder?/

    Choose Preferences from the Finder menu, click on the General tab, and uncheck the box to open folders in a new tab.
    (117195)

  • HP Laserjet p1102w - after firmware upgrade / Smart Install update - down to 1MB free memory

    Hello,
    I have a Laserjet p1102w running off a laptop with Windows 7 64-bit. Just bought the printer this month.
    After updating the firmware to 20120814 version and updating the SmartInstall update utility for the 20120814 version as well, I am now down to 1 MB free memory (out of 8MB originally). [Another LJ p1102w updated prior to these updates has 3MB free memory.]
    Because I have 1MB free memory, the printer is almost a brick. It can print simple text based pages - however, printing any page with a graphic or a PDF file will cause the printer to take forever to receive data - essentially preventing printing a page on  my new printer (while printing the same page instantaneously on my older nonupdated p1102w).
    Is there any way to fix this problem, given there is no memory upgrade option? Otherwise, this printer is a brick.
    Thank you in advance for a reply - especially from HP.

    Hi cyskim,
    Did you tried turning the printer off and on after updating the firmware? This should clear its memory, including any memory may affected during the firmware upgrade proccess .
    Say thanks by clicking the Kudos thumb up in the post.
    If my post resolve your problem please mark it as an Accepted Solution

  • Free memory command

    hello everybody
    im getting a short dump of memory storage not available when double looping
    loop at idatafile into wa_datafile.
       refresh i_update_bef.
          refresh i_old_bef.
          refresh i_old_after.
        date = sy-datum.
        concatenate date6(2) date4(2) date+0(4) into date2
        separated by '.' .
        concatenate '31' '12' '9999' into end_date
        separated by '.' .
        concatenate '9999' '12' '31' into end_date2.
       refresh icustomer.
        select  * from knvh into
        corresponding fields of table icustomer
        where hkunnr = wa_datafile-kunnr
        and hvkorg = wa_datafile-old_vkorg
        and hvtweg = wa_datafile-old_vtweg
        and hspart = wa_datafile-old_spart.
        loop at icustomer into wa_customer.
        clear datab.
        datab = wa_customer-datab.
        CALL FUNCTION 'BAPI_CUSTOMER_GET_CHILDREN'
             EXPORTING
                  VALID_ON   = wa_customer-datab
                  CUSTHITYP  = wa_customer-hityp
                  NODE_LEVEL = '00'
                  CUSTOMERNO = wa_datafile-kunnr
             IMPORTING
                  RETURN     = return
             TABLES
                  SALES_AREA = isales
                  NODE_LIST  = inode.
        loop at inode into wa_node.
          if  wa_node-parent_customer is initial.
            wa_update-parent_customer = wa_node-customer.
            wa_update-parent_sales_org = wa_datafile-new_vkorg.
            wa_update-parent_distr_chan = wa_datafile-new_vtweg.
            wa_update-parent_division = wa_datafile-new_spart.
            wa_update-custhityp = wa_node-custhityp.
            wa_update-valid_to = end_date2.
            wa_update-valid_from = wa_customer-datab.
            append wa_update to i_update_after.
            wa_update-parent_customer = wa_node-customer.
            wa_update-parent_sales_org = wa_datafile-old_vkorg.
            wa_update-parent_distr_chan = wa_datafile-old_vtweg.
            wa_update-parent_division = wa_datafile-old_spart.
            wa_update-custhityp = wa_node-custhityp.
            wa_update-valid_to = wa_node-valid_to.
            wa_update-customer = space.
             wa_update-salesorg = wa_datafile-old_vkorg.
           wa_update-distr_chan = wa_datafile-old_vtweg.
           wa_update-division = wa_datafile-old_spart.
           wa_update-custhityp = wa_node-custhityp.
           wa_update-valid_from = wa_node-valid_from.
          append wa_update to i_old_bef.
          else.
            clear date3.
            concatenate   date0(4) date4(2) date+6(2) into date3.
            wa_update-parent_customer = wa_node-parent_customer.
            wa_update-parent_sales_org = wa_datafile-old_vkorg.
            wa_update-parent_distr_chan = wa_datafile-old_vtweg.
            wa_update-parent_division = wa_datafile-old_spart.
            wa_update-custhityp = wa_node-custhityp.
            wa_update-valid_to = wa_node-valid_to.
            wa_update-customer = wa_node-customer.
             wa_update-salesorg = wa_datafile-old_vkorg.
           wa_update-distr_chan = wa_datafile-old_vtweg.
           wa_update-division = wa_datafile-old_spart.
           wa_update-custhityp = wa_node-custhityp.
           wa_update-valid_from = wa_node-valid_from.
          append wa_update to i_old_bef.
    *check if customer exist in new sales area
    *if it exits check in table knvh
    *if it does not exist, insert
            select single *
            into wa_knvv
            from knvv
            where kunnr = wa_node-customer
            and vkorg = wa_datafile-new_vkorg
            and vtweg = wa_datafile-new_vtweg
            and spart = wa_datafile-new_spart.
            if sy-subrc ne 0.
    *if customer doesnt exist in new sales area, create it in new_sales area
              select single
              ktokd into ktokd
              from kna1
              where kunnr = wa_node-customer.
              if ktokd = c_h_acc_group.
               perform copy_sales_area_hierarchy
                           using wa_node-customer wa_datafile-new_vkorg
                               wa_datafile-new_vtweg wa_datafile-new_spart
                               wa_datafile-old_vkorg wa_datafile-old_vtweg
                               wa_datafile-old_spart.
              else.
               perform copy_sales_area
                               using wa_node-customer wa_datafile-new_vkorg
                               wa_datafile-new_vtweg wa_datafile-new_spart
                               wa_datafile-old_vkorg wa_datafile-old_vtweg
                               wa_datafile-old_spart.
              endif.
             endif.
              select single *
              into wa_knvh
              from knvh
              where hityp = wa_node-custhityp
              and hkunnr = wa_node-parent_customer
              and hvkorg = wa_datafile-new_vkorg
              and hvtweg = wa_datafile-new_vtweg
              and hspart = wa_datafile-new_spart
              and datab = wa_node-valid_from.
              if sy-subrc ne 0.
                wa_update-parent_customer = wa_node-parent_customer.
                wa_update-parent_sales_org = wa_datafile-new_vkorg.
                wa_update-parent_distr_chan = wa_datafile-new_vtweg.
                wa_update-parent_division = wa_datafile-new_spart.
                wa_update-custhityp = wa_node-custhityp.
                wa_update-valid_to = end_date2.
                wa_update-customer = wa_node-customer.
                wa_update-salesorg = wa_datafile-new_vkorg.
                wa_update-distr_chan = wa_datafile-new_vtweg.
                wa_update-division = wa_datafile-new_spart.
                wa_update-custhityp = wa_node-custhityp.
      wa_update-valid_to = wa_node-valid_to.
                wa_update-valid_from = wa_customer-datab.
                append wa_update to i_update_after.
                else.
                  concatenate 'customer' wa_node-customer
             'does not exist in sales area'
             wa_datafile-new_vkorg wa_datafile-new_vtweg
             wa_datafile-new_spart into wa_error-message_v1.
             append wa_error to return4.
               endif.
          endif. "if  wa_node-parent_customer is initial.
        endloop.
       endloop.
    can i use a free memory ?
    will this affect the contents of the internal table?
    should i use this command at the end of ecah loop?

    Hi ,
    I don't think Free Memory will help you in preventing the run-time dump. But i guess strucuturing your program in a better way will certainly will.
    Remove the following statement from within the loop.
    <b>select * from knvh into
    corresponding fields of table icustomer
    where hkunnr = wa_datafile-kunnr
    and hvkorg = wa_datafile-old_vkorg
    and hvtweg = wa_datafile-old_vtweg
    and hspart = wa_datafile-old_spart.</b>
    You can select all data from KNVH table based on the entries in your internal table idatafile using for all entries instead of using a loop-endloop construct.
    This would help you to reduce the no: of loops from 3 to 2.
    Get the field kunnr into the structure of internal table icustomer so that you can select using the above statment & use it in your loop.
    Regards,
    Chetan.
    PS:Reward points if this helps.

  • ISR4000 free memory issue?

    I just deployed several ISR 4351 routers using either IOS 154-3.S1 or 154-3.S2. Client SNMP server triggers alert for the router's free memory as show below (832) only. I am not sure if this is a problem or not because normally the router's free memory should be much higher that that.
    I have rebooted the routers and also update IOS but the amount of free memory remains.
    Can Cisco or anyone here tell me about this? Thanks
    HOSTNAME>sh proc mem  sorted
    Processor Pool Total: 1728098704 Used:  370046800 Free: 1358051904
     lsmpi_io Pool Total:    6295128 Used:    6294296 Free:        832
     PID TTY  Allocated      Freed    Holding    Getbufs    Retbufs Process
       0   0  377006912   82912960  270797952          0          0 *Init*         
     499   0   34427888      51936   34751952          0          0 SBC main process
      81   0    8884544    1545568    7069200          0          0 IOSD ipc task  
       0   0    9220864    2337440    6915912    8423503          0 *Dead*         
     152   0    9824400    6197304    4044560     494400     494400 CWAN OIR Handler
     386   0    3853712       5160    3890416     799092          0 EEM ED Syslog  

    Hi,
    The requested outputs for two routers are:
    RTR1>sh proc cpu sorted | ex 0.00
    CPU utilization for five seconds: 3%/0%; one minute: 1%; five minutes: 1%
     PID Runtime(ms)     Invoked      uSecs   5Sec   1Min   5Min TTY Process
     554          93          53       1754  1.83%  0.14%  0.03%   2 SSH Process     
     531       92232     5595416         16  0.39%  0.39%  0.39%   0 IP SLAs Responde
     530       91781     5595574         16  0.39%  0.35%  0.37%   0 IP SLAs Control 
     230       22341     2223886         10  0.07%  0.10%  0.08%   0 Inline Power
    RTR2>sh proc cpu sorted | ex 0.00
    CPU utilization for five seconds: 2%/0%; one minute: 0%; five minutes: 0%
     PID Runtime(ms)     Invoked      uSecs   5Sec   1Min   5Min TTY Process
     504          95          55       1727  1.83%  0.14%  0.03%   2 SSH Process     
     219       34575     2743896         12  0.15%  0.12%  0.13%   0 Ethernet Msec Ti
     230       24330     2187012         11  0.07%  0.10%  0.08%   0 Inline Power    
     173        7807      344731         22  0.07%  0.04%  0.02%   0 VRRS Main thread
      81        9463       75354        125  0.07%  0.05%  0.04%   0 IOSD ipc task 
    They are NOT in production yet so only the management interface is UP. We are worry if this would cause problem once put in the production. Thanks

  • N97 Fluctation in free memory on C

    Hi,
     I’ve noticed that free memory in C:\ fluctuate for no apparent reason.
    Generally my C:\ is hanging around 42.2 mb of free memory but I’ve noticed a quite  a number of times it is fluctuating around 42.1, 42.0mb and even at times 41.9 mb.
     Note: I can confirm that I, for sure, clear all privacy data (hence I don’t think web browsing has left any residue) prior to checking memory on C:\ and haven’t added even a single byte of additional info via any app myself.
     When this happens I generally check the C:\ memory consumption by various apps via the FileManager and have noticed that while memory consumed by all apps remains constant, memory consumption by the Contacts app (built in) have gone up. I do not have hundreds of contacts in my phone hence when my C:\ shows 42.1 Mb Contacts app seem to have consumed around 50-55 kb of memory, which I have no problem with.
    But when C:\ memory falls to say 42.1 or 42.0 or so FileManager shows about 70-75Kb of memory consumption against Contacts app. While this minor increase in memory consumption by Contacts doesn’t justify the drop in free memory on C:\, I continue to wonder what shifts Contacts apps’ memory consumption from 50-55kb to 70-75 kb. I haven’t added any contacts, haven’t edited them with additional info or even associated picks with them newly.
     If I reboot couple of times, SOME TIMES, the free memory on C:\ resets to its usual figure – 42.2MB and the FileManager shows about 50-55kb against the Contacts app.
     Any ideas?

    I Wonder if it could be something like the call/message logs.
    Every time you Call someone or send them a text, it might be tag that info onto the contacts database.
    Try erasing your Logs and see if that increases the memory
    Message Edited by foxmeister on 01-Sep-2009 10:24 AM
    If this Post is helpful. A click on the White Kudos star is always Appreciated
    Last Nokia: Nokia Lumia 800
    Current Phone: A Non Nokia Device
    Previous Phones:Don't Ask ;-)

  • Difference between Free Memory ID and Free Memory ID:  in Performance ?

    HI
    I have to free say around 20 memory IDs.
    Is it wise use
    FREE MEMORY ID 1.
    FREE MEMORY ID 2.
    FREE MEMORY ID N.
    or
    FREE MEMORY ID: 1, 2, .... N.
    Please dont mention about readability.
    Please say about performance only. Will the later increase Performance or former ?
    thanks,
    Padma

    You can measure a run time of your program in SE30. So make program using first variant, run it from SE30 and see results. Than make the same for second variant and you will see difference. It is the same as using GET RUNTIME FIELD statement to measure a run time. But I think you do not have to worry about performance in case of FREE MEMORY, it is relative "cheap" statement. And both variants should take approximately the same time, because they are doing exactly the same, just syntax is different. The second one is just a way how to write the first one into one line. But it will also do 20 times the statement FREE MEMORY.
    Adrian

  • In OSX Activity Monitor, what's the difference between 'free' memory and 'inactive' memory

    In OS X Activity Monitor, what's the difference between 'free' memory and 'inactive' memory. My daughters 2Gb MacBook Pro is very slow, it probably needs more memory but there is almost 1Gb of 'inactive' memory but no 'free' memory when an application is opened.
    Thanks

    Free RAM is the one that has not been used by any application since you started up your Mac, and inactive RAM is the one that was used by an application and it is not in use anymore.
    1 GB of inactive RAM is a lot, and it may be the cause of the slowness. There are a lot of apps that allows you to turn inactive into free RAM. I use FreeMemory, but have a look at the Mac App Store.
    If you are a developer, you can do that with a command you can type into Terminal:
    sudo purge

Maybe you are looking for