Closed GoogleCodeExporter closed 9 years ago
In "Operating System Concepts, Silberschatz - Galvin - Gagne" the disk memory
is defined Backing Store Memory; this is the current mostly used academical
definition.
Others prefer to call it "Disk cache", this is wrong as the term is related to
the disk cache buffer and sometimes (also wrongly) to the RAMdisk.
So i suggest something like:
psutil.backmem_usage()
or
psutil.backing_usage()
or
psutil.backstore_usage()
I was guessing: wouldn't be easier to introduce a class? This could help in
obtaining a more structured portability.
mem = psutil.Memory()
In Windows:
mem.pagefile_usage
In Linux:
mem.swapfile_usage
Cross-platform:
mem.backstore_usage()
Developer may choose wheter to use the attribute bound to the OS he's
developing on or the more expensive (due to cross-platform adaptation) method.
This would sligthly help performance too.
Original comment by noxda...@gmail.com
on 17 Mar 2012 at 2:06
As for the function name: I think swap_memory() is just fine.
"backing store memory" is something most people never heard of (me included).
"swap", on the other hand, is a well established term which, erroneously or
not, is also used in a lot of cmdline tools and graphical task managers on both
Windows and UNIX. First examples coming to mind are 'free', 'top' and 'htop'
cmdline tools.
Renamed into swap_memory() as of r1476 and also provided swapin/swapout
counters (r1479, r1480, r1481).
Merging into issue 311. Please let's continue discussion there.
Original comment by g.rodola
on 24 Jul 2012 at 6:31
[deleted comment]
Updated csets after the SVN -> Mercurial migration:
r1476 == revision 0f65219565d2
Original comment by g.rodola
on 2 Mar 2013 at 12:07
Original issue reported on code.google.com by
g.rodola
on 6 Mar 2012 at 12:37