From: Martin van den Nieuwelaar (martin@gadgets.co.nz)
Date: Mon Dec 09 2002 - 13:41:30 PST
Atsuo,
I also found that semaphores would hang around sometimes. My solution
was to add something to the start/stop script that would also clean up
the semaphore. It's a kludge for the less than ideal behaviour of
CFlowd, but it works.
Cheers,
-Martin
Atsuo Hirai wrote:
> Marcus,
> Thank you for your advice.
>
> I found some unreleased semaphores.
> So, I removed them and set following parameters in my cflowd.conf and
> restart cflowd. (PKTBUFSIZE:10485760 was not enough in my environment.)
>
> PKTBUFSIZE: 16777216
> NUMFLOWFILES: 20
>
> Then, the error messages went away :-).
>
> I use following script to stop cflowd.
>
> | 'stop')
> | for i in cfdcollect cflowd cflowdmux
> | do
> | sleep 2
> | killall -15 $i && echo "graceful shutdown of $i"
> | done
>
> But, an unreleased semaphore remains every time...;-)
> Do you have any good idea?
>
> On Fri, 6 Dec 2002 09:23:32 -0800
> "Marcus Beaman" <marcus.beaman@state.or.us> wrote:
>
>
>>Atsuo,
>>
>>In my cflowd.conf I increased the PKTBUFSIZE and the NUMFLOWFILES and the error
>>went away:
>> PKTBUFSIZE: 10485760
>> NUMFLOWFILES: 20
>>
>>However, I think you might have a semaphore/shared memory problem. In this case
>>you can (1) reboot the system or (2) use the ipcs/ipcrm commands to list and
>>remove the bad semaphore(s)/shared memory segment(s). Try the man pages for
>>ipcs, but for freebsd the "ipcs -a" command should list all active semaphores.
>>After you kill the cflowd/cflowdmux processes you should not see a
>>semaphore/shared memory entry for the account under which cflowd is running. If
>>you do see an entry then you have an unreleased semaphore set or shared memory
>>segment. This has happened to me before (once in two years) and the result was
>>one of the services (cflowd/cflowdmux and I don't remember which) were unable to
>>bind to their port (if memory serves me). This may be giving you the
>>"Connection refused" syslog entry. You can then use ipcrm to remove the
>>semaphore/share memory entry, for freebsd I used "ipcrm -s <key#>. Hope this
>>helps and sorry for the lengthy reply :)
>>
>><snip>
>>
>>>Dec 6 08:00:29 stat02 cflowdmux[16983]: [E] semop(65540,0xbfbfefbc,1) failed
>>
>>to
>>
>>> release buffer lock: Resource temporarily unavailable
>>
>>{CflowdPacketQueue.cc:438
>>
>>>}
>>
>>So, I tried to change the value of PKTBUFSIZE in my cflowd.conf from
>>2097152 to more larger value.
>>However, if the value is changed, they doesn't work with following
>>messages. TABLESOCKFILE(/tmp/cflowdtable.socket) not created.
>>
>>>Dec 6 18:11:13 stat02 cfdcollect[36616]: [E] connect(4,0x80fb0e4,16) (host
>>
>>loca
>>
>>>lhost port 2056) failed: Connection refused {CflowdServer.cc:112}
>>>Dec 6 18:11:13 stat02 cfdcollect[36616]: [I] sleeping for 299 seconds.
>>
>></snip>
>>
>>-Marcus
>>
>>--------------------------------------------
>>Marcus Beaman DAS/IRMD/DVS
>>State of Oregon, Network Operations Analyst
>>(503) 378-3627 hotline
>>(503) 378-6408 work
>>(503) 373-2871 pager
>>--------------------------------------------
>>
>
>
> ------------------------------------------------------------------------
> $BJ?0f(B $B=_IW(B $B3t<02q<R%$%s%?!<%M%C%HAm9g8&5f=j(B
> Atsuo Hirai Internet Research Institute, Inc.
> E-Mail:hirai@iri.co.jp http://www.iri.co.jp/
>
>
> _______________________________________________
> Cflowd mailing list
> Cflowd@caida.org
> http://login.caida.org/mailman/listinfo/cflowd
>
-- Expert carrier network traffic analysis and visualisation http://www.networkintelligence.biz xenaphobia: The fear of being beaten to a pulp by a leather-clad, New Zealand woman_______________________________________________ Cflowd mailing list Cflowd@caida.org http://login.caida.org/mailman/listinfo/cflowd
This archive was generated by hypermail 2.1.4 : Mon Dec 09 2002 - 13:53:18 PST