kam 1.5 syslog on solaris 10

View: New views
10 Messages — Rating Filter:   Alert me  

kam 1.5 syslog on solaris 10

by Robert McGilvray :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

I’m having some issues getting kam to log correctly to syslog after it daemonizes. I get all the initialization entries in the proper logfile but nothing after that – I have xlog statements throughout the config which only show up in syslog if fork=no. I’ve tested my syslog config with the system logger which works correctly executed as the kamailio user. If I run syslog in debug I don’t see it receiving anything from kam after initialization. Any ideas?

 

log_stderror=no

log_facility=LOG_LOCAL1

debug=7

fork=yes

children=4

 

/etc/syslog.conf (with tabs)

local1.debug                                    /var/log/globeop/kamailio.log 

 

This is the correct format of syslog in solaris. It only uses wildcard (*) in facility not levels. Specifying debug will include everything at higher levels. From the man page:

 

       For  a  given facility and level, syslogd matches all messages for that

       level and all higher levels. For example, an  entry  that  specifies  a

       level of crit also logs messages at the alert and emerg levels.

 

This config is working correctly on sol 10 with openser 1.3.

 

ykt1sipprd2# tail -f /var/log/globeop/kamailio.log

Oct 27 09:50:46 ykt1sipprd2 kamailio[3813]: [ID 951507 local1.debug] DBG:core:grep_aliases: comparing host [2:loghost:5060] with us [1:loghost:5060]

Oct 27 09:50:46 ykt1sipprd2 kamailio[3813]: [ID 951507 local1.debug] DBG:core:grep_aliases: comparing host [2:loghost:5060] with us [1:ykt1sipprd2:5060]

Oct 27 09:50:46 ykt1sipprd2 kamailio[3813]: [ID 793175 local1.debug] DBG:core:grep_aliases: no match for: [2:loghost:5060]

Oct 27 09:50:46 ykt1sipprd2 kamailio[3813]: [ID 634971 local1.debug] DBG:core:socket2str: <tcp:172.20.151.148:5060>

Oct 27 09:50:46 ykt1sipprd2 kamailio[3813]: [ID 797031 local1.debug] DBG:core:fm_malloc_init: F_OPTIMIZE=16384, /ROUNDTO=2048

Oct 27 09:50:46 ykt1sipprd2 kamailio[3813]: [ID 596959 local1.debug] DBG:core:fm_malloc_init: F_HASH_SIZE=2067, fm_block size=16560

Oct 27 09:50:46 ykt1sipprd2 kamailio[3813]: [ID 362601 local1.debug] DBG:core:fm_malloc_init: params (fc400000, 33554432), start=fc400000

Oct 27 09:50:46 ykt1sipprd2 kamailio[3813]: [ID 551434 local1.debug] DBG:core:shm_mem_init_mallocs: success

Oct 27 09:50:46 ykt1sipprd2 kamailio[3813]: [ID 123545 local1.info] INFO:core:init_tcp: using /dev/poll as the TCP io watch method (auto detected)

Oct 27 09:50:46 ykt1sipprd2 kamailio[3815]: [ID 721503 local1.warning] WARNING:core:daemonize: pid file contains old pid, replacing pid

 

 

 


This email with all information contained herein or attached hereto may contain confidential and/or privileged information intended for the addressee(s) only. If you have received this email in error, please contact the sender and immediately delete this email in its entirety and any attachments thereto.

_______________________________________________
Kamailio (OpenSER) - Users mailing list
Users@...
http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
http://lists.openser-project.org/cgi-bin/mailman/listinfo/users

Re: kam 1.5 syslog on solaris 10

by miconda :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

so it is working with 1.3 but not with 1.5, right? IIRC, some changes
were added when introducing async logging and running under daemontools.

The log you pasted at the end is what you get not in syslog file?

Cheers,
Daniel



On 27.10.2009 15:01 Uhr, Robert McGilvray wrote:

