Files
mars-nwe/include/nwnss/include/inst.h
Mario Fetka 1808464145
Some checks failed
Source release / source-package (push) Failing after 1m17s
move to new lib
2026-06-14 21:47:50 +02:00

179 lines
6.1 KiB
C

/****************************************************************************
|
| (C) Copyright 1985, 1991, 1993, 1996 Novell, Inc.
| All Rights Reserved.
|
| This program is free software; you can redistribute it and/or
| modify it under the terms of version 2 of the GNU General Public
| License as published by the Free Software Foundation.
|
| This program is distributed in the hope that it will be useful,
| but WITHOUT ANY WARRANTY; without even the implied warranty of
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
| GNU General Public License for more details.
|
| You should have received a copy of the GNU General Public License
| along with this program; if not, contact Novell, Inc.
|
| To contact Novell about this file by physical or electronic mail,
| you may find current contact information at www.novell.com
|
|***************************************************************************
|
| NetWare Advance File Services (NSS) module
|
|---------------------------------------------------------------------------
|
| $Author: vandana $
| $Date: 2006-11-16 22:18:20 +0530 (Thu, 16 Nov 2006) $
|
| $RCSfile$
| $Revision: 1662 $
|
|---------------------------------------------------------------------------
| This module is used to:
| Defines instrumentation data saved by pss.
|
| WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING!
|
| This header file should ONLY be used for NSS internal development.
| This includes Semantic Agents (SA) and Loadable Storage Services (LSS).
| Any other use may cause conflicts which NSS will NOT fix.
+-------------------------------------------------------------------------*/
#ifndef _INST_H_
#define _INST_H_
#ifndef _ZOMNI_H_
# include <public/zOmni.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* Use to indicate that we will not be doing a pre-read.
* Needed in places where mode says CACHE_UPDATE/CACHE_READ
* but caller is allocating the block so they will just
* be zeroing the block verses reading it. By using
* STAT_CACHE_ALLOCATE it tells the stats not to count
* a MISS.
*/
#define STAT_CACHE_ALLOCATE CACHE_WRITE
typedef struct Inst_s
{
struct
{ /* Oct 2006. We now have two types of caches to track.
The original NSS cache, that works off of Buffer_s and now
the Linux cache. The Linux cache is in Linux himem.
It can hold metadata (just added) or user pages
(added a few months ago). The Linux stats all have
'Linux' in their names. The other stats only track
the original NSS cache. To get a total cache picture
you need to add the Linux items with the NSS items. This
is what 'nss /cachestat' and the BufferCache.xml file
on the admin volume do.
*/
NINT ioMissUserSystem; /* Tracks BOTH user and system in original NSS cache */
NINT ioMissSystem;
NINT ioMissLinuxUserSystem; /* Tracks BOTH user and system in high Linux cache */
NINT ioMissLinuxSystem;
NINT ioHitUserSystem; /* Tracks BOTH user and system in original NSS cache */
NINT ioHitSystem;
NINT ioHitLinuxUserSystem; /* Tracks BOTH user and system in high Linux cache */
NINT ioHitLinuxSystem;
QUAD ioMissUserSystemTotal; /* Tracks BOTH user and system in original NSS cache */
QUAD ioMissSystemTotal;
QUAD ioMissLinuxUserSystemTotal; /* Tracks BOTH user and system in high Linux cache */
QUAD ioMissLinuxSystemTotal;
QUAD ioHitUserSystemTotal; /* Tracks BOTH user and system in original NSS cache */
QUAD ioHitSystemTotal;
QUAD ioHitLinuxUserSystemTotal; /* Tracks BOTH user and system in high Linux cache */
QUAD ioHitLinuxSystemTotal;
NINT numFreePageBuffers; /* PageBuffer_s items on NSS free list */
NINT numMetadataHimemPagesInLowMemory; /* Number of Linux Himem pages that are in low memory. */
QUAD numMetadataHimemPagesAllocFailures;
QUAD numLRUPageBufferDEQFailures;
} cache;
struct
{
NINT grow;
NINT shrink;
NINT insert;
NINT found;
NINT update;
NINT remove; /* 07-22-98: sksmith change delete to remove
because it conflicts with C++ delete. */
NINT split;
NINT join;
struct
{
NINT total;
NINT child;
NINT sibling;
} balance;
struct
{
NINT free;
NINT alloc;
} block;
NINT overflow;
NINT underflow;
} ztree;
struct
{
NINT openCount;
NINT curFileReadCount; /* curr count not yet added to total */
NINT curFileWriteCount; /* curr count not yet added to total */
NINT curBytesRead; /* curr count not yet added to total */
NINT curBytesWritten; /* curr count not yet added to total */
QUAD totalFileReadCount; /* Total number of reads on NSS volumes */
QUAD totalFileWriteCount; /* Total number of reads on NSS volumes */
QUAD totalBytesRead; /* Total bytes read on NSS volumes */
QUAD totalBytesWritten; /* Total bytes written on NSS volumes */
NINT deletedCount; /* File deleted count */
NINT salvagedCount; /* File salvaged count */
NINT purgedCount; /* File purged count */
NINT openFilesCount; /* number of named open files */
} file;
struct
{
NINT hit; /* Beast Hash hit */
NINT positiveHit; /* Beast Hash positive hit */
NINT negativeHit; /* Beast Hash negative hit */
NINT miss; /* Beast Hash miss */
QUAD hitTotal; /* Beast Hash hit (64 bit)*/
QUAD positiveHitTotal; /* Beast Hash positive hit (64 bit)*/
QUAD negativeHitTotal; /* Beast Hash negative hit (64 bit)*/
QUAD missTotal; /* Beast Hash miss (64 bit)*/
} bst;
NINT resetUpTime; /* The 'UpTimeInSeconds' that last reset occurred */
} Inst_s;
typedef struct PageInst_s
{
LONG pgTotal; /* Pages currently allocated to NSS */
QUAD pgAlloc; /* Pages allocated by mallocPage */
QUAD pgZalloc; /* Pages allocated by zallocPage */
QUAD pgFree; /* Pages given back using freePage */
QUAD pgRequest; /* Pages given back by xRequestPage */
QUAD pgContig; /* Pages given back by xRequestContiguousPages */
} PageInst_s;
extern Inst_s Inst;
extern PageInst_s PageInst;
extern void initInst(void);
extern void harvestInst(void);
extern void resetInst(void);
#ifdef __cplusplus
}
#endif
#endif