OpenAFS
OpenAFS distributed network file system
|
00001 /* 00002 * Copyright (c) 2010 Your File System Inc. All rights reserved. 00003 * 00004 * Redistribution and use in source and binary forms, with or without 00005 * modification, are permitted provided that the following conditions 00006 * are met: 00007 * 1. Redistributions of source code must retain the above copyright 00008 * notice, this list of conditions and the following disclaimer. 00009 * 2. Redistributions in binary form must reproduce the above copyright 00010 * notice, this list of conditions and the following disclaimer in the 00011 * documentation and/or other materials provided with the distribution. 00012 * 00013 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR `AS IS'' AND ANY EXPRESS OR 00014 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 00015 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 00016 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 00017 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 00018 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00019 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 00020 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00021 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 00022 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00023 */ 00024 00025 /* rx_stats.h 00026 * 00027 * These are internal structures used by the rx statistics code. Nothing 00028 * in this file should be visible outside the RX module. 00029 */ 00030 00031 /* We memcpy between rx_statisticsAtomic and rx_statistics, so the two 00032 * structures must have the same elements, and sizeof(rx_atomic_t) must 00033 * equal sizeof(int) 00034 */ 00035 00036 struct rx_statisticsAtomic { /* Atomic version of rx_statistics */ 00037 rx_atomic_t packetRequests; 00038 rx_atomic_t receivePktAllocFailures; 00039 rx_atomic_t sendPktAllocFailures; 00040 rx_atomic_t specialPktAllocFailures; 00041 rx_atomic_t socketGreedy; 00042 rx_atomic_t bogusPacketOnRead; 00043 int bogusHost; 00044 rx_atomic_t noPacketOnRead; 00045 rx_atomic_t noPacketBuffersOnRead; 00046 rx_atomic_t selects; 00047 rx_atomic_t sendSelects; 00048 rx_atomic_t packetsRead[RX_N_PACKET_TYPES]; 00049 rx_atomic_t dataPacketsRead; 00050 rx_atomic_t ackPacketsRead; 00051 rx_atomic_t dupPacketsRead; 00052 rx_atomic_t spuriousPacketsRead; 00053 rx_atomic_t packetsSent[RX_N_PACKET_TYPES]; 00054 rx_atomic_t ackPacketsSent; 00055 rx_atomic_t pingPacketsSent; 00056 rx_atomic_t abortPacketsSent; 00057 rx_atomic_t busyPacketsSent; 00058 rx_atomic_t dataPacketsSent; 00059 rx_atomic_t dataPacketsReSent; 00060 rx_atomic_t dataPacketsPushed; 00061 rx_atomic_t ignoreAckedPacket; 00062 struct clock totalRtt; 00063 struct clock minRtt; 00064 struct clock maxRtt; 00065 rx_atomic_t nRttSamples; 00066 rx_atomic_t nServerConns; 00067 rx_atomic_t nClientConns; 00068 rx_atomic_t nPeerStructs; 00069 rx_atomic_t nCallStructs; 00070 rx_atomic_t nFreeCallStructs; 00071 rx_atomic_t netSendFailures; 00072 rx_atomic_t fatalErrors; 00073 rx_atomic_t ignorePacketDally; 00074 rx_atomic_t receiveCbufPktAllocFailures; 00075 rx_atomic_t sendCbufPktAllocFailures; 00076 rx_atomic_t nBusies; 00077 rx_atomic_t spares[4]; 00078 }; 00079 00080 #if defined(RX_ENABLE_LOCKS) 00081 extern afs_kmutex_t rx_stats_mutex; 00082 #endif 00083 00084 extern struct rx_statisticsAtomic rx_stats; 00085 00086 extern void rxi_ResetStatistics(void);