>
> I’m having some issues getting kam to log correctly to syslog after it
> daemonizes. I get all the initialization entries in the proper logfile
> but nothing after that – I have xlog statements throughout the config
> which only show up in syslog if fork=no. I’ve tested my syslog config
> with the system logger which works correctly executed as the kamailio
> user. If I run syslog in debug I don’t see it receiving anything from
> kam after initialization. Any ideas?
>
>  
>
> log_stderror=no
>
> log_facility=LOG_LOCAL1
>
> debug=7
>
> fork=yes
>
> children=4
>
>  
>
> /etc/syslog.conf (with tabs)
>
> local1.debug                                    
> /var/log/globeop/kamailio.log
>
>  
>
> This is the correct format of syslog in solaris. It only uses wildcard
> (*) in facility not levels. Specifying debug will include everything
> at higher levels. From the man page:
>
>  
>
>        For  a  given facility and level, syslogd matches all messages
> for that
>
>        level and all higher levels. For example, an  entry  that  
> specifies  a
>
>        level of crit also logs messages at the alert and emerg levels.
>
>  
>
> This config is working correctly on sol 10 with openser 1.3.
>
>  
>
> ykt1sipprd2# tail -f /var/log/globeop/kamailio.log
>
> Oct 27 09:50:46 ykt1sipprd2 kamailio[3813]: [ID 951507 local1.debug]
> DBG:core:grep_aliases: comparing host [2:loghost:5060] with us
> [1:loghost:5060]
>
> Oct 27 09:50:46 ykt1sipprd2 kamailio[3813]: [ID 951507 local1.debug]
> DBG:core:grep_aliases: comparing host [2:loghost:5060] with us
> [1:ykt1sipprd2:5060]
>
> Oct 27 09:50:46 ykt1sipprd2 kamailio[3813]: [ID 793175 local1.debug]
> DBG:core:grep_aliases: no match for: [2:loghost:5060]
>
> Oct 27 09:50:46 ykt1sipprd2 kamailio[3813]: [ID 634971 local1.debug]
> DBG:core:socket2str: <tcp:172.20.151.148:5060>
>
> Oct 27 09:50:46 ykt1sipprd2 kamailio[3813]: [ID 797031 local1.debug]
> DBG:core:fm_malloc_init: F_OPTIMIZE=16384, /ROUNDTO=2048
>
> Oct 27 09:50:46 ykt1sipprd2 kamailio[3813]: [ID 596959 local1.debug]
> DBG:core:fm_malloc_init: F_HASH_SIZE=2067, fm_block size=16560
>
> Oct 27 09:50:46 ykt1sipprd2 kamailio[3813]: [ID 362601 local1.debug]
> DBG:core:fm_malloc_init: params (fc400000, 33554432), start=fc400000
>
> Oct 27 09:50:46 ykt1sipprd2 kamailio[3813]: [ID 551434 local1.debug]
> DBG:core:shm_mem_init_mallocs: success
>
> Oct 27 09:50:46 ykt1sipprd2 kamailio[3813]: [ID 123545 local1.info]
> INFO:core:init_tcp: using /dev/poll as the TCP io watch method (auto
> detected)
>
> Oct 27 09:50:46 ykt1sipprd2 kamailio[3815]: [ID 721503 local1.warning]
> WARNING:core:daemonize: pid file contains old pid, replacing pid
>
>  
>
>  
>
>  
>
> ------------------------------------------------------------------------
> This email with all information contained herein or attached hereto
> may contain confidential and/or privileged information intended for
> the addressee(s) only. If you have received this email in error,
> please contact the sender and immediately delete this email in its
> entirety and any attachments thereto.
> ------------------------------------------------------------------------
>
> _______________________________________________
> Kamailio (OpenSER) - Users mailing list
> Users@...
> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users

--
Daniel-Constantin Mierla
* Kamailio SIP Masterclass, Nov 9-13, 2009, Berlin
* http://www.asipto.com/index.php/sip-router-masterclass/


_______________________________________________
Kamailio (OpenSER) - Users mailing list
Users@...
http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
http://lists.openser-project.org/cgi-bin/mailman/listinfo/users

Re: kam 1.5 syslog on solaris 10

by Robert McGilvray :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----Original Message-----
From: Daniel-Constantin Mierla [mailto:miconda@...]
Sent: Tuesday, October 27, 2009 4:38 PM
To: Robert McGilvray
Cc: users@...
Subject: Re: [Kamailio-Users] kam 1.5 syslog on solaris 10

Hello,

so it is working with 1.3 but not with 1.5, right? IIRC, some changes
were added when introducing async logging and running under daemontools.

The log you pasted at the end is what you get not in syslog file?

Cheers,
Daniel

--


Right - works with 1.3 but not 1.5.2 The log at the bottom actually does
show up in syslog but that's the last I ever see if I set fork=yes. If I
set fork=no (with log_stderror=no) then everything shows up as expected.


On 1.3 and with fork=no on 1.5 I see a bunch of open file entries for
xlog pointing at my log device that aren't there when it daemonizes.
Example:

openser   23192  openser  txt   VREG          85,3     55156    104971
/usr/local/openser-1.3.2/lib64/openser/modules/xlog.so
openser   23192  openser    3w  VCHR       21,3289            11010052
/devices/pseudo/log@0:conslog->LOG

I was looking at the commits earlier and noticed the changes you're
talking about. There was some work done moving the openlog() stuff from
daemonize.c to main.c - looks like some kind of solaris bug was
introduced in one of them.

Bob

