From: xbgmsharp <xbg...@gm...> - 2008-01-25 10:15:19
|
hello, Great job!! I would like to know more about do_devmon.c? What are you planing? When do you exept to release the beta 4? I thought we was going in a test phase. also i am reading to commit many change on cisco template and add =20 other but i see than you change a bunch of CPU message in template. Why? Regards, Francois Lacroix. buc...@us... a =E9crit : > Revision: 39 > http://devmon.svn.sourceforge.net/devmon/?rev=3D39&view=3Drev > Author: buchanmilne > Date: 2008-01-24 20:38:53 -0800 (Thu, 24 Jan 2008) > > Log Message: > ----------- > Switch maximum column to a preproccessor definition > Get rid of hardcoded values in do_devmon.c > Add initial patch for hobbit (excluding do_devmon.c for now) > > Modified Paths: > -------------- > trunk/extras/do_devmon.c > > Added Paths: > ----------- > trunk/extras/hobbit-4.2.0-devmon.patch > > Modified: trunk/extras/do_devmon.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- trunk/extras/do_devmon.c=092008-01-24 06:14:29 UTC (rev 38) > +++ trunk/extras/do_devmon.c=092008-01-25 04:38:53 UTC (rev 39) > @@ -13,8 +13,8 @@ > > int do_devmon_rrd(char *hostname, char *testname, char *msg, time_t tstam= p) > { > -=09int maxcols =3D 20; > -=09char *devmon_params[maxcols+7]; > +#define MAXCOLS 20 > +=09char *devmon_params[MAXCOLS+7]; > =09static char *devmon_tpl =3D NULL; > > =09char *eoln, *curline; > @@ -27,13 +27,13 @@ > =09curline =3D msg; > =09while (curline) { > =09=09char *fsline, *p; > -=09=09char *columns[maxcols]; > +=09=09char *columns[MAXCOLS]; > =09=09int columncount; > =09=09char *ifname =3D NULL; > =09=09int pused =3D -1; > =09=09int wanteddisk =3D 1; > =09=09long long aused =3D 0; > -=09=09int ds[maxcols]; > +=09=09int ds[MAXCOLS]; > =09=09char *dsval; > =09=09int i; > > @@ -49,16 +49,16 @@ > =09=09} > =09=09if (in_devmon !=3D 0 ) goto nextline; > > -=09=09for (columncount=3D0; (columncount<20); columncount++) =20 > columns[columncount] =3D ""; > +=09=09for (columncount=3D0; (columncount<MAXCOLS); columncount++) =20 > columns[columncount] =3D ""; > =09=09fsline =3D xstrdup(curline); columncount =3D 0; p =3D strtok(fsline= , " "); > -=09=09while (p && (columncount < 20)) { columns[columncount++] =3D p; p = =3D =20 > strtok(NULL, " "); } > +=09=09while (p && (columncount < MAXCOLS)) { columns[columncount++] =3D = =20 > p; p =3D strtok(NULL, " "); } > > =09=09/* DS:ds0:COUNTER:600:0:U DS:ds1:COUNTER:600:0:U */ > =09=09if (!strncmp(curline, "DS:",3)) { > =09=09=09devmon_params[0] =3D "rrdcreate"; > =09=09 =09devmon_params[1] =3D rrdfn; > =09=09=09dbgprintf("Looking for DS defintions in %s\n",curline); > -=09=09=09while ( numds < 20) { > +=09=09=09while ( numds < MAXCOLS) { > =09=09=09=09dbgprintf("Seeing if column %d that has %s is a =20 > DS\n",numds,columns[numds]); > =09=09=09=09if (strncmp(columns[numds],"DS:",3)) break; > =09=09=09=09devmon_params[numds+2] =3D xstrdup(columns[numds]); > > Added: trunk/extras/hobbit-4.2.0-devmon.patch > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- trunk/extras/hobbit-4.2.0-devmon.patch=09 (rev = 0) > +++ trunk/extras/hobbit-4.2.0-devmon.patch=092008-01-25 04:38:53 UTC (rev = 39) > @@ -0,0 +1,46 @@ > +--- ./hobbit-4.2.0/lib/hobbitrrd.c.devmon=092008-01-22 =20 > 06:22:11.000000000 +0200 > ++++ ./hobbit-4.2.0/lib/hobbitrrd.c=092008-01-25 06:09:27.000000000 +0200 > +@@ -221,6 +221,9 @@ static char *hobbit_graph_text(char *hos > + =09else if ((service !=3D NULL) && (strcmp(graphdef->hobbitrrdname, =20 > "ncv") =3D=3D 0)) { > + =09=09sprintf(rrdservicename, "ncv:%s", service); > + =09} > ++=09else if ((service !=3D NULL) && (strcmp(graphdef->hobbitrrdname, =20 > "devmon") =3D=3D 0)) { > ++=09=09sprintf(rrdservicename, "devmon:%s", service); > ++=09} > + =09else { > + =09=09strcpy(rrdservicename, graphdef->hobbitrrdname); > + =09} > +--- =20 > ./hobbit-4.2.0/hobbitd/etcfiles/hobbitserver.cfg.DIST.devmon=092006-08-09 = =20 > 22:10:07.000000000 +0200 > ++++ =20 > ./hobbit-4.2.0/hobbitd/etcfiles/hobbitserver.cfg.DIST=092008-01-25 =20 > 06:28:50.000000000 +0200 > +@@ -132,11 +132,11 @@ RRDWIDTH=3D"576"=09=09# The RRD's contain 576 > + # > + # This is also used by the bb-hostsvc.cgi script to determine if =20 > the detailed > + # status view of a test should include a graph. > +-TEST2RRD=3D"cpu=3Dla,disk,inode,qtree,memory,$PINGCOLUMN=3Dtcp,http=3Dtc= p,dns=3Dtcp,dig=3Dtcp,time=3Dntpstat,vmstat,iostat,netstat,temperature,apach= e,bind,sendmail,mailq,nmailq=3Dmailq,socks,bea,iishealth,citrix,bbgen,bbtest= ,bbproxy,hobbitd,files,procs=3Dprocesses,ports,clock,lines" > ++TEST2RRD=3D"cpu=3Dla,disk,inode,qtree,memory,$PINGCOLUMN=3Dtcp,http=3Dtc= p,dns=3Dtcp,dig=3Dtcp,time=3Dntpstat,vmstat,iostat,netstat,temperature,apach= e,bind,sendmail,mailq,nmailq=3Dmailq,socks,bea,iishealth,citrix,bbgen,bbtest= ,bbproxy,hobbitd,files,procs=3Dprocesses,ports,clock,lines,if_load=3Ddevmon" > + > + # This defines which RRD files to include on the "trends" column webpage= , > + # and the order in which they appear. > +-GRAPHS=3D"la,disk,inode,qtree,files,processes,memory,users,vmstat,iostat= ,tcp.http,tcp,ncv,netstat,ifstat,mrtg::1,ports,temperature,ntpstat,apache,bi= nd,sendmail,mailq,socks,bea,iishealth,citrix,bbgen,bbtest,bbproxy,hobbitd,cl= ock,lines" > ++GRAPHS=3D"la,disk,inode,qtree,files,processes,memory,users,vmstat,iostat= ,tcp.http,tcp,ncv,netstat,ifstat,mrtg::1,ports,temperature,ntpstat,apache,bi= nd,sendmail,mailq,socks,bea,iishealth,citrix,bbgen,bbtest,bbproxy,hobbitd,cl= ock,lines,devmon" > + > + # These two settings can be used to restrict what filesystems are being > + # tracked (i.e. have their utilisation graphed) by Hobbit. > +--- ./hobbit-4.2.0/hobbitd/do_rrd.c.devmon=092006-08-09 =20 > 22:10:05.000000000 +0200 > ++++ ./hobbit-4.2.0/hobbitd/do_rrd.c=092008-01-25 06:23:58.000000000 +0200 > +@@ -309,6 +309,7 @@ static int pickdata(char *buf, pcre *exp > + #include "rrd/do_external.c" > + #include "rrd/do_filesizes.c" > + #include "rrd/do_counts.c" > ++#include "rrd/do_devmon.c" > + > + #ifdef USE_BEA2 > + #include "rrd/do_bea2.c" > +@@ -368,6 +369,7 @@ void update_rrd(char *hostname, char *te > + =09else if (strcmp(id, "proccounts") =3D=3D 0) res =3D =20 > do_counts_rrd("processes", hostname, testname, msg, tstamp); > + =09else if (strcmp(id, "portcounts") =3D=3D 0) res =3D =20 > do_counts_rrd("ports", hostname, testname, msg, tstamp); > + =09else if (strcmp(id, "linecounts") =3D=3D 0) res =3D =20 > do_derives_rrd("lines", hostname, testname, msg, tstamp); > ++=09else if (strcmp(id, "devmon") =3D=3D 0) res =3D =20 > do_devmon_rrd(hostname, testname, msg, tstamp); > + > + #ifdef DO_ORCA > + =09else if (strcmp(id, "orca") =3D=3D 0) res =3D =20 > do_orca_rrd(hostname, testname, msg, tstamp); > > > This was sent by the SourceForge.net collaborative development =20 > platform, the world's largest Open Source development site. > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Devmon-devel mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/devmon-devel > > --=20 Thanks for using xbgm# / Devmon / BBwin. http://xbgm.sourceforge.net/ http://devmon.sourceforge.net/ http://bbwin.sourceforge.net/ Please feedback. |