[rtg] rtg2 works out of the box

Adrian Chadd adrian at creative.net.au
Fri Apr 17 03:36:00 EDT 2009


Hm, I'll have to read the rtgplot code and see what can be done.

Just lodge an issue in the issue tracker so its not forgotten.
http://code.google.com/p/rtg2/issues/list

Thanks,



Adrian

On Thu, Apr 16, 2009, John Center wrote:
> Hi Adrian,
> 
> Doing more digging, I see tm_gmtoff is often a part of struct tm. 
> Unfortunately, struct tm, defined in iso/time_iso.h on Solaris, does not 
> have tm_gmtoff as a member:
> 
> struct  tm {    /* see ctime(3) */
>         int     tm_sec;
>         int     tm_min;
>         int     tm_hour;
>         int     tm_mday;
>         int     tm_mon;
>         int     tm_year;
>         int     tm_wday;
>         int     tm_yday;
>         int     tm_isdst;
> };
> 
> Is there a way to modify rtgplot.c for Solaris?  (As you can tell, I 
> don't do much programming. :-))
> 
> Thanks.
> 
> 	-John
> 
> 
> 
> On 4/16/2009 12:26 PM, John Center wrote:
> >Hi Adrian,
> >
> >I'm getting the following error when compiling (Sun Studio 12 on Solaris
> >10 (SPARC) 64-bit):
> >
> >cc -xc99 -DHAVE_CONFIG_H -I. -I../config -I../cgilib-0.4
> >-I/opt/db/include -I/opt/openssl/include -I/opt/postgres/include
> >-I/opt/mysql/include -I/opt/gnu/include -I/opt/local/include
> >-I/usr/sfw/include -I/usr/include -I/usr//include -I/opt/local//include
> >-I/opt/postgres/include -I/opt/mysql/include
> >-I/opt/local//include/net-snmp -I/opt/local//include/net-snmp/..
> >-D_POSIX_PTHREAD_SEMANTICS -g -xs -fast -fsimple=1 -fns=no
> >-xtarget=ultraT1 -xarch=sparcvis2 -m64 -mt -xipo -xcode=pic32
> >-xpagesize=default -xregs=no%appl -xlic_lib=sunperf  -c rtgplot.c
> >"rtgplot.c", line 247: warning: implicit function declaration: strcasestr
> >"rtgplot.c", line 812: warning: argument #5 is incompatible with prototype:
> >          prototype: pointer to unsigned char :
> >"/opt/local/include/gd.h", line 363
> >          argument : pointer to char
> >"rtgplot.c", line 1007: warning: argument #5 is incompatible with 
> >prototype:
> >          prototype: pointer to unsigned char :
> >"/opt/local/include/gd.h", line 363
> >          argument : pointer to char
> >"rtgplot.c", line 1018: warning: argument #1 is incompatible with 
> >prototype:
> >          prototype: pointer to const long :
> >"/usr/include/iso/time_iso.h", line 89
> >          argument : pointer to unsigned long
> >"rtgplot.c", line 1019: undefined struct/union member: tm_gmtoff
> >"rtgplot.c", line 1019: improper member use: tm_gmtoff
> >"rtgplot.c", line 1020: improper member use: tm_gmtoff
> >"rtgplot.c", line 1020: improper member use: tm_gmtoff
> >"rtgplot.c", line 1058: warning: argument #5 is incompatible with 
> >prototype:
> >          prototype: pointer to unsigned char :
> >"/opt/local/include/gd.h", line 363
> >          argument : pointer to char
> >"rtgplot.c", line 1068: warning: argument #1 is incompatible with 
> >prototype:
> >          prototype: pointer to const long :
> >"/usr/include/iso/time_iso.h", line 89
> >          argument : pointer to unsigned long
> >"rtgplot.c", line 1069: undefined struct/union member: tm_gmtoff
> >"rtgplot.c", line 1069: improper member use: tm_gmtoff
> >"rtgplot.c", line 1090: warning: argument #5 is incompatible with 
> >prototype:
> >          prototype: pointer to unsigned char :
> >"/opt/local/include/gd.h", line 363
> >          argument : pointer to char
> >"rtgplot.c", line 1109: warning: argument #5 is incompatible with 
> >prototype:
> >          prototype: pointer to unsigned char :
> >"/opt/local/include/gd.h", line 363
> >          argument : pointer to char
> >"rtgplot.c", line 1121: warning: argument #1 is incompatible with 
> >prototype:
> >          prototype: pointer to const long :
> >"/usr/include/iso/time_iso.h", line 89
> >          argument : pointer to unsigned long
> >"rtgplot.c", line 1149: warning: argument #5 is incompatible with 
> >prototype:
> >          prototype: pointer to unsigned char :
> >"/opt/local/include/gd.h", line 363
> >          argument : pointer to char
> >"rtgplot.c", line 1165: warning: argument #5 is incompatible with 
> >prototype:
> >          prototype: pointer to unsigned char :
> >"/opt/local/include/gd.h", line 363
> >          argument : pointer to char
> >"rtgplot.c", line 1190: warning: argument #5 is incompatible with 
> >prototype:
> >          prototype: pointer to unsigned char :
> >"/opt/local/include/gd.h", line 363
> >          argument : pointer to char
> >"rtgplot.c", line 1210: warning: argument #5 is incompatible with 
> >prototype:
> >          prototype: pointer to unsigned char :
> >"/opt/local/include/gd.h", line 365
> >          argument : pointer to char
> >"rtgplot.c", line 1214: warning: argument #5 is incompatible with 
> >prototype:
> >          prototype: pointer to unsigned char :
> >"/opt/local/include/gd.h", line 363
> >          argument : pointer to char
> >"rtgplot.c", line 1216: warning: argument #5 is incompatible with 
> >prototype:
> >          prototype: pointer to unsigned char :
> >"/opt/local/include/gd.h", line 363
> >          argument : pointer to char
> >cc: acomp failed for rtgplot.c
> >
> >The problem that is making it fail is undefined struct/union member:
> >tm_gmtoff.  Looking at struct plot_obj:
> >
> >typedef struct plot_obj {
> >      char *title;
> >          int xmax;               // largest span of seconds on x-axis
> >          float ymax;             // largest y-axis value
> >          unsigned long xoffset;  // all time is relative to xoffset
> >          int xunits;             // HOUR/DAY/WEEK/MONTH
> >          long long yunits;       // 1/K/M/G/T
> >      char *units;                // units as a string
> >      unsigned short impulse;
> >      unsigned short gauge;
> >      unsigned short scalex;
> >      unsigned short scaley;
> >          image_t image;
> >      range_t range;
> >} plot_obj_t;
> >
> >Should xoffset be changed to tm_gmtoff, or has something been left out?
> >
> >Thanks.
> >
> >	-John
> >
> >
> >On 4/16/2009 6:17 AM, Adrian Chadd wrote:
> >>On Thu, Apr 16, 2009, Adrian Chadd wrote:
> >>>G'day,
> >>>
> >>>I've been hacking up the rtg2 stuff to finally make it compile, build
> >>>and run out of the box.
> >>>
> >>>It now works to the point where rtgpoll is populating the mysql database 
> >>>with
> >>>samples. I haven't yet worked on up the graphing side of things.
> >>I just added in the missing "rate" column creation into rtgtargmkr.pl 
> >>(since
> >>I'm using it here) and createdb (which I don't think is being used 
> >>anymore..)
> >>
> >>I have also patched rtg.php with my 2007 patch to feed rtgpoll.cgi the 
> >>"new"
> >>style polling parameters.
> >>
> >>Polling and graphing now work out of the box.. if you can coax the build 
> >>process
> >>to work. :)
> >>
> >>
> >>
> >>Adrian
> >>
> >>_______________________________________________
> >>RTG mailing list
> >>RTG at lists.grdata.com
> >>http://lists.grdata.com/mailman/listinfo/rtg
> >_______________________________________________
> >RTG mailing list
> >RTG at lists.grdata.com
> >http://lists.grdata.com/mailman/listinfo/rtg
> _______________________________________________
> RTG mailing list
> RTG at lists.grdata.com
> http://lists.grdata.com/mailman/listinfo/rtg

-- 
- Xenion - http://www.xenion.com.au/ - VPS Hosting - Commercial Squid Support -
- $25/pm entry-level VPSes w/ capped bandwidth charges available in WA -


More information about the RTG mailing list