Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • VTK VTK
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 741
    • Issues 741
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 197
    • Merge requests 197
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VTK
  • VTKVTK
  • Issues
  • #1119
Closed
Open
Created Aug 28, 2004 by Kitware Robot@kwrobotOwner

vtkKWProcessStatistics TestMemory

This issue was created automatically from an original Mantis Issue. Further discussion may take place here.


Since kernel 2.6, the format of /proc/meminfo changed. Ref: http://www.linux.org.uk/~davej/docs/post-halloween-2.6.txt or http://www.kerneltraffic.org/kernel-traffic/kt20030730_224.html

" procps.

- The 2.6 /proc filesystems changed some statistics, which confuse older
  versions of procps. Rik van Riel and Robert Love have been maintaining a
  version of procps during the development of 2.6 which tracks changes to
  /proc which you can find at http://tech9.net/rml/procps/
- Alternatively, the procps by Albert Cahalan now supports the altered formats
  since v3.0.5  -- http://procps.sf.net/
- The /proc/meminfo format changed slightly which also broke gtop in strange
  ways. Likely this also broke some of the KDE/GNOME panel applets.
"

For instance, on my laptop with a Mandrake Linux 10.0,  kernel 2.6.3, the contents is:
MemTotal:      1034284 kB
MemFree:          9444 kB
Buffers:         58280 kB
Cached:         681176 kB
SwapCached:      19576 kB
Active:         834108 kB
Inactive:        81968 kB
HighTotal:      130744 kB
HighFree:          252 kB
LowTotal:       903540 kB
LowFree:          9192 kB
SwapTotal:     1028120 kB
SwapFree:       960084 kB
Dirty:             140 kB
Writeback:           0 kB
Mapped:         236452 kB
Slab:            83344 kB
Committed_AS:   535552 kB
PageTables:       2428 kB
VmallocTotal:   114680 kB
VmallocUsed:     43552 kB
VmallocChunk:    66740 kB

The format on previous kernel was:

root:	total:    	used:    	free:  		shared:	buffers:	cached:
Mem:  	1055760384	1041887232	13873152	0	100417536 	711233536
Swap: 	1077501952  	8540160 	1068961792
	
On the RedHat web site, the result of
cat /proc/meminfo gives both format.
http://www.redhat.com/advice/tips/meminfo.html

Hence, I don't know if the format I have is
Mandrake specific or Linux kernel 2.6 specific.

If I run paraview-build/bin/TestMemory
With Mandrake Linux 10, the result is:

Total physical: 0
     Available: 0
 Total virtual: 0
     Available: 0

In fact, in Common/KWCommon/vtkKWProcessStatistics.cxx
in QueryMemory(), the Linux implementation
rely on the old format of /proc/meminfo.


We need to know first the result of TestMemory under other kernels 2.6 on other distributions and also the
result of cat /proc/meminfo for those kernels

If we have to deals with different versions of
Linux, it has to be done at run-time, not at
compile time.

hence, we need first a call to uname (man 2 uname, #include <sys/utsname.h>)
to know what to scan in /proc/meminfo.
Assignee
Assign to
Time tracking