remove mem.shared

This commit is contained in:
Doug MacEachern 2006-07-01 02:47:09 +00:00
parent 51e38b4264
commit 475ddf2428
12 changed files with 5 additions and 34 deletions

View File

@ -1,3 +1,7 @@
2006-06-30 Doug MacEachern <dougm@hyperic.com>
* Remove mem.shared, gone in Linux 2.6 and which only left Solaris and Win32
2006-06-21 Doug MacEachern <dougm@hyperic.com> 2006-06-21 Doug MacEachern <dougm@hyperic.com>
* [SIGAR-7] Convert sectors to bytes in Linux file system * [SIGAR-7] Convert sectors to bytes in Linux file system

View File

@ -116,20 +116,6 @@ my %classes = (
Win32 => 'taskman', Win32 => 'taskman',
}, },
}, },
{
name => 'shared', type => 'Long',
desc => 'Total shared system memory',
plat => 'LSW',
cmd => {
AIX => '',
Darwin => '',
FreeBSD => '',
HPUX => '',
Linux => 'free',
Solaris => '',
Win32 => '',
},
},
], ],
Swap => [ Swap => [
{ {
@ -1177,8 +1163,7 @@ EOF
"Mem: " + "Mem: " +
(this.total / 1024) + "K av, " + (this.total / 1024) + "K av, " +
(this.used / 1024) + "K used, " + (this.used / 1024) + "K used, " +
(this.free / 1024) + "K free, " + (this.free / 1024) + "K free";
(this.shared / 1024) + "K shrd";
} }
EOF EOF
ResourceLimit => <<'EOF', ResourceLimit => <<'EOF',

View File

@ -76,7 +76,6 @@ typedef struct {
total, total,
used, used,
free, free,
shared,
actual_used, actual_used,
actual_free; actual_free;
} sigar_mem_t; } sigar_mem_t;

View File

@ -422,8 +422,6 @@ int sigar_mem_get(sigar_t *sigar, sigar_mem_t *mem)
mem->actual_used = mem->used; mem->actual_used = mem->used;
mem->actual_free = mem->free; mem->actual_free = mem->free;
mem->shared = SIGAR_FIELD_NOTIMPL;
sigar_mem_calc_ram(sigar, mem); sigar_mem_calc_ram(sigar, mem);
return SIGAR_OK; return SIGAR_OK;

View File

@ -277,7 +277,6 @@ int sigar_mem_get(sigar_t *sigar, sigar_mem_t *mem)
#endif #endif
mem->used = mem->total - mem->free; mem->used = mem->total - mem->free;
mem->shared = SIGAR_FIELD_NOTIMPL; /*XXX*/
sigar_mem_calc_ram(sigar, mem); sigar_mem_calc_ram(sigar, mem);

View File

@ -65,9 +65,6 @@ int sigar_mem_get(sigar_t *sigar, sigar_mem_t *mem)
mem->free = stats.psd_free * pagesize; mem->free = stats.psd_free * pagesize;
mem->used = mem->total - mem->free; mem->used = mem->total - mem->free;
/*XXX*/
mem->shared = SIGAR_FIELD_NOTIMPL;
mem->actual_free = mem->free; mem->actual_free = mem->free;
mem->actual_used = mem->used; mem->actual_used = mem->used;

View File

@ -370,8 +370,6 @@ int sigar_mem_get(sigar_t *sigar, sigar_mem_t *mem)
mem->actual_free = mem->free + kern; mem->actual_free = mem->free + kern;
mem->actual_used = mem->used - kern; mem->actual_used = mem->used - kern;
mem->shared = SIGAR_FIELD_NOTIMPL; /* XXX where did this go in 2.6?? */
if (get_ram(sigar, mem) != SIGAR_OK) { if (get_ram(sigar, mem) != SIGAR_OK) {
/* XXX other options on failure? */ /* XXX other options on failure? */
sigar_mem_calc_ram(sigar, mem); sigar_mem_calc_ram(sigar, mem);

View File

@ -93,7 +93,6 @@ int sigar_mem_get(sigar_t *sigar, sigar_mem_t *mem)
mem->total = info.TotalKnownSystemMemoryUnder4Gb; mem->total = info.TotalKnownSystemMemoryUnder4Gb;
mem->used = info.TotalWorkMemory; mem->used = info.TotalWorkMemory;
mem->free = mem->total - mem->used; mem->free = mem->total - mem->used;
mem->shared = -1;
mem->actual_free = mem->free; mem->actual_free = mem->free;
mem->actual_used = mem->used; mem->actual_used = mem->used;

View File

@ -49,8 +49,6 @@ int sigar_mem_get(sigar_t *sigar, sigar_mem_t *mem)
sigar_mem_calc_ram(sigar, mem); sigar_mem_calc_ram(sigar, mem);
mem->shared = SIGAR_FIELD_NOTIMPL;
mem->actual_free = mem->free; mem->actual_free = mem->free;
mem->actual_used = mem->used; mem->actual_used = mem->used;

View File

@ -191,10 +191,6 @@ int sigar_mem_get(sigar_t *sigar, sigar_mem_t *mem)
if ((ksp = sigar->ks.mempages) && kstat_read(kc, ksp, NULL) >= 0) { if ((ksp = sigar->ks.mempages) && kstat_read(kc, ksp, NULL) >= 0) {
sigar_koffsets_init_mempages(sigar, ksp); sigar_koffsets_init_mempages(sigar, ksp);
mem->shared = KPAGE_SHIFT(kMEMPAGES(KSTAT_MEMPAGES_EXEC));
/*mem->buffer = KPAGE_SHIFT(kMEMPAGES(KSTAT_MEMPAGES_VNODE));*/
} }
mem->actual_free = mem->free; mem->actual_free = mem->free;

View File

@ -27,7 +27,6 @@ int sigar_mem_get(sigar_t *sigar, sigar_mem_t *mem)
mem->ram = -1; mem->ram = -1;
mem->used = -1; mem->used = -1;
mem->free = -1; mem->free = -1;
mem->shared = -1;
mem->actual_free = mem->free; mem->actual_free = mem->free;
mem->actual_used = mem->used; mem->actual_used = mem->used;
return SIGAR_OK; return SIGAR_OK;

View File

@ -412,7 +412,6 @@ SIGAR_DECLARE(int) sigar_mem_get(sigar_t *sigar, sigar_mem_t *mem)
mem->total = memstat.dwTotalPhys; mem->total = memstat.dwTotalPhys;
mem->free = memstat.dwAvailPhys; mem->free = memstat.dwAvailPhys;
mem->shared = memstat.dwTotalVirtual - memstat.dwAvailVirtual;
mem->used = mem->total - mem->free; mem->used = mem->total - mem->free;
sigar_mem_calc_ram(sigar, mem); sigar_mem_calc_ram(sigar, mem);