2
* Copyright 2000, International Business Machines Corporation and others.
5
* This software has been released under the terms of the IBM Public
6
* License. For details, see the LICENSE file in the top-level source
7
* directory or online at http://www.openafs.org/dl/license10.html
9
* Portions Copyright (c) 2003 Apple Computer, Inc.
13
* This file contains sample code for the rxstats interface
16
#include <afsconfig.h>
17
#include <afs/param.h>
19
RCSID("$Header: /afs/sipb.mit.edu/project/openafs/debian/cvs/openafs/src/libadmin/samples/rxdebug_supported_stats.c,v 1.1.1.5 2004/01/10 20:56:46 hartmans Exp $");
25
#include <afs/afs_Admin.h>
26
#include <afs/afs_clientAdmin.h>
27
#include <afs/afs_utilAdmin.h>
30
pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER;
31
pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER;
32
pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
33
#endif /* AFS_DARWIN_ENV */
38
"Usage: rxdebug_supported_stats <host> <port>\n");
52
*srvrName = *(argp++);
55
*srvrPort = strtol(*(argp++), NULL, 0);
56
if (*srvrPort <= 0 || *srvrPort >= 65536)
62
int main(int argc, char *argv[])
66
rxdebugHandle_p handle;
71
ParseArgs(argc, argv, &srvrName, &srvrPort);
73
rc = afsclient_Init(&st);
75
fprintf(stderr, "afsclient_Init, status %d\n", st);
79
rc = afsclient_RXDebugOpenPort(srvrName, srvrPort, &handle, &st);
81
fprintf(stderr, "afsclient_RXDebugOpenPort, status %d\n", st);
85
rc = util_RXDebugSupportedStats(handle, &supported, &st);
87
fprintf(stderr, "util_RXDebugSupportedStats, status %d\n", st);
91
rc = afsclient_RXDebugClose(handle, &st);
93
fprintf(stderr, "afsclient_RXDebugClose, status %d\n", st);
98
printf("security stats: %s supported\n",
99
(supported & RX_SERVER_DEBUG_SEC_STATS) ? "" : " not");
100
printf("all connections:%s supported\n",
101
(supported & RX_SERVER_DEBUG_ALL_CONN) ? "" : " not");
102
printf("rx stats: %s supported\n",
103
(supported & RX_SERVER_DEBUG_RX_STATS) ? "" : " not");
104
printf("waiter count: %s supported\n",
105
(supported & RX_SERVER_DEBUG_WAITER_CNT) ? "" : " not");
106
printf("idle threads: %s supported\n",
107
(supported & RX_SERVER_DEBUG_IDLE_THREADS) ? "" : " not");
108
printf("all peers: %s supported\n",
109
(supported & RX_SERVER_DEBUG_ALL_PEER) ? "" : " not");