--------------------------------------------------------------------------
This email with all information contained herein or attached hereto may contain confidential and/or privileged information intended for the addressee(s) only. If you have received this email in error, please contact the sender and immediately delete this email in its entirety and any attachments thereto.

_______________________________________________
Kamailio (OpenSER) - Users mailing list
Users@...
http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
http://lists.openser-project.org/cgi-bin/mailman/listinfo/users

Re: kam 1.5 syslog on solaris 10

by Henning Westerholt-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
On Mittwoch, 28. Oktober 2009, Robert McGilvray wrote:
> so it is working with 1.3 but not with 1.5, right? IIRC, some changes
> were added when introducing async logging and running under daemontools.
>
> The log you pasted at the end is what you get not in syslog file?
>
> Cheers,
> Daniel
>
> --
>
>
> Right - works with 1.3 but not 1.5.2 The log at the bottom actually does
> show up in syslog but that's the last I ever see if I set fork=yes. If I
> set fork=no (with log_stderror=no) then everything shows up as expected.
>
>
> On 1.3 and with fork=no on 1.5 I see a bunch of open file entries for
> xlog pointing at my log device that aren't there when it daemonizes.
> Example:
>
> openser 23192 openser txt VREG 85,3 55156 104971
> /usr/local/openser-1.3.2/lib64/openser/modules/xlog.so
> openser 23192 openser 3w VCHR 21,3289 11010052
> /devices/pseudo/log@0:conslog->LOG
>
> I was looking at the commits earlier and noticed the changes you're
> talking about. There was some work done moving the openlog() stuff from
> daemonize.c to main.c - looks like some kind of solaris bug was
> introduced in one of them.


Hello Robert,


with regards to the async logging, its not enabled by default, so i guess the changes you talking about are guilty.


Regards,


Henning


_______________________________________________
Kamailio (OpenSER) - Users mailing list
Users@...
http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
http://lists.openser-project.org/cgi-bin/mailman/listinfo/users

Re: kam 1.5 syslog on solaris 10

by miconda :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On 28.10.2009 9:51 Uhr, Henning Westerholt wrote:

> On Mittwoch, 28. Oktober 2009, Robert McGilvray wrote:
> > so it is working with 1.3 but not with 1.5, right? IIRC, some changes
> > were added when introducing async logging and running under daemontools.
> >
> > The log you pasted at the end is what you get not in syslog file?
> >
> > Cheers,
> > Daniel
> >
> > --
> >
> >
> > Right - works with 1.3 but not 1.5.2 The log at the bottom actually does
> > show up in syslog but that's the last I ever see if I set fork=yes. If I
> > set fork=no (with log_stderror=no) then everything shows up as expected.
> >
> >
> > On 1.3 and with fork=no on 1.5 I see a bunch of open file entries for
> > xlog pointing at my log device that aren't there when it daemonizes.
> > Example:
> >
> > openser 23192 openser txt VREG 85,3 55156 104971
> > /usr/local/openser-1.3.2/lib64/openser/modules/xlog.so
> > openser 23192 openser 3w VCHR 21,3289 11010052
> > /devices/pseudo/log@0:conslog->LOG
> >
> > I was looking at the commits earlier and noticed the changes you're
> > talking about. There was some work done moving the openlog() stuff from
> > daemonize.c to main.c - looks like some kind of solaris bug was
> > introduced in one of them.
>
>
> Hello Robert,
>
>
> with regards to the async logging, its not enabled by default, so i
> guess the changes you talking about are guilty.

this is the commit mentioned:
http://openser.svn.sourceforge.net/viewvc/openser?view=rev&revision=5142

and seems to be the last one to these files. Robert, can you get and
test revision before this commit (probably works to get just the three
files and copy them in your source tree)? Would help to identify if this
is the problem since I have no solaris 10.

Thanks,
Daniel

_______________________________________________
Kamailio (OpenSER) - Users mailing list
Users@...
http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
http://lists.openser-project.org/cgi-bin/mailman/listinfo/users

Re: kam 1.5 syslog on solaris 10

by Robert McGilvray :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----Original Message-----
From: Daniel-Constantin Mierla [mailto:miconda@...]
Sent: Wednesday, October 28, 2009 5:41 AM
To: Robert McGilvray
Cc: Henning Westerholt; users@...
Subject: Re: [Kamailio-Users] kam 1.5 syslog on solaris 10



On 28.10.2009 9:51 Uhr, Henning Westerholt wrote:
> On Mittwoch, 28. Oktober 2009, Robert McGilvray wrote:
> > so it is working with 1.3 but not with 1.5, right? IIRC, some
changes
> > were added when introducing async logging and running under
daemontools.

