From owner-pcp@oss.sgi.com Tue Oct 2 22:38:37 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f935cbP05231 for pcp-outgoing; Tue, 2 Oct 2001 22:38:37 -0700 Received: from rigel.cis.ksu.edu (root@rigel.cis.ksu.edu [129.130.10.65]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f935cZD05228 for ; Tue, 2 Oct 2001 22:38:35 -0700 Received: from pollux.cis.ksu.edu (sada@pollux.cis.ksu.edu [129.130.10.33]) by rigel.cis.ksu.edu (8.9.1/8.9.1/000517) with ESMTP id AAA12414 for ; Wed, 3 Oct 2001 00:38:28 -0500 (CDT) Received: from localhost (sada@localhost) by pollux.cis.ksu.edu (8.9.1/8.9.1/000517) with ESMTP id AAA11821 for ; Wed, 3 Oct 2001 00:38:27 -0500 (CDT) X-Authentication-Warning: pollux.cis.ksu.edu: sada owned process doing -bs Date: Wed, 3 Oct 2001 00:38:27 -0500 (CDT) From: Sadanand Kota To: pcp@oss.sgi.com Subject: PMDA Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-pcp@oss.sgi.com Precedence: bulk Hi, I am writing a new PMDA to collect network statistics. I have a separate routine to fetch the values for n/w characteristics. I just need to call this separate routine to initialize the values for my PMDA. But from where should I call this routine i.e do I need to call it from init() function or from fetcahCallback() function or from other function? Thanks, Sadanand From owner-pcp@oss.sgi.com Tue Oct 2 22:57:42 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f935vgZ05611 for pcp-outgoing; Tue, 2 Oct 2001 22:57:42 -0700 Received: from sgi.com (sgi.SGI.COM [192.48.153.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f935vbD05605 for ; Tue, 2 Oct 2001 22:57:37 -0700 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam: SGI does not authorize the use of its proprietary systems or networks for unsolicited or bulk email from the Internet.) via SMTP id WAA04776 for ; Tue, 2 Oct 2001 22:56:33 -0700 (PDT) mail_from (nathans@wobbly.melbourne.sgi.com) Received: from wobbly.melbourne.sgi.com (wobbly.melbourne.sgi.com [134.14.55.135]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id PAA01590; Wed, 3 Oct 2001 15:56:19 +1000 Received: (from nathans@localhost) by wobbly.melbourne.sgi.com (SGI-8.9.3/8.9.3) id QAA58542; Wed, 3 Oct 2001 16:56:18 +1100 (AEDT) Date: Wed, 3 Oct 2001 16:56:18 +1100 From: Nathan Scott To: Madhu Sudhan R Tera Cc: pcp@oss.sgi.com Subject: Re: writing a PMDA: multiple instances to a metric Message-ID: <20011003165617.H472533@wobbly.melbourne.sgi.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from mst9696@cis.ksu.edu on Mon, Oct 01, 2001 at 12:36:15AM -0500 Sender: owner-pcp@oss.sgi.com Precedence: bulk hi, On Mon, Oct 01, 2001 at 12:36:15AM -0500, Madhu Sudhan R Tera wrote: > Hello all! > I have problem in writing a pmda. > I am writing a pmda called netstat. There are five metrics in it: > pid, sport, saddr, dport,bandwidth (indicating the network bandwidth used > by the corresponding connection). > All these metrics have multiple instances (same number of instances for all). > I have a method which evaluates all the connections and generates the > corresponding values and stores them in a list.Each node in the list > is a structure containing pid, sport, saddr, dport,bandwidth. > Now I am calling this method in netstat_fetchCallBack method. > > In netstat_fetchCallBack I check for each metric as follows: > > if (idp->cluster == 0) { > if (idp->item == 0) // netstat.pid > { > traverse the above generated list and assign pid in each list node > as an instance of my pid metric > ( > atom->cp = val is i suppose can be done if my pid metric has > only one instance.I DONT KNOW HOW TO DO IT WHEN IT HAS MULTIPLE > INSTANCES Have a look at the code in /var/pcp/pmdas/simple/simple.c - that does exactly this sort of thing and will show you what you need to do here. > ... > { PMDA_PMID(0,0), PM_TYPE_STRING, PM_INDOM_NULL, You will need to use something other than PM_INDOM_NULL here (for all of your metrics). These metrics also look like they should be of type PM_TYPE_U32 - refer to the pmLookupDesc(3) man page for a description of the different types (better than pamapi.h). > I have one more question. HOW MANY TIMES IS netstat_fetchCallBack method The fetch callback is called once per metric instance - there is also a fetch routine [as opposed to a fetch _callback routine ;)] which gets called once per fetch request from pmcd. The way most agents work is to refresh their internal state (all the values) in the fetch request, and then pick the values for each individual instance out during the fetchCallback. Again, the "simple" PMDA is a working example of this and is just the sort of code you need, I think - its a good reference implementation of a PMDA. cheers. -- Nathan From owner-pcp@oss.sgi.com Wed Oct 3 15:17:38 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f93MHcY26468 for pcp-outgoing; Wed, 3 Oct 2001 15:17:38 -0700 Received: from rj.sgi.com (rj.SGI.COM [204.94.215.100]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f93MHWD26465 for ; Wed, 3 Oct 2001 15:17:32 -0700 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by rj.sgi.com (8.11.4/8.11.4/linux-outbound_gateway-1.0) with SMTP id f93MHQL14995 for ; Wed, 3 Oct 2001 15:17:26 -0700 Received: from wobbly.melbourne.sgi.com (wobbly.melbourne.sgi.com [134.14.55.135]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id IAA07085; Thu, 4 Oct 2001 08:16:09 +1000 Received: (from nathans@localhost) by wobbly.melbourne.sgi.com (SGI-8.9.3/8.9.3) id JAA95960; Thu, 4 Oct 2001 09:15:58 +1100 (AEDT) Date: Thu, 4 Oct 2001 09:15:58 +1100 From: Nathan Scott To: Madhu Sudhan R Tera Cc: pcp@oss.sgi.com Subject: Re: writing a PMDA: multiple instances to a metric Message-ID: <20011004091558.K472533@wobbly.melbourne.sgi.com> References: <20011003165617.H472533@wobbly.melbourne.sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from mst9696@cis.ksu.edu on Wed, Oct 03, 2001 at 01:30:44AM -0500 Sender: owner-pcp@oss.sgi.com Precedence: bulk hi, On Wed, Oct 03, 2001 at 01:30:44AM -0500, Madhu Sudhan R Tera wrote: > Hello Nathan! > Thanks for your reply. No problem. > simple.c illustrates only for metrics that have a single instance. > It does not show how things work if a metric has multiple instances. I think you'll find that it does... $ pminfo -f simple simple.numfetch value 2 simple.color inst [0 or "red"] value 2 inst [1 or "green"] value 102 inst [2 or "blue"] value 202 simple.now inst [1 or "sec"] value 10 inst [60 or "min"] value 6 inst [3600 or "hour"] value 7 simple.time.user value 0 simple.time.sys value 0.01 So, "simple.color" and "simple.now" are both metrics which have multiple instances. > Secondly we have made use of type PM_TYPE_STRING because the values > in the my list are strings (Sadanand who mailed about the same query, > and myself are both involved in this project) [and in your earlier mail you wrote:] > I am writing a pmda called netstat. There are five metrics in it: > pid, sport, saddr, dport,bandwidth (indicating the network bandwidth used > by the corresponding connection). The reason I suggested a numeric type rather than string is that these values would all seem to be numeric - except maybe saddr? But process ID, bandwidth and port numbers are probably numbers, right? > > You will need to use something other than PM_INDOM_NULL here > > (for all of your metrics). > could you elaborate more on this,please?? The field where you've put PM_INDOM_NULL must instead be an indom (INstance DOMain) identifier - eg. the COLOR_INDOM or NOW_INDOM from simple.c. On a related note, you may find the PCP programmers guide useful: http://techpubs.sgi.com:80/library/tpl/cgi-bin/listdocs.cgi and then find "PCP 2.2" in the list, then click Submit & it will give you a list of URLs - the programmers guide is the 2nd one listed, and you can read it online. cheers. -- Nathan From owner-pcp@oss.sgi.com Wed Oct 3 20:39:09 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f943d9U32553 for pcp-outgoing; Wed, 3 Oct 2001 20:39:09 -0700 Received: from rigel.cis.ksu.edu (root@rigel.cis.ksu.edu [129.130.10.65]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f943d2D32550 for ; Wed, 3 Oct 2001 20:39:02 -0700 Received: from chara.cis.ksu.edu (mst9696@chara.cis.ksu.edu [129.130.10.94]) by rigel.cis.ksu.edu (8.9.1/8.9.1/000517) with ESMTP id WAA06057; Wed, 3 Oct 2001 22:39:01 -0500 (CDT) Received: from localhost (mst9696@localhost) by chara.cis.ksu.edu (8.9.1/8.9.1/000517) with ESMTP id WAA20976; Wed, 3 Oct 2001 22:38:59 -0500 (CDT) X-Authentication-Warning: chara.cis.ksu.edu: mst9696 owned process doing -bs Date: Wed, 3 Oct 2001 22:38:58 -0500 (CDT) From: Madhu Sudhan R Tera To: Nathan Scott cc: pcp@oss.sgi.com Subject: Re: writing a PMDA: multiple instances to a metric In-Reply-To: <20011004091558.K472533@wobbly.melbourne.sgi.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-pcp@oss.sgi.com Precedence: bulk Hello Mr Nathan! I appreciate your quick response. Do you mind if I ask one more question?? My question, in simple.c the number of instances is already known at the beginning of the program.for example simple.color has three and are known already. But in our case, the number of instances that pid or saddr metrics have is the number of nodes in the linked list( each node is a structure contaninig pid, saddr,daddr,sport,dport,and bandwidth).And this list is generated in a method which you asked us to call in fetch routine, in your previous mail.So i do not know before hand how many instances my metric has.Is my pmda design wrong??If not how should i proceed? Thank you very much! regards, Madhu Tera, Sadanand. From owner-pcp@oss.sgi.com Wed Oct 3 20:55:23 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f943tNv32717 for pcp-outgoing; Wed, 3 Oct 2001 20:55:23 -0700 Received: from rj.sgi.com (rj.SGI.COM [204.94.215.100]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f943tGD32712 for ; Wed, 3 Oct 2001 20:55:16 -0700 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by rj.sgi.com (8.11.4/8.11.4/linux-outbound_gateway-1.0) with SMTP id f943t9L02925 for ; Wed, 3 Oct 2001 20:55:10 -0700 Received: from wobbly.melbourne.sgi.com (wobbly.melbourne.sgi.com [134.14.55.135]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id NAA09270; Thu, 4 Oct 2001 13:53:49 +1000 Received: (from nathans@localhost) by wobbly.melbourne.sgi.com (SGI-8.9.3/8.9.3) id OAA68404; Thu, 4 Oct 2001 14:53:48 +1100 (AEDT) Date: Thu, 4 Oct 2001 14:53:48 +1100 From: Nathan Scott To: Madhu Sudhan R Tera Cc: pcp@oss.sgi.com Subject: Re: writing a PMDA: multiple instances to a metric Message-ID: <20011004145347.P472533@wobbly.melbourne.sgi.com> References: <20011004091558.K472533@wobbly.melbourne.sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from mst9696@cis.ksu.edu on Wed, Oct 03, 2001 at 10:38:58PM -0500 Sender: owner-pcp@oss.sgi.com Precedence: bulk hi, On Wed, Oct 03, 2001 at 10:38:58PM -0500, Madhu Sudhan R Tera wrote: > Hello Mr Nathan! > I appreciate your quick response. No problem. > Do you mind if I ask one more question?? Sure, though you can probably guess what my response will be at this stage... ;-) > > My question, in simple.c the number of instances is already known > at the beginning of the program.for example simple.color has > three and are known already. Have a look at the simple.now metrics - these have a "variable" instance domain, just like what you want. This instance domain is calculated at run time, based on the contents of a file - if you change the file (even which the PMDA is running), the next fetch will show the new instance domain. Here's a little example that shows what I'm talking about: 13:48 nathans@troppo /var/pcp/pmdas/simple 16> cat simple.conf sec,min,hour 13:48 nathans@troppo /var/pcp/pmdas/simple 17> pminfo -f simple.now simple.now inst [1 or "sec"] value 31 inst [60 or "min"] value 48 inst [3600 or "hour"] value 13 13:48 nathans@troppo /var/pcp/pmdas/simple 18> sudo echo min > simple.conf simple.conf: Permission denied. 13:48 nathans@troppo /var/pcp/pmdas/simple 19> sudo "echo min > simple.conf" 13:48 nathans@troppo /var/pcp/pmdas/simple 20> pminfo -f simple.now simple.now inst [60 or "min"] value 49 13:49 nathans@troppo /var/pcp/pmdas/simple 21> pminfo -Tt simple.now simple.now [Time of day with a configurable instance domain] Help: The value reflects the current time of day through a dynamically reconfigurable instance domain. On each metric value fetch request, the agent checks to see whether the configuration file in /var/pcp/pmdas/simple/simple.conf has been modified - if it has then the file is re-parsed and the instance domain for this metric is again constructed according to its contents. This configuration file contains a single line of comma-separated time tokens from this set: "sec" (seconds after the minute), "min" (minutes after the hour), "hour" (hour since midnight). An example configuration file could be: sec,min,hour and in this case the simple.now metric would export values for the three instances "sec", "min" and "hour" corresponding respectively to the components seconds, minutes and hours of the current time of day. The instance domain reflects each token present in the file, and the values reflect the time at which the PMDA processes the fetch. > But in our case, the number of instances that pid or saddr metrics > have is the number of nodes in the linked list( each node is a structure > contaninig pid, saddr,daddr,sport,dport,and bandwidth).And this > list is generated in a method which you asked us to call in fetch routine, > in your previous mail.So i do not know before hand how many instances my > metric has. Yes, that sounds exactly like the simple.now metric. > Is my pmda design wrong?? No, not wrong at all - that design is fine. There are many PMDAs which do exactly what you plan on doing. cheers. -- Nathan From owner-pcp@oss.sgi.com Thu Oct 4 10:15:12 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f94HFCw16842 for pcp-outgoing; Thu, 4 Oct 2001 10:15:12 -0700 Received: from deliverator.sgi.com (deliverator.sgi.com [204.94.214.10]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f94HF0D16692 for ; Thu, 4 Oct 2001 10:15:00 -0700 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by deliverator.sgi.com (980309.SGI.8.8.8-aspam-6.2/980310.SGI-aspam) via SMTP id XAA27396 for ; Tue, 2 Oct 2001 23:00:09 -0700 (PDT) mail_from (nathans@wobbly.melbourne.sgi.com) Received: from wobbly.melbourne.sgi.com (wobbly.melbourne.sgi.com [134.14.55.135]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id PAA01606; Wed, 3 Oct 2001 15:58:53 +1000 Received: (from nathans@localhost) by wobbly.melbourne.sgi.com (SGI-8.9.3/8.9.3) id QAA69560; Wed, 3 Oct 2001 16:58:53 +1100 (AEDT) Date: Wed, 3 Oct 2001 16:58:53 +1100 From: Nathan Scott To: Sadanand Kota Cc: pcp@oss.sgi.com Subject: Re: PMDA Message-ID: <20011003165853.I472533@wobbly.melbourne.sgi.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from sada@cis.ksu.edu on Wed, Oct 03, 2001 at 12:38:27AM -0500 Sender: owner-pcp@oss.sgi.com Precedence: bulk hi, On Wed, Oct 03, 2001 at 12:38:27AM -0500, Sadanand Kota wrote: > Hi, > I am writing a new PMDA to collect network statistics. I have a separate Hmm - seems like everyones doing that lately. ;-) > routine to fetch the values for n/w characteristics. > I just need to call this separate routine to initialize the values for > my PMDA. But from where should I call this routine i.e do I need to call You should call it from the "fetch" routine. Have a look at the "simple" PMDA - /var/pcp/pmdas/simple/simple.c is all of its source. > it from init() function or from fetcahCallback() function or from other > function? Neither of these - the "fetch" routine is separate to both the "init" and "fetchCallback" routines. The simple PMDA implements all three of these routines (just as you will need to do). cheers. -- Nathan From owner-pcp@oss.sgi.com Thu Oct 4 10:18:02 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f94HI2517408 for pcp-outgoing; Thu, 4 Oct 2001 10:18:02 -0700 Received: from deliverator.sgi.com (deliverator.sgi.com [204.94.214.10]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f94HHxD17402 for ; Thu, 4 Oct 2001 10:17:59 -0700 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by deliverator.sgi.com (980309.SGI.8.8.8-aspam-6.2/980310.SGI-aspam) via SMTP id BAA05041 for ; Mon, 1 Oct 2001 01:05:49 -0700 (PDT) mail_from (makc@kuku.melbourne.sgi.com) Received: from kuku.melbourne.sgi.com (kuku.melbourne.sgi.com [134.14.55.163]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id SAA16316 for ; Mon, 1 Oct 2001 18:04:33 +1000 Received: (from makc@localhost) by kuku.melbourne.sgi.com (SGI-8.9.3/8.9.3) id SAA31763; Mon, 1 Oct 2001 18:04:32 +1000 (EST) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15288.9104.419188.826941@kuku.melbourne.sgi.com> Date: Mon, 1 Oct 2001 18:04:32 +1000 (EST) From: Max Matveev To: pcp@oss.sgi.com Subject: Re: writing a PMDA: multiple instances to a metric In-Reply-To: References: X-Mailer: VM 6.72 under 21.4 (patch 3) "Academic Rigor" XEmacs Lucid Sender: owner-pcp@oss.sgi.com Precedence: bulk >>>>> "MSRT" == Madhu Sudhan R Tera writes: MSRT> HOW can i assign values to a metric that has multiple MSRT> instances?? As per normal - you decide which instance punter is after and stuff it into the pmAtom, given as a paramter to fetchCallBack method. Remember, metrics and instances are somewhat orthogonal, so to get to a particular value, you have to specify both. MSRT> I have one more question. HOW MANY TIMES IS MSRT> netstat_fetchCallBack method is invoked.Is it true that it is MSRT> called as many times as there are metrics (in my case 5 times, MSRT> as i have 5 metrics pid, sport, saddr, dport,bandwidth) Assuming you're using libpcp_pmda, it will be called for EACH instance for EACH metric, ie. if you have 5 metrics with 4 instances each, it will be called 20 times. max From owner-pcp@oss.sgi.com Tue Oct 9 11:54:03 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f99Is3t21522 for pcp-outgoing; Tue, 9 Oct 2001 11:54:03 -0700 Received: from bach.leonora.org (IDENT:root@adsl-64-162-142-126.dsl.snfc21.pacbell.net [64.162.142.126]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f99Is1D21519 for ; Tue, 9 Oct 2001 11:54:01 -0700 Received: from bach.leonora.org (vladimir@localhost) by bach.leonora.org (8.11.6/8.11.6) with ESMTP id f99Is1d14825 for ; Tue, 9 Oct 2001 11:54:01 -0700 Message-Id: <200110091854.f99Is1d14825@bach.leonora.org> X-Authentication-Warning: bach.leonora.org: vladimir owned process doing -bs From: Vladimir G Ivanovic To: pcp@oss.sgi.com Subject: PCP 2.2.1 and Red Hat Linux 7.1 (2.4.10) SMP Mime-Version: 1.0 (generated by tm-edit 1.8) Content-Type: text/plain; charset=US-ASCII Date: Tue, 09 Oct 2001 11:54:01 -0700 Sender: owner-pcp@oss.sgi.com Precedence: bulk I am running Red Hat Linux 7.1 with a 2.4.10 SMP kernel on a ASUS CUV4X-DLS dual P3 motherboard. I've installed the pcp-2.2.1-3..i386.rpm, read /usr/doc/pcp-2.2.1/INSTALL, and scanned the FAQ and the mailing list archives. When I do # chkconfig pcp on # service pcp start I get 100% (system) CPU usage on one processor, and when I execute `pminfo' I get: # pminfo -fmdt pminfo: Cannot connect to PMCD on host "bach.leonora.org": Connection refused Is PCP known to run on 2.4.10 SMP kernels? (Apparently Linus rewrote the VM for 2.4.10.) Thanks for any help. --- Vladimir Vladimir G. Ivanovic http://leonora.org/~vladimir 2770 Cowper St. vladimir@acm.org Palo Alto, CA 94306-2447 +1 650 678 8014 From owner-pcp@oss.sgi.com Wed Oct 10 17:15:07 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f9B0F7q03325 for pcp-outgoing; Wed, 10 Oct 2001 17:15:07 -0700 Received: from rj.sgi.com (rj.sgi.com [204.94.215.100]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f9B0F4D03322 for ; Wed, 10 Oct 2001 17:15:04 -0700 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by rj.sgi.com (8.11.4/8.11.4/linux-outbound_gateway-1.0) with SMTP id f9B0EwW16611 for ; Wed, 10 Oct 2001 17:14:58 -0700 Received: from sherman.melbourne.sgi.com (sherman.melbourne.sgi.com [134.14.55.175]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id KAA09699; Thu, 11 Oct 2001 10:13:39 +1000 Date: Thu, 11 Oct 2001 10:13:39 +1000 (EST) From: Mark Goodwin X-Sender: markgw@sherman.melbourne.sgi.com To: Vladimir G Ivanovic cc: pcp@oss.sgi.com Subject: Re: PCP 2.2.1 and Red Hat Linux 7.1 (2.4.10) SMP In-Reply-To: <200110091854.f99Is1d14825@bach.leonora.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-pcp@oss.sgi.com Precedence: bulk On Tue, 9 Oct 2001, Vladimir G Ivanovic wrote: > I am running Red Hat Linux 7.1 with a 2.4.10 SMP kernel on a ASUS > CUV4X-DLS dual P3 motherboard. > > I've installed the pcp-2.2.1-3..i386.rpm, read /usr/doc/pcp-2.2.1/INSTALL, > and scanned the FAQ and the mailing list archives. When I do > > # chkconfig pcp on > # service pcp start > > I get 100% (system) CPU usage on one processor, and when I execute > `pminfo' I get: > > # pminfo -fmdt > pminfo: Cannot connect to PMCD on host "bach.leonora.org": Connection refused Is pmcd running? What's in /var/log/pcp/pmcd/pmcd.log? Failing evidence of any other problem, does "pminfo -h localhost -fmdt" work? If so you may be on a host with ip assigned by dhcp or something, in which case bach.leonora.org does not match your ip address. > > Is PCP known to run on 2.4.10 SMP kernels? (Apparently Linus rewrote the > VM for 2.4.10.) I just built a pristine 2.4.10 SMP kernel and it worked just fine. This is on my RH7.1 machine at home - only one CPU though. I'll try the same on a dual CPU box here at work. -- Mark From owner-pcp@oss.sgi.com Thu Oct 11 10:43:39 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f9BHhdE27820 for pcp-outgoing; Thu, 11 Oct 2001 10:43:39 -0700 Received: from bach.leonora.org (IDENT:root@adsl-64-162-142-126.dsl.snfc21.pacbell.net [64.162.142.126]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f9BHhYD27816 for ; Thu, 11 Oct 2001 10:43:34 -0700 Received: from bach.leonora.org (vladimir@localhost) by bach.leonora.org (8.11.6/8.11.6) with ESMTP id f9BHhC921975; Thu, 11 Oct 2001 10:43:12 -0700 Message-Id: <200110111743.f9BHhC921975@bach.leonora.org> X-Authentication-Warning: bach.leonora.org: vladimir owned process doing -bs From: Vladimir G Ivanovic To: Mark Goodwin Cc: pcp@oss.sgi.com, vladimir@bach.leonora.org Subject: Re: PCP 2.2.1 and Red Hat Linux 7.1 (2.4.10) SMP In-Reply-To: Your message of "Thu, 11 Oct 2001 10:13:39 +1000." Mime-Version: 1.0 (generated by tm-edit 1.8) Content-Type: text/plain; charset=US-ASCII Date: Thu, 11 Oct 2001 10:43:12 -0700 Sender: owner-pcp@oss.sgi.com Precedence: bulk Mark, Thanks for your reply. I did not check to see if `pmcd' is running, and I didn't check the log files. (I do not use DHCP.) Since 2.4.12 just came out --I am currently running 2.4.11 that has a symlink bug, hence the need for 2.4.12 -- I will build a 2.4.12 system, and try again. I'll let you know the results. --- Vladimir Vladimir G. Ivanovic http://leonora.org/~vladimir 2770 Cowper St. vladimir@acm.org Palo Alto, CA 94306-2447 +1 650 678 8014 "MG" == Mark Goodwin writes: MG> On Tue, 9 Oct 2001, Vladimir G Ivanovic wrote: >> I am running Red Hat Linux 7.1 with a 2.4.10 SMP kernel on a ASUS >> CUV4X-DLS dual P3 motherboard. >> >> I've installed the pcp-2.2.1-3..i386.rpm, read /usr/doc/pcp-2.2.1/INSTALL, >> and scanned the FAQ and the mailing list archives. When I do >> >> # chkconfig pcp on >> # service pcp start >> >> I get 100% (system) CPU usage on one processor, and when I execute >> `pminfo' I get: >> >> # pminfo -fmdt >> pminfo: Cannot connect to PMCD on host "bach.leonora.org": Connection refused MG> Is pmcd running? What's in /var/log/pcp/pmcd/pmcd.log? Failing evidence MG> of any other problem, does "pminfo -h localhost -fmdt" work? If so you MG> may be on a host with ip assigned by dhcp or something, in which case MG> bach.leonora.org does not match your ip address. >> >> Is PCP known to run on 2.4.10 SMP kernels? (Apparently Linus rewrote the >> VM for 2.4.10.) MG> I just built a pristine 2.4.10 SMP kernel and it worked just fine. MG> This is on my RH7.1 machine at home - only one CPU though. I'll MG> try the same on a dual CPU box here at work. MG> -- Mark From owner-pcp@oss.sgi.com Thu Oct 11 12:13:47 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f9BJDlw29583 for pcp-outgoing; Thu, 11 Oct 2001 12:13:47 -0700 Received: from bach.leonora.org (IDENT:root@adsl-64-162-142-126.dsl.snfc21.pacbell.net [64.162.142.126]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f9BJDgD29580 for ; Thu, 11 Oct 2001 12:13:42 -0700 Received: from bach.leonora.org (vladimir@localhost) by bach.leonora.org (8.11.6/8.11.6) with ESMTP id f9BJDe501778; Thu, 11 Oct 2001 12:13:40 -0700 Message-Id: <200110111913.f9BJDe501778@bach.leonora.org> X-Authentication-Warning: bach.leonora.org: vladimir owned process doing -bs From: Vladimir G Ivanovic To: Mark Goodwin Cc: pcp@oss.sgi.com Subject: Re: PCP 2.2.1 and Red Hat Linux 7.1 (2.4.10) SMP In-Reply-To: Your message of "Thu, 11 Oct 2001 10:43:12 PDT." <200110111743.f9BHhC921975@bach.leonora.org> Mime-Version: 1.0 (generated by tm-edit 1.8) Content-Type: text/plain; charset=US-ASCII Date: Thu, 11 Oct 2001 12:13:40 -0700 Sender: owner-pcp@oss.sgi.com Precedence: bulk Mark, It looks like PCP 2.2.1 works just fine with the latest kernel (2.4.12) on my SMP box. The 100% CPU usage problem I had with 2.4.10 went away. Now, I'm off to explore PCP... Thanks. --- Vladimir Vladimir G. Ivanovic http://leonora.org/~vladimir 2770 Cowper St. vladimir@acm.org Palo Alto, CA 94306-2447 +1 650 678 8014 "VGI" == Vladimir G Ivanovic writes: VGI> Mark, VGI> Thanks for your reply. VGI> I did not check to see if `pmcd' is running, and I didn't check the log VGI> files. (I do not use DHCP.) Since 2.4.12 just came out --I am currently VGI> running 2.4.11 that has a symlink bug, hence the need for 2.4.12 -- I VGI> will build a 2.4.12 system, and try again. I'll let you know the VGI> results. VGI> --- Vladimir VGI> Vladimir G. Ivanovic http://leonora.org/~vladimir VGI> 2770 Cowper St. vladimir@acm.org VGI> Palo Alto, CA 94306-2447 +1 650 678 8014 VGI> "MG" == Mark Goodwin writes: MG> On Tue, 9 Oct 2001, Vladimir G Ivanovic wrote: >>> I am running Red Hat Linux 7.1 with a 2.4.10 SMP kernel on a ASUS >>> CUV4X-DLS dual P3 motherboard. >>> >>> I've installed the pcp-2.2.1-3..i386.rpm, read /usr/doc/pcp-2.2.1/INSTALL, >>> and scanned the FAQ and the mailing list archives. When I do >>> >>> # chkconfig pcp on >>> # service pcp start >>> >>> I get 100% (system) CPU usage on one processor, and when I execute >>> `pminfo' I get: >>> >>> # pminfo -fmdt >>> pminfo: Cannot connect to PMCD on host "bach.leonora.org": Connection refused MG> Is pmcd running? What's in /var/log/pcp/pmcd/pmcd.log? Failing evidence MG> of any other problem, does "pminfo -h localhost -fmdt" work? If so you MG> may be on a host with ip assigned by dhcp or something, in which case MG> bach.leonora.org does not match your ip address. >>> >>> Is PCP known to run on 2.4.10 SMP kernels? (Apparently Linus rewrote the >>> VM for 2.4.10.) MG> I just built a pristine 2.4.10 SMP kernel and it worked just fine. MG> This is on my RH7.1 machine at home - only one CPU though. I'll MG> try the same on a dual CPU box here at work. MG> -- Mark From owner-pcp@oss.sgi.com Tue Oct 16 05:09:49 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f9GC9nj30371 for pcp-outgoing; Tue, 16 Oct 2001 05:09:49 -0700 Received: from rj.sgi.com (rj.sgi.com [204.94.215.100]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f9GC9hD30368 for ; Tue, 16 Oct 2001 05:09:43 -0700 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by rj.sgi.com (8.11.4/8.11.4/linux-outbound_gateway-1.0) with SMTP id f9GC9bW23825 for ; Tue, 16 Oct 2001 05:09:37 -0700 Received: from kenj-ppp.melbourne.sgi.com (kenj-ppp.melbourne.sgi.com [134.14.55.215]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id WAA11904; Tue, 16 Oct 2001 22:08:15 +1000 Date: Tue, 16 Oct 2001 22:10:53 +1000 (EST) From: kenmcd@melbourne.sgi.com Reply-To: kenmcd@melbourne.sgi.com To: Martin Knoblauch cc: pcp@oss.sgi.com Subject: Re: GEtting number and names of network interfaces (Linux) In-Reply-To: <3B89EF51.7E96D0CB@TeraPort.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-pcp@oss.sgi.com Precedence: bulk Sorry Martin, this mail was misplaced in the bog of eternal stench (aka my inbox) and was only recently re-discovered ... On Mon, 27 Aug 2001, Martin Knoblauch wrote: > kenmcd@melbourne.sgi.com wrote: > > > > Looks like this has been skirted around some, without necessarily being > > completely answered. > > > > Martin, what _exactly_ are you after? > > > > The names of the network interfaces are included in the instance > > names for the network.interface.* metrics, e.g. > > > Hi Ken, > > I found out about the instance names shortly after posting my question, > so basically I am happy although I think that explicitely exporting the > number of interfaces and the names might be useful to some. We've tended to avoid exporting replicated information in most cases. In practical terms ... pminfo -f ... | sed | sort -u is a far cheaper way to extract a list of instance names (it is most often needed in shell scripts, in our experience). And pminfo -f ... | grep ' value ' | wc -l is a far cheaper way to count the number of instances. The nice thing about this simple approach is it works for _any_ metric with an underlying instance domain, while fending off requests to add information like this to the PMDAs ... 8^)> As usual, if you feel strongly about this, feel free to extend the PMDA and send us the patches. > Thanks > Martin > > > > > > > A quick look at the sources seems to indicate that the information > > > itself is available, but not exported. Am I correct with this? > > > > Not sure what you mean here, perhaps more detail would help. > > > > Now, I found that the info is stored, but I did not see the "instance" > concept :-) From owner-pcp@oss.sgi.com Tue Oct 16 05:10:31 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f9GCAVT30422 for pcp-outgoing; Tue, 16 Oct 2001 05:10:31 -0700 Received: from zok.sgi.com (zok.sgi.com [204.94.215.101]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f9GCAQD30418 for ; Tue, 16 Oct 2001 05:10:26 -0700 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by zok.sgi.com (8.11.4/8.11.4/linux-outbound_gateway-1.0) with SMTP id f9GCAKK19419 for ; Tue, 16 Oct 2001 05:10:20 -0700 Received: from kenj-ppp.melbourne.sgi.com (kenj-ppp.melbourne.sgi.com [134.14.55.215]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id WAA11907; Tue, 16 Oct 2001 22:08:57 +1000 Date: Tue, 16 Oct 2001 22:11:34 +1000 (EST) From: kenmcd@melbourne.sgi.com Reply-To: kenmcd@melbourne.sgi.com To: Phillip Ezolt cc: pcp@oss.sgi.com, "Stanley, Dave" , Bill French , Mark Goodwin Subject: Re: Performance Co-Pilot patch for Compaq's Tru64 In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-pcp@oss.sgi.com Precedence: bulk Sorry Phil, Dave and Bill , this mail was misplaced in the bog of eternal stench (aka my inbox) and was only recently re-discovered ... With reference to the mail below and the subsequent follow-ups ... Did all your questions get answered? Mark, has the patch been rolled into the PCP open source code base? And finally have you been able to use PCP on Tru64 in any serious performance analysis tasks, and if so, do you have any feedback, comments or suggestions? Thanks, and apologies again for my tardiness. On Mon, 27 Aug 2001, Phillip Ezolt wrote: > Hi All, > > I've patched the Performance Co-Pilot infrastructure to work > with Tru64. All of the clients (except for pmstat) that I've tested work. > The included PMDAs all compile except for cisco and shping. > > Known issues: > 1) cisco and pmdas do not compile. (Missing sys/prctl) > 2) No test for whether to use "hostname -f" or "hostname". > 3) Magic file format is not compatible with Tru64. > 4) Testing for the "runlevel" command is not done properly in > the shell scripts. > 5) No Tru64 specific PMDA. > > Questions/Comments: > > 1) What pmda number should I use for Tru64? (Will 74 work?) > > 2) The memory values in the Linux pmda should be 64-bit, not 32-bit. > Problems show up when a machine has more than 4-gig of memory. > > /* mem.util.used */ > { &proc_meminfo.mem[1], > { PMDA_PMID(CLUSTER_MEMINFO,1), PM_TYPE_U32, PM_INDOM_NULL, PM_SEM_INSTANT, > PMDA_PMUNITS(1,0,0,PM_SPACE_BYTE,0,0) }, }, > > > Hopefully, the patch is self explanitory. I had to add some automake > checks in for things that incorrectly pcp assumed. > > If you need me to test or explain anything, just tell me! From owner-pcp@oss.sgi.com Tue Oct 16 11:52:26 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f9GIqQo05874 for pcp-outgoing; Tue, 16 Oct 2001 11:52:26 -0700 Received: from sgi.com (sgi.SGI.COM [192.48.153.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f9GIqDD05853 for ; Tue, 16 Oct 2001 11:52:13 -0700 Received: from ztxmail03.ztx.compaq.com (ztxmail03.ztx.compaq.com [161.114.1.207]) by sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam: SGI does not authorize the use of its proprietary systems or networks for unsolicited or bulk email from the Internet.) via ESMTP id KAA06318 for ; Tue, 16 Oct 2001 10:57:12 -0700 (PDT) mail_from (ezolt@perf.zko.dec.com) Received: by ztxmail03.ztx.compaq.com (Postfix, from userid 12345) id B87112219; Tue, 16 Oct 2001 12:57:04 -0500 (CDT) Received: from mailrelay01.cac.cpqcorp.net (mailrelay01.cac.cpqcorp.net [16.47.132.152]) by ztxmail03.ztx.compaq.com (Postfix) with ESMTP id 3753421CB; Tue, 16 Oct 2001 12:57:04 -0500 (CDT) Received: by mailrelay01.cac.cpqcorp.net (Postfix, from userid 12345) id D57CEAE4; Tue, 16 Oct 2001 10:57:03 -0700 (PDT) Received: from perf.zko.dec.com (aseng.zko.dec.com [16.31.80.86]) by mailrelay01.cac.cpqcorp.net (Postfix) with ESMTP id 2BAB68F2; Tue, 16 Oct 2001 10:57:03 -0700 (PDT) Received: from localhost by perf.zko.dec.com (8.9.3/1.1.10.5/07Mar97-1056AM) id NAA0000487108; Tue, 16 Oct 2001 13:57:03 -0400 (EDT) Date: Tue, 16 Oct 2001 13:57:03 -0400 (EDT) From: Phillip Ezolt To: Cc: , "Stanley, Dave" , Bill French , Mark Goodwin Subject: Re: Performance Co-Pilot patch for Compaq's Tru64 In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-pcp@oss.sgi.com Precedence: bulk Ken, > Did all your questions get answered? > Yes. They did. I've been silent, because I am working on the PMDA for Tru64. My main problems have been: 1) Figuring out what a metric means, and if there is an equivalent metric on Tru64. (The text description with pminfo is a great help. ) 2) Figuring out how to extract the performance metrics from Tru64. It would be really nice, if SGI published a list of recommended performance metrics. That would give porters a target of 20-50 metrics to shoot for first. > Mark, has the patch been rolled into the PCP open source code base? I believe that somebody said that this was going to happen. > And finally have you been able to use PCP on Tru64 in any serious > performance analysis tasks, and if so, do you have any feedback, > comments or suggestions? I have not done anything major yet, I am still writing the PMDA for Tru64. First, let me say: I am VERY impressed with the performance co-pilot. It has many of the features that I believe are necessary for the "next generation" of performance tools. (Network-aware, flexible metrics, separation of clients and PMDAs) Suggestions: 1) It is wonderful that PCP has documentation on how to write a PMDA. It would be helpful to have a short two-three paragraph overview of how a piece of data is extracted from the operating system. (From Initialization of PMDA to distribution to the clients.) (A state diagram would be wonderful! Actually ANY pictures would make it easier.) The documentation seems to delve into details too quickly. A general overview at first would make things much easier to understand. 2) Make pmdumptext GPL. This seems to be the first program that anyone would rewrite. I can't imagine it contains any trade secrets, GPLing this would make it easier to see the benefits of PCP more quickly. 3) Create a "suggested practices" documentation to describe what the convention should be for various things. Let the programmer do as he/she pleases but make suggestions. (Common metrics and how to describe hardware structure come to mind.) 4) Talk to other Linux monitoring projects that are trying to reinvent PCP and stop them. ;-) (ksysguard) I whole-heartedly believe that PCP should be the performance monitoring standard for Linux. If everyone that was developing performance monitoring tools for different Linux systems, started developing for PCP everyone would benefit. Questions: 1) How does PCP export hardware STRUCTURE? (Which drives are connected to which busses?) I'm sure I could create my own metrics with this information, but I would like to use what is already there. --Phil Compaq: High Performance Server Systems Quality & Performance Engineering ---------------- Alpha, The Fastest Processor on Earth -------------------- Phillip.Ezolt@compaq.com Performance Tools/Analysis ------------------- See the results at www.spec.org ----------------------- On Tue, 16 Oct 2001 kenmcd@melbourne.sgi.com wrote: > Sorry Phil, Dave and Bill , this mail was misplaced in the bog of eternal > stench (aka my inbox) and was only recently re-discovered ... > > With reference to the mail below and the subsequent follow-ups ... > > Did all your questions get answered? > > Mark, has the patch been rolled into the PCP open source code > base? > > And finally have you been able to use PCP on Tru64 in any serious > performance analysis tasks, and if so, do you have any feedback, > comments or suggestions? > > Thanks, and apologies again for my tardiness. > > On Mon, 27 Aug 2001, Phillip Ezolt wrote: > > > Hi All, > > > > I've patched the Performance Co-Pilot infrastructure to work > > with Tru64. All of the clients (except for pmstat) that I've tested work. > > The included PMDAs all compile except for cisco and shping. > > > > Known issues: > > 1) cisco and pmdas do not compile. (Missing sys/prctl) > > 2) No test for whether to use "hostname -f" or "hostname". > > 3) Magic file format is not compatible with Tru64. > > 4) Testing for the "runlevel" command is not done properly in > > the shell scripts. > > 5) No Tru64 specific PMDA. > > > > Questions/Comments: > > > > 1) What pmda number should I use for Tru64? (Will 74 work?) > > > > 2) The memory values in the Linux pmda should be 64-bit, not 32-bit. > > Problems show up when a machine has more than 4-gig of memory. > > > > /* mem.util.used */ > > { &proc_meminfo.mem[1], > > { PMDA_PMID(CLUSTER_MEMINFO,1), PM_TYPE_U32, PM_INDOM_NULL, PM_SEM_INSTANT, > > PMDA_PMUNITS(1,0,0,PM_SPACE_BYTE,0,0) }, }, > > > > > > Hopefully, the patch is self explanitory. I had to add some automake > > checks in for things that incorrectly pcp assumed. > > > > If you need me to test or explain anything, just tell me! > > From owner-pcp@oss.sgi.com Tue Oct 16 17:53:28 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f9H0rSA13852 for pcp-outgoing; Tue, 16 Oct 2001 17:53:28 -0700 Received: from zok.sgi.com (zok.sgi.com [204.94.215.101]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f9H0rMD13849 for ; Tue, 16 Oct 2001 17:53:22 -0700 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by zok.sgi.com (8.11.4/8.11.4/linux-outbound_gateway-1.0) with SMTP id f9H0rGK21753 for ; Tue, 16 Oct 2001 17:53:16 -0700 Received: from sherman.melbourne.sgi.com (sherman.melbourne.sgi.com [134.14.55.175]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id KAA15749; Wed, 17 Oct 2001 10:51:55 +1000 Date: Wed, 17 Oct 2001 10:51:55 +1000 (EST) From: Mark Goodwin X-Sender: markgw@sherman.melbourne.sgi.com To: kenmcd@melbourne.sgi.com cc: Phillip Ezolt , pcp@oss.sgi.com, "Stanley, Dave" , Bill French Subject: Re: Performance Co-Pilot patch for Compaq's Tru64 In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-pcp@oss.sgi.com Precedence: bulk On Tue, 16 Oct 2001 kenmcd@melbourne.sgi.com wrote: > > Mark, has the patch been rolled into the PCP open source code > base? The patch to support building on tru64 has been rolled in, but not yet released to oss.sgi.com. I haven't received any patches for a tru64 PMDA yet though. I guess it's work in progress ... -- Mark