|
|
| Author |
Message |
Ciaran Bryan Helper
Joined: 02 Apr 2004 Posts: 17
|
Posted: Fri Apr 02, 2004 4:26 pm Post subject: Gatherer coring on Solaris * |
|
|
Hi,
Trying to build netmrg-0.14 on solaris 8 SPARC 64.
Compiles OK but when I run the gatherer the binary core dumps when parsingt the xml config file.
in settings.cpp a call to xmltostring is made but the input field value provided seems to be empty and the snprintf fails and causes a siementation fault. see see code and backtrace below.
Has anyone seen this before on solaris or has anybody build successfully on solaris 8.
I'm running gdb 3.3.2 and libxml 2.4.25
I dont have libxml dev installed, do i need it ?
Help appreciated.
cur = cur->xmlChildrenNode;
while (cur != NULL)
{
value = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
val_str = string(xmltostring(value));
if (section == "database")
{
if (!xmlStrcmp(cur->name, (const xmlChar *) "host"))
set_setting(setDBHost, val_str);
(gdb) bt
#0 0xfecb3200 in strlen () from /usr/lib/libc.so.1
#1 0xfed06270 in _doprnt () from /usr/lib/libc.so.1
#2 0xfed07fb4 in snprintf () from /usr/lib/libc.so.1
#3 0x00038050 in xmltostring(unsigned char const*) (input=0x0)
at settings.cpp:95 |
|
| Back to top |
|
 |
balleman Site Admin
Joined: 20 Jan 2003 Posts: 282
|
Posted: Fri Apr 02, 2004 7:05 pm Post subject: |
|
|
<excuse>
My Solaris x86 box is really slow, so I've only been checking that the autoconf and compiling succeeds.
</excuse>
Could you try adding this as the first line of xmltostring?
| Code: |
if (input == NULL) return string("");
|
Let us know if this works. If it doesn't, we'll have to look at a more appropriate alternative than snprintf() for converting the XML strings.
I've started bug#184 for this issue. |
|
| Back to top |
|
 |
Ciaran Bryan Helper
Joined: 02 Apr 2004 Posts: 17
|
Posted: Mon Apr 05, 2004 9:08 am Post subject: |
|
|
Hi.
thats working fine now.
thanks a million. |
|
| Back to top |
|
 |
balleman Site Admin
Joined: 20 Jan 2003 Posts: 282
|
Posted: Wed Apr 07, 2004 7:30 pm Post subject: |
|
|
Excellent. That will be fixed in the next release.
Are there any other "gotchas" that you have found running NetMRG on Solaris? Our docs don't have much there yet.
Thanks! |
|
| Back to top |
|
 |
Ciaran Bryan Helper
Joined: 02 Apr 2004 Posts: 17
|
Posted: Thu Apr 08, 2004 8:51 am Post subject: |
|
|
hi,
Couple of things do do with the configure and compilation.
My base install tree is not /usr/local so I've had to specify a few paths etc.
1. NetSNMP must be installed in /usr/local else the configure fails and think this is also true for libxml
2. LDFLAGS must specify runtime -R localtion of libraries as well as -L.
3. Also have to set CXX flags to include libsocket libnsl etc
CXXFLAGS=" -g -lsocket -lnsl -lcrypto";export CXXFLAGS;
4. The cron format you specify to run the gatherer every every 5 mins is not understood by solaris cron, so,
*/5 * * etc doesnt work
Couple Questions
Have you anymore detailed docs/readmes on setting up events/conditions/responses. I'm trying some variable test conditions and with to run a script if a condition exists and the parameters done seem to get passed in correctly.
Also, how do I setup multiple retrieved variables to be displayed on the same graph for a particular monitor, e.g. ifInOctets and ifOutOctets
also, maybe some more explanations on expander placeholders that may be used and where e.g. %dev_type% etc
also,
I dont understand the concepts behind the snmp caching for a device ?
rgds,
Ciaran
./configure --prefix=/opt/perfmon/netmrg --with-ssl-lib-dir=/usr/local/ssl/lib --with-ssl-include-dir=/usr/local/ssl/include
--with-snmp-lib-dir=/usr/local/lib --with-snmp-include-dir=/usr/local/include --with-xml2-lib-dir=/usr/local/libxml/sparc/lib
--with-xml2-include-dir=/usr/local/libxml/include/libxml2 --with-mysql-lib-dir=/opt/perfmon/mysql/lib --with-mysql-include-dir
=/opt/perfmon/mysql/include 'LDFLAGS= -R /opt/perfmon/mysql/lib -L /opt/perfmon/mysql/lib -R /usr/local/libxml/sparc/lib -L /u
sr/local/libxml/sparc/lib -R /usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3.2 -L /usr/local/lib/gcc-lib/sparc-sun-solaris2.9/
3.3.2 -R /usr/local/lib/sparcv9 -L /usr/local/lib/sparcv9 -R /usr/local/lib -L/usr/local/lib -R /usr/local/ssl/lib -L /usr/lo
cal/ssl/lib -R /opt/perfmon_build/usr/local/lib -L /opt/perfmon_build/usr/local/lib' |
|
| Back to top |
|
 |
|