> >
> > The log you pasted at the end is what you get not in syslog file?
> >
> > Cheers,
> > Daniel
> >
> > --
> >
> >
> > Right - works with 1.3 but not 1.5.2 The log at the bottom actually
does
> > show up in syslog but that's the last I ever see if I set fork=yes.
If I
> > set fork=no (with log_stderror=no) then everything shows up as
expected.
> >
> >
> > On 1.3 and with fork=no on 1.5 I see a bunch of open file entries
for

> > xlog pointing at my log device that aren't there when it daemonizes.
> > Example:
> >
> > openser 23192 openser txt VREG 85,3 55156 104971
> > /usr/local/openser-1.3.2/lib64/openser/modules/xlog.so
> > openser 23192 openser 3w VCHR 21,3289 11010052
> > /devices/pseudo/log@0:conslog->LOG
> >
> > I was looking at the commits earlier and noticed the changes you're
> > talking about. There was some work done moving the openlog() stuff
from
> > daemonize.c to main.c - looks like some kind of solaris bug was
> > introduced in one of them.
>
>
> Hello Robert,
>
>
> with regards to the async logging, its not enabled by default, so i
> guess the changes you talking about are guilty.

this is the commit mentioned:
http://openser.svn.sourceforge.net/viewvc/openser?view=rev&revision=5142

and seems to be the last one to these files. Robert, can you get and
test revision before this commit (probably works to get just the three
files and copy them in your source tree)? Would help to identify if this

is the problem since I have no solaris 10.

Thanks,
Daniel

--

I wasn't able to compile by just switching out the three files, there
were unresolved symbols related to pv_free_extra_list();. I finally got
around the firewalls here to checkout revision 5141 but it won't
compile. The file it bails on is exactly the same as in 1.5.2 release so
I'm not sure why.

Compiling db/db_ut.c
/usr/sfw/bin/gcc  -g -O9 -funroll-loops   -Wall  -mcpu=ultrasparc
-mtune=ultrasparc      -DNAME='"kamailio"' -DVERSION='"1.5.0-dev9-tls"'
-DARCH='"sparc64"' -DOS='"solaris"' -DCOMPILER='"/usr/sfw/bin/gcc
3.4.3"' -D__CPU_sparc64 -D__OS_solaris -D__SMP_no
-DCFG_DIR='"/usr/local/kamailio-1.5.2/etc/kamailio/"' -DPKG_MALLOC
-DSHM_MMAP -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE
-DHAVE_RESOLV_RES -DSTATISTICS -DCHANGEABLE_DEBUG_LEVEL -DF_MALLOC
-DSVNREVISION='"2:5141"'  -DUSE_TLS -DFAST_LOCK -DADAPTIVE_WAIT
-DADAPTIVE_WAIT_LOOPS=1024  -DHAVE_GETIPNODEBYNAME -DHAVE_SYS_SOCKIO_H
-DHAVE_SCHED_YIELD -DHAVE_ALLOCA_H -DUSE_SIGACTION
-D_POSIX_PTHREAD_SEMANTICS -DHAVE_DEVPOLL -DHAVE_SELECT -I/ssl/include
-I/include -I/usr/include/openssl -c db/db_ut.c -o db/db_ut.o

In file included from db/db_ut.c:41:
/usr/include/stdlib.h:144: error: conflicting types for 'swab'
/usr/include/unistd.h:496: error: previous declaration of 'swab' was
here
/usr/include/stdlib.h:144: error: conflicting types for 'swab'
/usr/include/unistd.h:496: error: previous declaration of 'swab' was
here
db/db_ut.c: In function `db_str2longlong':
db/db_ut.c:75: warning: implicit declaration of function `strtoll'
db/db_ut.c: In function `db_int2str':
db/db_ut.c:114: warning: implicit declaration of function `snprintf'
gmake: *** [db/db_ut.o] Error 1

Unrelated question - I've tried changing the tuning options specified in
Makefile.defs to use the proper cpu arch and kept with -m32 since it has
to link against 32 bit libaries but even with that it builds the object
files as 64 bit. It then fails when linking kamailio. What's the proper
way to optimize the binary but keep all aspects of it 32? I tried

-mcpu=ultrasparc3 -m32 -threads -Wa,-xarch=v9b

It's an UltraSPARC-IIIi chip.

