Thread: [SSI-devel] [PATCH] print ics statistics via /proc/cluster/icsstat
Brought to you by:
brucewalker,
rogertsang
From: Aneesh K. K.V <ane...@hp...> - 2004-10-26 17:48:50
Attachments:
icsstat.diff
icsstat.txt
|
Hi, The below patch implement /proc/cluster/icsstat. It is nothing but a dump of icsstat structure. The sample file on my machine is attached below. -aneesh |
From: Aneesh K. K.V <ane...@hp...> - 2004-10-26 18:19:53
Attachments:
icsstat.diff
|
Aneesh Kumar K.V wrote: > Hi, > > The below patch implement /proc/cluster/icsstat. It is nothing but a > dump of icsstat structure. The sample file on my machine is attached below. A better version that use the service name and operation name instead of their number as below Number of RPC messages sent per channel Per Operation Channel Service Operation No of RPC messages sent 7 clms rclms_assign_services 0 7 clms rclms_reassign_services 0 7 clms rclms_new_state_intent 0 7 clms rclms_new_state_commit 0 7 clms rclms_transition_unblock 0 7 clms rclms_shutdown_freeze 0 7 clms rclms_roll_forward 0 7 clms rclms_waitfor_nodedowns 0 7 clms rclms_offer_services 0 7 clms rclms_cluster_svrinfo_request 1 |
From: John B. <joh...@hp...> - 2004-10-26 18:32:53
|
Aneesh Kumar K.V wrote: > Aneesh Kumar K.V wrote: > >> Hi, >> >> The below patch implement /proc/cluster/icsstat. It is nothing but a >> dump of icsstat structure. The sample file on my machine is attached >> below. > > > > A better version that use the service name and operation name instead of > their number as below Thanks, we've been needing this. It would be nice to have the subservice as well as the channel. A way of resetting the statistics would be nice. A more serious hack would be to allow the statistics to only be gathered for a set of nodes or per-node statistics, but that is something for another day. John > > Number of RPC messages sent per channel Per Operation > Channel Service Operation No of RPC messages sent > 7 clms rclms_assign_services 0 > 7 clms rclms_reassign_services 0 > 7 clms rclms_new_state_intent 0 > 7 clms rclms_new_state_commit 0 > 7 clms rclms_transition_unblock 0 > 7 clms rclms_shutdown_freeze 0 > 7 clms rclms_roll_forward 0 > 7 clms rclms_waitfor_nodedowns 0 > 7 clms rclms_offer_services 0 > 7 clms rclms_cluster_svrinfo_request 1 > > > ------------------------------------------------------------------------ > > Index: cluster/clms/clms_boot.c > =================================================================== > RCS file: /cvsroot/ci-linux/ci/kernel/cluster/clms/clms_boot.c,v > retrieving revision 1.3.2.5 > diff -u -5 -r1.3.2.5 clms_boot.c > --- cluster/clms/clms_boot.c 25 Aug 2004 01:54:32 -0000 1.3.2.5 > +++ cluster/clms/clms_boot.c 26 Oct 2004 18:16:18 -0000 > @@ -23,13 +23,15 @@ > /* > * This file contains the CLMS Management code. It provides CLMS > * initialization and some common subroutines. > */ > > +#include <linux/module.h> > #include <linux/delay.h> > #include <linux/reboot.h> > #include <linux/init.h> > +#include <linux/seq_file.h> > #include <cluster/nsc.h> > #include <cluster/synch.h> > #include <cluster/clms.h> > #include <cluster/clms/clms_private.h> > #include <cluster/nodelist.h> > @@ -1571,10 +1573,128 @@ > struct file_operations proc_clms_masterlist_operations = { > read: read_clms_masterlist, > write: write_clms_masterlist, > }; > > + > +static int icsstat_show(struct seq_file *m, void *p) > +{ > + int i,j,k; > + seq_printf(m, "Global statistics.\n"); > + seq_printf(m, "Channel Number\tService Name\t\tOperation Name\t\t\n"); > + for (i=0; i < ICS_MAX_CHANNELS; i++) { > + for (j=0; j < ICS_MAX_SUBSERVICES; j++) { > + for (k=0; k < icsstat.istat_proc[i][j]; k++) > + seq_printf(m, "%d\t%s\t%s\n", > + i, > + icsstat.istat_svc_name[i][j], > + icsstat.istat_svc_proc_names[i][j][k]); > + } > + } > + seq_printf(m, "\n\nClient statistics.\n"); > + seq_printf(m, "Number of existing handles: %ld\n", icsstat.istat_clihand); > + seq_printf(m, "Number of RPC sent: %ld\n", icsstat.istat_clirpc); > + seq_printf(m, "Number of messages sent: %ld\n", icsstat.istat_climsg); > + seq_printf(m, "Number of RPC messages sent per channel at different ICS priority\n"); > + seq_printf(m, "Priority\tChannel\tNo of RPC messages sent\n"); > + for (i=0; i < ICS_NUM_PRIO; i++) { > + for (j=0; j < ICS_MAX_CHANNELS; j++) { > + seq_printf(m, "%d\t%d\t%ld\n", i, j, icsstat.istat_clisend[i][j]); > + } > + } > + seq_printf(m, "Number of RPC messages sent per channel Per Operation\n"); > + seq_printf(m, "Channel\tService\tOperation\tNo of RPC messages sent\n"); > + for (i=0; i < ICS_MAX_CHANNELS; i++) { > + for (j=0; j < ICS_MAX_SUBSERVICES; j++) { > + for (k=0; k < icsstat.istat_proc[i][j]; k++) > + seq_printf(m, "%d\t%s\t%s\t%ld\n", i, > + icsstat.istat_svc_name[i][j], > + icsstat.istat_svc_proc_names[i][j][k], > + icsstat.istat_clisend_proc[i][j][k]); > + } > + } > + seq_printf(m, "No of signals forwarded: %ld\n", icsstat.istat_clisigforward); > + seq_printf(m, "No of signals forwarding retries: %ld\n", > + icsstat.istat_clisigforward_retry); > +#if 0 > + /* SSI_XXX We don't support throttling as of now */ > + long istat_clithrottled; /* # high-level ICS clients throttled */ > + long istat_clithrottled_event; /* # times high-level ICS throttled */ > + long istat_llclithrottled[ICS_MAX_CHANNELS]; /* # times low-level */ > + /* ICS clients throttled */ > +#endif > + > + seq_printf(m, "\n\nServer statistics\n"); > + seq_printf(m, "No of handles created: %ld\n", icsstat.istat_svrhand_create); > + seq_printf(m, "No of handles existing: %ld\n", icsstat.istat_svrhand); > + seq_printf(m, "No of RPCs received: %ld\n", icsstat.istat_svrrpc); > + seq_printf(m, "No of messages received: %ld\n", icsstat.istat_svrmsg); > + > + seq_printf(m, "Number of RPC messages received per channel at different ICS priority\n"); > + seq_printf(m, "Priority\tChannel\tNo of RPC messages sent\n"); > + for (i=0; i < ICS_NUM_PRIO; i++) { > + for (j=0; j < ICS_MAX_CHANNELS; j++) { > + seq_printf(m, "%d\t%d\t%ld\n", i, j, icsstat.istat_svrrecv[i][j]); > + } > + } > + seq_printf(m, "Number of RPC messages Received per channel Per Operation\n"); > + seq_printf(m, "Channel\tService\tOperation\tNo of RPC messages sent\n"); > + for (i=0; i < ICS_MAX_CHANNELS; i++) { > + for (j=0; j < ICS_MAX_SUBSERVICES; j++) { > + for (k=0; k < icsstat.istat_proc[i][j]; k++) > + seq_printf(m, "%d\t%s\t%s\t%ld\n", i, > + icsstat.istat_svc_name[i][j], > + icsstat.istat_svc_proc_names[i][j][k], > + icsstat.istat_svrrecv_proc[i][j][k]); > + } > + } > + seq_printf(m, "No of signals forwarded: %ld\n", icsstat.istat_svrsigforward); > + seq_printf(m, "No of signal forwarding retries: %ld\n", > + icsstat.istat_svrsigforward_retry); > + seq_printf(m, "No of times handle alloc deferred : %ld\n", icsstat.istat_svrhand_nomem); > + seq_printf(m, "No of times handle alloc deferred and handle needed : %ld\n", > + icsstat.istat_svrhand_nomem_norecv); > +#if 0 > + long istat_svrhand_recv[ICS_NUM_PRIO][ICS_MAX_CHANNELS]; > + /* # receives handled */ > + /* (by service/proc) */ > + long istat_svrhand_norecv[ICS_NUM_PRIO][ICS_MAX_CHANNELS]; > + /* # messages arrived with no handles */ > +#endif > + seq_printf(m, "No of daemons created: %ld\n", icsstat.istat_svrdaemon_create); > + seq_printf(m, "No of daemons existing: %ld\n", icsstat.istat_svrdaemon); > + seq_printf(m, "No of daemons processing messages: %ld\n", icsstat.istat_svrdaemon_active); > +#if 0 > + long istat_svrdaemon_sleep[ICS_NUM_PRIO]; /* # times daemon slept */ > + /* before receiving message */ > + long istat_svrdaemon_nosleep[ICS_NUM_PRIO]; /* # times daemon did */ > + /* not sleep before receiving message */ > +#endif > + seq_printf(m, "No times nanny daemon woken up: %ld\n", icsstat.istat_svrnanny_run); > +#if 0 > + long istat_svrthrottled[ICS_MAX_CHANNELS]; /* # times high-level */ > +#endif > + return 0; > +} > + > + > + > +static int icsstat_open(struct inode *inode, struct file *file) > +{ > + return single_open(file, icsstat_show, NULL); > +}; > + > + > +struct file_operations proc_icsstat_operations = { > + .owner = THIS_MODULE, > + .open = icsstat_open, > + .read = seq_read, > + .llseek = seq_lseek, > + .release = single_release, > + > +}; > + > int > rclms_write_nm_settings(clusternode_t to_node, int *rerror, > struct nm_settings *nm_settings) > { > int error; > Index: fs/proc/proc_cluster_init.c > =================================================================== > RCS file: /cvsroot/ci-linux/ci/kernel/fs/proc/proc_cluster_init.c,v > retrieving revision 1.1.2.2 > diff -u -5 -r1.1.2.2 proc_cluster_init.c > --- fs/proc/proc_cluster_init.c 13 May 2004 02:06:36 -0000 1.1.2.2 > +++ fs/proc/proc_cluster_init.c 26 Oct 2004 18:16:18 -0000 > @@ -66,9 +66,14 @@ > S_IFREG|S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH, > proc_cluster); > if (ep) > ep->proc_fops = &proc_nm_log_threshold_operations; > > + ep = create_proc_entry("icsstat", > + S_IFREG|S_IRUSR|S_IRGRP|S_IROTH, > + proc_cluster); > + if (ep) > + ep->proc_fops = &proc_icsstat_operations; > #ifdef CONFIG_SSI > proc_cluster_ssi_init(); > #endif > } > Index: include/cluster/ics.h > =================================================================== > RCS file: /cvsroot/ci-linux/ci/kernel/include/cluster/ics.h,v > retrieving revision 1.4.2.5 > diff -u -5 -r1.4.2.5 ics.h > --- include/cluster/ics.h 16 Oct 2004 00:23:28 -0000 1.4.2.5 > +++ include/cluster/ics.h 26 Oct 2004 18:16:18 -0000 > @@ -266,10 +266,12 @@ > * and these are the limits that are used. > */ > extern int icscli_flowpages_lwm; > extern int icscli_flowpages_hwm; > > +/* /proc/cluster/icsstat file operations */ > +extern struct file_operations proc_icsstat_operations; > #endif /* __KERNEL__ */ > > #define ICS_TRANSPORT_NONE 0 > #define ICS_TRANSPORT_IP 1 > #define ICS_TRANSPORT_LTI 2 |
From: Aneesh K. K.V <ane...@hp...> - 2004-10-27 05:52:53
|
John Byrne wrote: > Aneesh Kumar K.V wrote: > >> Aneesh Kumar K.V wrote: >> >>> Hi, >>> >>> The below patch implement /proc/cluster/icsstat. It is nothing but a >>> dump of icsstat structure. The sample file on my machine is attached >>> below. >> >> >> >> >> A better version that use the service name and operation name instead >> of their number as below > > > Thanks, we've been needing this. I committed the changes to CVS. It would be nice to have the subservice > as well as the channel. A way of resetting the statistics would be nice. > I guess this is regarding the No of RPCs sent and received. As of now i /proc/cluster/icsstat provide No of RPCs sent and received at different channel at different priority. It also provide No of RPCs sent and received per channel per service per operation. I guess that should cover what you were looking ? Or did i miss something ? Channel Service Operation No of RPC messages sent 7 clms rclms_assign_services 0 The above message says for Channel 7 for sub service "clms" and for operations "rclms_assign_services" The no of RPC messages sent is 0 -aneesh |
From: John B. <joh...@hp...> - 2004-10-27 17:58:02
|
Aneesh Kumar K.V wrote: > John Byrne wrote: > >> Aneesh Kumar K.V wrote: >> >>> Aneesh Kumar K.V wrote: >>> >>>> Hi, >>>> >>>> The below patch implement /proc/cluster/icsstat. It is nothing but a >>>> dump of icsstat structure. The sample file on my machine is attached >>>> below. >>> >>> >>> >>> >>> >>> A better version that use the service name and operation name instead >>> of their number as below >> >> >> >> Thanks, we've been needing this. > > > I committed the changes to CVS. > > > It would be nice to have the subservice > >> as well as the channel. A way of resetting the statistics would be nice. >> > > I guess this is regarding the No of RPCs sent and received. As of now i > /proc/cluster/icsstat provide > > No of RPCs sent and received at different channel at different priority. > It also provide No of RPCs sent and received per channel per service per > operation. I guess that should cover what you were looking ? Or did i > miss something ? > > Channel Service Operation No of RPC messages sent > 7 clms rclms_assign_services 0 > > > The above message says for Channel 7 for sub service "clms" and for > operations "rclms_assign_services" The no of RPC messages sent is 0 If you are using this to compare ICS statistics running tests under various conditions, it is nice to have a way to reset the counters to zero before you start the tests. > > -aneesh > > |