home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Network Support Encyclopedia 96-1
/
novell-nsepro-1996-1-cd2.iso
/
download
/
netware
/
xmem1.exe
/
XMEM1.C
next >
Wrap
C/C++ Source or Header
|
1995-08-28
|
4KB
|
107 lines
/**************************************************************************
** File: xmem1.c
**
** Desc: An attempt to get the amount of memory on a 4.x server
**
**
** DISCLAIMER
**
** Novell, Inc. makes no representations or warranties with respect to
** any NetWare software, and specifically disclaims any express or
** implied warranties of merchantability, title, or fitness for a
** particular purpose.
**
** Distribution of any NetWare software is forbidden without the
** express written consent of Novell, Inc. Further, Novell reserves
** the right to discontinue distribution of any NetWare software.
**
** Novell is not responsible for lost profits or revenue, loss of use
** of the software, loss of data, costs of re-creating lost data, the
** cost of any substitute equipment or program, or claims by any party
** other than you. Novell strongly recommends a backup be made before
** any software is installed. Technical support for this software
** may be provided at the discretion of Novell.
**
**
** Programmers:
**
** Ini Who Firm
** ---------------------------------------------------------------------
** DWH Dirk W. Howard Novell Developer Support
**
**
** History:
**
** When Who What
** ---------------------------------------------------------------------
** 12-15-1994 DWH First code.
**
*/
#include <stdio.h>
#include <nwservst.h>
#include <errno.h>
int main()
{
GetCacheInfoStructure buffer;
CacheMemoryCounters *memCntrs;
CacheTrendCounters *trndCntrs;
CacheInformation *info;
LONG lccode;
lccode = SSGetCacheInfo( (BYTE *) &buffer, sizeof(buffer) );
if ( lccode != ESUCCESS )
{
printf( "Error %ld returned by SSGetCacheInfo.\n\n", lccode );
return 1;
}
memCntrs = &buffer.MemoryCntrs;
trndCntrs = &buffer.TrendCntrs;
info = &buffer.CacheInfo;
printf( "OriginalNumberOfCacheBuffers : %ld kb\n"
"CurrentNumberOfCacheBuffers : %ld kb\n"
"CacheDirtyBlockThreshold : %ld kb\n"
"\n",
memCntrs->OriginalNumberOfCacheBuffers * 4096,
memCntrs->CurrentNumberOfCacheBuffers * 4096,
memCntrs->CacheDirtyBlockThreshold * 4096
);
printf( "NumOfCacheChecks : %ld\n"
"NumOfCacheHits : %ld\n"
"LRUSittingTime : %ld\n"
"\n",
trndCntrs->NumOfCacheChecks,
trndCntrs->NumOfCacheHits,
trndCntrs->LRUSittingTime
);
printf( "MaximumByteCount : %ld kb\n"
"MinimumNumberOfCacheBuffers : %ld\n"
"MinimumCacheReportThreshold : %ld\n"
"AllocateWaitingCount : %ld\n"
"NDirtyBlocks : %ld\n"
"CacheDirtyWaitTime : %ld\n"
"CacheMaximumConcurrentWrites : %ld\n"
"MaximumDirtyTime : %ld\n"
"NumberOfDirectoryCacheBuffers : %ld\n"
"CacheByteToBlockShiftFactor : %ld\n"
"\n",
info->MaximumByteCount * 4096,
info->MinimumNumberOfCacheBuffers,
info->MinimumCacheReportThreshold,
info->AllocateWaitingCount,
info->NDirtyBlocks,
info->CacheDirtyWaitTime,
info->CacheMaximumConcurrentWrites,
info->MaximumDirtyTime,
info->NumberOfDirectoryCacheBuffers,
info->CacheByteToBlockShiftFactor
);
return 0;
}