ykt1sipprd2# ls -1 *.o | xargs -n1 file
action.o:       ELF 64-bit MSB relocatable SPARCV9 Version 1,
UltraSPARC3 Extensions Required
blacklists.o:   ELF 64-bit MSB relocatable SPARCV9 Version 1,
UltraSPARC3 Extensions Required
cfg.tab.o:      ELF 64-bit MSB relocatable SPARCV9 Version 1,
UltraSPARC3 Extensions Required
cmpapi.o:       ELF 64-bit MSB relocatable SPARCV9 Version 1,
UltraSPARC3 Extensions Required
core_stats.o:   ELF 64-bit MSB relocatable SPARCV9 Version 1,
UltraSPARC3 Extensions Required
crc.o:          ELF 64-bit MSB relocatable SPARCV9 Version 1,
UltraSPARC3 Extensions Required
daemonize.o:    ELF 64-bit MSB relocatable SPARCV9 Version 1,
UltraSPARC3 Extensions Required
data_lump.o:    ELF 64-bit MSB relocatable SPARCV9 Version 1,
UltraSPARC3 Extensions Required
<snip>

Thanks!

Bob


--------------------------------------------------------------------------
This email with all information contained herein or attached hereto may contain confidential and/or privileged information intended for the addressee(s) only. If you have received this email in error, please contact the sender and immediately delete this email in its entirety and any attachments thereto.

_______________________________________________
Kamailio (OpenSER) - Users mailing list
Users@...
http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
http://lists.openser-project.org/cgi-bin/mailman/listinfo/users

Re: kam 1.5 syslog on solaris 10

by Henning Westerholt-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
On Donnerstag, 29. Oktober 2009, Robert McGilvray wrote:
> [..]
> I wasn't able to compile by just switching out the three files, there
> were unresolved symbols related to pv_free_extra_list();. I finally got
> around the firewalls here to checkout revision 5141 but it won't
> compile. The file it bails on is exactly the same as in 1.5.2 release so
> I'm not sure why.


Hi Robert,


i've attached a patch that removes the changes from this revision, it applies also to the latest kamailio 1.5 branch. So if this version compiles for you, then you could use this patch to check if the change in question is guilty.


Regards,


Henning



> Compiling db/db_ut.c
> /usr/sfw/bin/gcc -g -O9 -funroll-loops -Wall -mcpu=ultrasparc
> -mtune=ultrasparc -DNAME='"kamailio"' -DVERSION='"1.5.0-dev9-tls"'
> -DARCH='"sparc64"' -DOS='"solaris"' -DCOMPILER='"/usr/sfw/bin/gcc
> 3.4.3"' -D__CPU_sparc64 -D__OS_solaris -D__SMP_no
> -DCFG_DIR='"/usr/local/kamailio-1.5.2/etc/kamailio/"' -DPKG_MALLOC
> -DSHM_MMAP -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE
> -DHAVE_RESOLV_RES -DSTATISTICS -DCHANGEABLE_DEBUG_LEVEL -DF_MALLOC
> -DSVNREVISION='"2:5141"' -DUSE_TLS -DFAST_LOCK -DADAPTIVE_WAIT
> -DADAPTIVE_WAIT_LOOPS=1024 -DHAVE_GETIPNODEBYNAME -DHAVE_SYS_SOCKIO_H
> -DHAVE_SCHED_YIELD -DHAVE_ALLOCA_H -DUSE_SIGACTION
> -D_POSIX_PTHREAD_SEMANTICS -DHAVE_DEVPOLL -DHAVE_SELECT -I/ssl/include
> -I/include -I/usr/include/openssl -c db/db_ut.c -o db/db_ut.o
>
> In file included from db/db_ut.c:41:
> /usr/include/stdlib.h:144: error: conflicting types for 'swab'
> /usr/include/unistd.h:496: error: previous declaration of 'swab' was
> here
> /usr/include/stdlib.h:144: error: conflicting types for 'swab'
> /usr/include/unistd.h:496: error: previous declaration of 'swab' was
> here
> db/db_ut.c: In function `db_str2longlong':
> db/db_ut.c:75: warning: implicit declaration of function `strtoll'
> db/db_ut.c: In function `db_int2str':
> db/db_ut.c:114: warning: implicit declaration of function `snprintf'
> gmake: *** [db/db_ut.o] Error 1
>
> Unrelated question - I've tried changing the tuning options specified in
> Makefile.defs to use the proper cpu arch and kept with -m32 since it has
> to link against 32 bit libaries but even with that it builds the object
> files as 64 bit. It then fails when linking kamailio. What's the proper
> way to optimize the binary but keep all aspects of it 32? I tried
>
> -mcpu=ultrasparc3 -m32 -threads -Wa,-xarch=v9b
>
> It's an UltraSPARC-IIIi chip.
>
> ykt1sipprd2# ls -1 *.o | xargs -n1 file
> action.o: ELF 64-bit MSB relocatable SPARCV9 Version 1,
> UltraSPARC3 Extensions Required
> blacklists.o: ELF 64-bit MSB relocatable SPARCV9 Version 1,
> UltraSPARC3 Extensions Required
> cfg.tab.o: ELF 64-bit MSB relocatable SPARCV9 Version 1,
> UltraSPARC3 Extensions Required
> cmpapi.o: ELF 64-bit MSB relocatable SPARCV9 Version 1,
> UltraSPARC3 Extensions Required
> core_stats.o: ELF 64-bit MSB relocatable SPARCV9 Version 1,
> UltraSPARC3 Extensions Required
> crc.o: ELF 64-bit MSB relocatable SPARCV9 Version 1,
> UltraSPARC3 Extensions Required
> daemonize.o: ELF 64-bit MSB relocatable SPARCV9 Version 1,
> UltraSPARC3 Extensions Required
> data_lump.o: ELF 64-bit MSB relocatable SPARCV9 Version 1,
> UltraSPARC3 Extensions Required
> <snip>
>
> Thanks!
>
> Bob
>
>
> --------------------------------------------------------------------------
> This email with all information contained herein or attached hereto may
> contain confidential and/or privileged information intended for the
> addressee(s) only. If you have received this email in error, please contact
> the sender and immediately delete this email in its entirety and any
> attachments thereto.




