[icecast] 99% cpu usage help

Tim Hart heytph at yahoo.com
Fri Jun 21 19:24:15 UTC 2002



Thanks.

In my rc.icecast script, I put a >/tmp/icecast.out and a
2>/tmp/icecast.err to try and follow your advice.  When I turned it
on, I got alot of "You can run, but you can't hide" lines over and
over in the icecast.out file.  I tracked it down in the code and
found src/admin.c was printing the message.  The function
handle_admin function has a while loop that prints the message which
is llike this.

        while (con->food.admin->alive && thread_alive (mt)) {
                /* con->sock will be STDOUT, so special case reading
to use STDIN */
                if (fd_read_line_nb(fileno(stdin), line, BUFSIZE))
                        handle_admin_command (con, line, ice_strlen
(line));
                else
                        fd_write_line (con->sock, "You can run, but
you can't hide!");

        }

I added a system ("sleep 5"); before the fd_write_line... function
call and it brought my CPU percentage down to nothing.

Keep in mind that I AM NOT A C PROGRAMMER.  I don't know what this
function does and I'm sure there are 20 ways I could've done this
better.  I'm sure I screwed something up but I can still stream audio
and my CPU is not dying now.  (Maybe the admin stuff doesn't work??)
This may be better suited for the development thread but, oh well.

<p><p>--- Plaza_Hotel_Düsseldorf <webmaster at chat-radio.de> wrote:
> I think the problem is that your icecast is wrong configured.
> If it has an configuratrion error that dows not shut it down at
> startup,
> it takes 99,9% cpu usage (thats my problem with, for example, a
> wrong path
> to configuration file at startup, or something like this).
> 
> Greets,
> 
> Stefan
> ----- Original Message -----
> From: "Tim Hart" <heytph at yahoo.com>
> To: <icecast at xiph.org>
> Sent: Wednesday, June 19, 2002 4:10 PM
> Subject: Re: [icecast] 99% cpu usage help
> 
> 
> > I have the same problem and am running 1.3.12 as well.  Any
> response
> > on this?
> >
> > --- lazybrain <lazybrain at rcn.com> wrote:
> > > Icecast uses 99.9% cpu usage with one listener and thats me
> > > locally!
> > >
> > > Samba,apache,mysql,proftpd,ssh, and every other application i
> can
> > > possibly
> > > run and try to cause load on my server
> > > , it wont get this high, how do i fix this?
> > >
> > >
> > > I compiled the latest 1.3.12 icecast source.
> > >
> > > 17769 root      15   0  2256 2192  1084 R    99.9  0.5  2720m
> > > icecast
> > >
> > >
> > > --- >8 ----
> > > List archives:  http://www.xiph.org/archives/
> > > icecast project homepage: http://www.icecast.org/
> > > To unsubscribe from this list, send a message to
> > > 'icecast-request at xiph.org'
> > > containing only the word 'unsubscribe' in the body.  No subject
> is
> > > needed.
> > > Unsubscribe messages sent to the list will be ignored/filtered.
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! - Official partner of 2002 FIFA World Cup
> > http://fifaworldcup.yahoo.com
> >
> > --- >8 ----
> > List archives:  http://www.xiph.org/archives/
> > icecast project homepage: http://www.icecast.org/
> > To unsubscribe from this list, send a message to
> 'icecast-request at xiph.org'
> > containing only the word 'unsubscribe' in the body.  No subject
> is needed.
> > Unsubscribe messages sent to the list will be ignored/filtered.
> >
> >
> 
> 
> --- >8 ----
> List archives:  http://www.xiph.org/archives/
> icecast project homepage: http://www.icecast.org/
> To unsubscribe from this list, send a message to
> 'icecast-request at xiph.org'
> containing only the word 'unsubscribe' in the body.  No subject is
> needed.
> Unsubscribe messages sent to the list will be ignored/filtered.

<p>__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--- >8 ----
List archives:  http://www.xiph.org/archives/
icecast project homepage: http://www.icecast.org/
To unsubscribe from this list, send a message to 'icecast-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Icecast mailing list