[patch]

Index: daemonize.c
===================================================================
--- daemonize.c (revision 5142)
+++ daemonize.c (revision 5141)
@@ -61,10 +61,11 @@
 
 /*!
  * \brief daemon init
+ * \param name daemon name
  * \param own_pgid daemon process group
  * \return return 0 on success, -1 on error
  */
-int daemonize(int * own_pgid)
+int daemonize(char* name, int * own_pgid)
 {
  FILE *pid_stream;
  pid_t pid;
@@ -202,11 +203,26 @@
  /* continue, leave it open */
  };
 
- /* close any open file descriptors
-   32 is the maximum number of inherited open file descriptors */
+ /* close any open file descriptors */
+#ifndef SYSLOG_ASYNC
+ closelog();
+#else
+ closelog_async();
+#endif
+
+ /* 32 is the maximum number of inherited open file descriptors */
  for (r=3; r < 32; r++){
  close(r);
  }
+
+ if (!log_stderr)
+#ifndef SYSLOG_ASYNC
+ openlog(name, LOG_PID|LOG_CONS, log_facility);
+#else
+ openlog_async(name, LOG_PID|LOG_CONS, log_facility);
+#endif
+ /* LOG_CONS, LOG_PERRROR ? */
+
  return  0;
 
 error:
Index: daemonize.h
===================================================================
--- daemonize.h (revision 5142)
+++ daemonize.h (revision 5141)
@@ -29,7 +29,7 @@
 #ifndef _daemonize_h
 #define _daemonize_h
 
-int daemonize(int * own_pgid);
+int daemonize(char* name, int * own_pgid);
 int do_suid(const int uid, const int gid);
 int increase_open_fds(unsigned int target);
 int set_core_dump(int enable, unsigned int size);
Index: main.c
===================================================================
--- main.c (revision 5142)
+++ main.c (revision 5141)
@@ -1224,7 +1224,7 @@
 
  /* init_daemon? */
  if (!no_daemon){
- if ( daemonize(&own_pgid) <0 )
+ if ( daemonize((log_name==0)?argv[0]:log_name, &own_pgid) <0 )
  goto error;
  }
  else if (!dont_fork){
@@ -1234,16 +1234,6 @@
  }
  own_pgid=1;/* we have our own process group */
  }
- /* re-open log to set logname */
-#ifndef SYSLOG_ASYNC
- closelog();
- if (!log_stderr)
- openlog((log_name==0)?argv[0]:log_name, LOG_PID|LOG_CONS, log_facility);
-#else
- closelog_async();
- if (!log_stderr)
- openlog_async((log_name==0)?argv[0]:log_name, LOG_PID|LOG_CONS, log_facility);
-#endif
 
  /* install signal handlers */
  if (install_sigs() != 0){


_______________________________________________
Kamailio (OpenSER) - Users mailing list
Users@...
http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
http://lists.openser-project.org/cgi-bin/mailman/listinfo/users

Re: kam 1.5 syslog on solaris 10

by miconda :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On 29.10.2009 15:33 Uhr, Robert McGilvray wrote:
> [...]
>
> I wasn't able to compile by just switching out the three files, there
> were unresolved symbols related to pv_free_extra_list();.
ok, probably is due to other changes done later.

>  I finally got
> around the firewalls here to checkout revision 5141 but it won't
> compile.
the revision 5141 does not compile? Is the pure revision, right? No
files copied from one revision to another.

Cheers,
Daniel



>  The file it bails on is exactly the same as in 1.5.2 release so
> I'm not sure why.
>
> Compiling db/db_ut.c
> /usr/sfw/bin/gcc  -g -O9 -funroll-loops   -Wall  -mcpu=ultrasparc
> -mtune=ultrasparc      -DNAME='"kamailio"' -DVERSION='"1.5.0-dev9-tls"'
> -DARCH='"sparc64"' -DOS='"solaris"' -DCOMPILER='"/usr/sfw/bin/gcc
> 3.4.3"' -D__CPU_sparc64 -D__OS_solaris -D__SMP_no
> -DCFG_DIR='"/usr/local/kamailio-1.5.2/etc/kamailio/"' -DPKG_MALLOC
> -DSHM_MMAP -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE
> -DHAVE_RESOLV_RES -DSTATISTICS -DCHANGEABLE_DEBUG_LEVEL -DF_MALLOC
> -DSVNREVISION='"2:5141"'  -DUSE_TLS -DFAST_LOCK -DADAPTIVE_WAIT
> -DADAPTIVE_WAIT_LOOPS=1024  -DHAVE_GETIPNODEBYNAME -DHAVE_SYS_SOCKIO_H
> -DHAVE_SCHED_YIELD -DHAVE_ALLOCA_H -DUSE_SIGACTION
> -D_POSIX_PTHREAD_SEMANTICS -DHAVE_DEVPOLL -DHAVE_SELECT -I/ssl/include
> -I/include -I/usr/include/openssl -c db/db_ut.c -o db/db_ut.o
>
> In file included from db/db_ut.c:41:
> /usr/include/stdlib.h:144: error: conflicting types for 'swab'
> /usr/include/unistd.h:496: error: previous declaration of 'swab' was
> here
> /usr/include/stdlib.h:144: error: conflicting types for 'swab'
> /usr/include/unistd.h:496: error: previous declaration of 'swab' was
> here
> db/db_ut.c: In function `db_str2longlong':
> db/db_ut.c:75: warning: implicit declaration of function `strtoll'
> db/db_ut.c: In function `db_int2str':
> db/db_ut.c:114: warning: implicit declaration of function `snprintf'
> gmake: *** [db/db_ut.o] Error 1
>
> Unrelated question - I've tried changing the tuning options specified in
> Makefile.defs to use the proper cpu arch and kept with -m32 since it has
> to link against 32 bit libaries but even with that it builds the object
> files as 64 bit. It then fails when linking kamailio. What's the proper
> way to optimize the binary but keep all aspects of it 32? I tried
>
> -mcpu=ultrasparc3 -m32 -threads -Wa,-xarch=v9b
>
> It's an UltraSPARC-IIIi chip.
>
> ykt1sipprd2# ls -1 *.o | xargs -n1 file
> action.o:       ELF 64-bit MSB relocatable SPARCV9 Version 1,
> UltraSPARC3 Extensions Required
> blacklists.o:   ELF 64-bit MSB relocatable SPARCV9 Version 1,
> UltraSPARC3 Extensions Required
> cfg.tab.o:      ELF 64-bit MSB relocatable SPARCV9 Version 1,
> UltraSPARC3 Extensions Required
> cmpapi.o:       ELF 64-bit MSB relocatable SPARCV9 Version 1,
> UltraSPARC3 Extensions Required
> core_stats.o:   ELF 64-bit MSB relocatable SPARCV9 Version 1,
> UltraSPARC3 Extensions Required
> crc.o:          ELF 64-bit MSB relocatable SPARCV9 Version 1,
> UltraSPARC3 Extensions Required
> daemonize.o:    ELF 64-bit MSB relocatable SPARCV9 Version 1,
> UltraSPARC3 Extensions Required
> data_lump.o:    ELF 64-bit MSB relocatable SPARCV9 Version 1,
> UltraSPARC3 Extensions Required
> <snip>
>
> Thanks!
>
> Bob
>
>
> --------------------------------------------------------------------------
> This email with all information contained herein or attached hereto may contain confidential and/or privileged information intended for the addressee(s) only. If you have received this email in error, please contact the sender and immediately delete this email in its entirety and any attachments thereto.
>  

--
Daniel-Constantin Mierla
* Kamailio SIP Masterclass, Nov 9-13, 2009, Berlin
* http://www.asipto.com/index.php/sip-router-masterclass/


_______________________________________________
Kamailio (OpenSER) - Users mailing list
Users@...
http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
http://lists.openser-project.org/cgi-bin/mailman/listinfo/users

Re: kam 1.5 syslog on solaris 10

by Robert McGilvray :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----Original Message-----
From: Daniel-Constantin Mierla [mailto:miconda@...]
Sent: Thursday, October 29, 2009 12:48 PM
To: Robert McGilvray
Cc: Henning Westerholt; users@...
Subject: Re: [Kamailio-Users] kam 1.5 syslog on solaris 10



On 29.10.2009 15:33 Uhr, Robert McGilvray wrote:
> [...]
>
> I wasn't able to compile by just switching out the three files, there
> were unresolved symbols related to pv_free_extra_list();.
ok, probably is due to other changes done later.

>  I finally got
> around the firewalls here to checkout revision 5141 but it won't
> compile.
the revision 5141 does not compile? Is the pure revision, right? No
files copied from one revision to another.

Cheers,
Daniel

--

Right - clean checkout from svn. The errors are below. I'm compiling
1.5.3 with the patch from Henning now.


>  The file it bails on is exactly the same as in 1.5.2 release so
> I'm not sure why.
>
> Compiling db/db_ut.c
> /usr/sfw/bin/gcc  -g -O9 -funroll-loops   -Wall  -mcpu=ultrasparc
> -mtune=ultrasparc      -DNAME='"kamailio"'
-DVERSION='"1.5.0-dev9-tls"'

> -DARCH='"sparc64"' -DOS='"solaris"' -DCOMPILER='"/usr/sfw/bin/gcc
> 3.4.3"' -D__CPU_sparc64 -D__OS_solaris -D__SMP_no
> -DCFG_DIR='"/usr/local/kamailio-1.5.2/etc/kamailio/"' -DPKG_MALLOC
> -DSHM_MMAP -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE
> -DHAVE_RESOLV_RES -DSTATISTICS -DCHANGEABLE_DEBUG_LEVEL -DF_MALLOC
> -DSVNREVISION='"2:5141"'  -DUSE_TLS -DFAST_LOCK -DADAPTIVE_WAIT
> -DADAPTIVE_WAIT_LOOPS=1024  -DHAVE_GETIPNODEBYNAME -DHAVE_SYS_SOCKIO_H
> -DHAVE_SCHED_YIELD -DHAVE_ALLOCA_H -DUSE_SIGACTION
> -D_POSIX_PTHREAD_SEMANTICS -DHAVE_DEVPOLL -DHAVE_SELECT -I/ssl/include
> -I/include -I/usr/include/openssl -c db/db_ut.c -o db/db_ut.o
>
> In file included from db/db_ut.c:41:
> /usr/include/stdlib.h:144: error: conflicting types for 'swab'
> /usr/include/unistd.h:496: error: previous declaration of 'swab' was
> here
> /usr/include/stdlib.h:144: error: conflicting types for 'swab'
> /usr/include/unistd.h:496: error: previous declaration of 'swab' was
> here
> db/db_ut.c: In function `db_str2longlong':
> db/db_ut.c:75: warning: implicit declaration of function `strtoll'
> db/db_ut.c: In function `db_int2str':
> db/db_ut.c:114: warning: implicit declaration of function `snprintf'
> gmake: *** [db/db_ut.o] Error 1
>


--------------------------------------------------------------------------
This email with all information contained herein or attached hereto may contain confidential and/or privileged information intended for the addressee(s) only. If you have received this email in error, please contact the sender and immediately delete this email in its entirety and any attachments thereto.

_______________________________________________
Kamailio (OpenSER) - Users mailing list
Users@...
http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
http://lists.openser-project.org/cgi-bin/mailman/listinfo/users

Re: kam 1.5 syslog on solaris 10

by Robert McGilvray :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

From: Henning Westerholt [mailto:henning.westerholt@...]
Sent: Thursday, October 29, 2009 12:47 PM
To: Robert McGilvray
Cc: Daniel-Constantin Mierla; users@...
Subject: Re: [Kamailio-Users] kam 1.5 syslog on solaris 10

 

On Donnerstag, 29. Oktober 2009, Robert McGilvray wrote:
> [..]
> I wasn't able to compile by just switching out the three files, there
> were unresolved symbols related to pv_free_extra_list();. I finally got
> around the firewalls here to checkout revision 5141 but it won't
> compile. The file it bails on is exactly the same as in 1.5.2 release so
> I'm not sure why.

 

Hi Robert,

 

i've attached a patch that removes the changes from this revision, it applies also to the latest kamailio 1.5 branch. So if this version compiles for you, then you could use this patch to check if the change in question is guilty.

 

Regards,

 

Henning

--

 

The patch fixed it.

 

kamailio  19078    kam  txt   VREG          85,3      51192    456925 /usr/local/kamailio-1.5.3/lib64/kamailio/modules/xlog.so

kamailio  19078    kam    3w  VCHR        21,234             11010052 /devices/pseudo/log@0:conslog->LOG

 

Bob

 


This email with all information contained herein or attached hereto may contain confidential and/or privileged information intended for the addressee(s) only. If you have received this email in error, please contact the sender and immediately delete this email in its entirety and any attachments thereto.

_______________________________________________
Kamailio (OpenSER) - Users mailing list
Users@...
http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
http://lists.openser-project.org/cgi-bin/mailman/listinfo/users