Under your mountpoint settings you can state a program that is run when the source is started/stopped. It is passed a parameter which is the name of the mountpoint that is starting. The processing of the stream does not wait for the script to end. <mount> <mount-name>/example-complex.ogg</mount-name> <username>othersource</username> <password>hackmemore</password> <max-listeners>1000</max-listeners> <fallback-mount>/example2.ogg</fallback-mount> <fallback-override>1</fallback-override> <fallback-when-full>1</fallback-when-full> <public>1</public> <bitrate>64</bitrate> <on-connect>/home/icecast/bin/source-start</on-connect> <on-disconnect>/home/icecast/bin/source-end</on-disconnect> </mount> The /home/icecast/bin/source-start file could be: #!/bin/bash /bin/echo "Stream - Start: " $(date) >> var/log/encoder.log And the /home/icecast/bin/source-stop file could be: #!/bin/bash /bin/echo "Stream - Stop : " $(date) >> var/log/encoder.log Use appropriate pathnames for your set up. And then you might end up with an encoder.log file that looks a little like this: Stream - Stop : Wed Dec 1 10:20:49 GMT 2021 Stream - Start: Wed Dec 1 10:21:43 GMT 2021 Stream - Stop : Thu Dec 23 04:59:13 GMT 2021 Stream - Start: Thu Dec 23 04:59:21 GMT 2021 Stream - Stop : Fri Feb 4 06:28:39 GMT 2022 Stream - Start: Fri Feb 4 06:28:48 GMT 2022 That will show you when an encoder has connected/disconnected. Hope that helps Chip Scooter On Mon, 14 Feb 2022 at 12:29, Richard Bartholomew <rlbart53 at gmail.com> wrote:> Hi, > > > > Is there a way, please, of being able to see historical connection details > in V2.4.4? For example, I wish to be able to see when a presenter > disconnected from the server and the following one connected in order to be > able to troubleshoot a problem. Since the incident, there have been > subsequent connections and, so, the admin page doesn't show the info I'm > after as it shows the current status. > > > > I've had a look through the access.log file but this doesn't seem to > detail when a streaming connection is made or dropped. The software being > used for streaming is Station Playlist and I can see lots of entries for > this but it all seems to be related to getting listener stats! > > > > Maybe I'm not interpreting the access.log correctly but if anyone can shed > any light upon what I'm trying to do, I'd really appreciate it. > > > > Thanks for any help. > > > > Regards > > Richard Bartholomew > > > > > _______________________________________________ > Icecast mailing list > Icecast at xiph.org > http://lists.xiph.org/mailman/listinfo/icecast >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xiph.org/pipermail/icecast/attachments/20220214/a5671c68/attachment.htm>
Thank you, Chip...excellent, I didn't realise I could run a script for a mount point. Regards Richard Bartholomew From: Icecast <icecast-bounces at xiph.org> On Behalf Of Chip Sent: 14 February 2022 13:25 To: Icecast streaming server user discussions <icecast at xiph.org> Subject: Re: [Icecast] CONNECTION STATS Under your mountpoint settings you can state a program that is run when the source is started/stopped. It is passed a parameter which is the name of the mountpoint that is starting. The processing of the stream does not wait for the script to end. <mount> <mount-name>/example-complex.ogg</mount-name> <username>othersource</username> <password>hackmemore</password> <max-listeners>1000</max-listeners> <fallback-mount>/example2.ogg</fallback-mount> <fallback-override>1</fallback-override> <fallback-when-full>1</fallback-when-full> <public>1</public> <bitrate>64</bitrate> <on-connect>/home/icecast/bin/source-start</on-connect> <on-disconnect>/home/icecast/bin/source-end</on-disconnect> </mount> The /home/icecast/bin/source-start file could be: #!/bin/bash /bin/echo "Stream - Start: " $(date) >> var/log/encoder.log And the /home/icecast/bin/source-stop file could be: #!/bin/bash /bin/echo "Stream - Stop : " $(date) >> var/log/encoder.log Use appropriate pathnames for your set up. And then you might end up with an encoder.log file that looks a little like this: Stream - Stop : Wed Dec 1 10:20:49 GMT 2021 Stream - Start: Wed Dec 1 10:21:43 GMT 2021 Stream - Stop : Thu Dec 23 04:59:13 GMT 2021 Stream - Start: Thu Dec 23 04:59:21 GMT 2021 Stream - Stop : Fri Feb 4 06:28:39 GMT 2022 Stream - Start: Fri Feb 4 06:28:48 GMT 2022 That will show you when an encoder has connected/disconnected. Hope that helps Chip Scooter On Mon, 14 Feb 2022 at 12:29, Richard Bartholomew <rlbart53 at gmail.com <mailto:rlbart53 at gmail.com> > wrote: Hi, Is there a way, please, of being able to see historical connection details in V2.4.4? For example, I wish to be able to see when a presenter disconnected from the server and the following one connected in order to be able to troubleshoot a problem. Since the incident, there have been subsequent connections and, so, the admin page doesn't show the info I'm after as it shows the current status. I've had a look through the access.log file but this doesn't seem to detail when a streaming connection is made or dropped. The software being used for streaming is Station Playlist and I can see lots of entries for this but it all seems to be related to getting listener stats! Maybe I'm not interpreting the access.log correctly but if anyone can shed any light upon what I'm trying to do, I'd really appreciate it. Thanks for any help. Regards Richard Bartholomew _______________________________________________ Icecast mailing list Icecast at xiph.org <mailto:Icecast at xiph.org> http://lists.xiph.org/mailman/listinfo/icecast -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xiph.org/pipermail/icecast/attachments/20220214/a08f89aa/attachment.htm>
That is really cool. Are other parameters passed like IP address or user-agent? Hearing about this makes me want to create a script to track all current users, instead of retrospectively figuring out their connection and disconnection through the access/error logs. On Mon, Feb 14, 2022 at 5:24 AM Chip <chiapas at aktivix.org> wrote:> Under your mountpoint settings you can state a program that is run when > the source is started/stopped. > > It is passed a parameter which is the name of the mountpoint that is > starting. The processing of the stream does not wait for the script to end. > > <mount> > <mount-name>/example-complex.ogg</mount-name> > <username>othersource</username> > <password>hackmemore</password> > <max-listeners>1000</max-listeners> > <fallback-mount>/example2.ogg</fallback-mount> > <fallback-override>1</fallback-override> > <fallback-when-full>1</fallback-when-full> > <public>1</public> > <bitrate>64</bitrate> > <on-connect>/home/icecast/bin/source-start</on-connect> > <on-disconnect>/home/icecast/bin/source-end</on-disconnect> > </mount> > > The /home/icecast/bin/source-start file could be: > > #!/bin/bash > /bin/echo "Stream - Start: " $(date) >> var/log/encoder.log > > And the /home/icecast/bin/source-stop file could be: > > #!/bin/bash > /bin/echo "Stream - Stop : " $(date) >> var/log/encoder.log > > Use appropriate pathnames for your set up. > > And then you might end up with an encoder.log file that looks a little > like this: > > Stream - Stop : Wed Dec 1 10:20:49 GMT 2021 > Stream - Start: Wed Dec 1 10:21:43 GMT 2021 > Stream - Stop : Thu Dec 23 04:59:13 GMT 2021 > Stream - Start: Thu Dec 23 04:59:21 GMT 2021 > Stream - Stop : Fri Feb 4 06:28:39 GMT 2022 > Stream - Start: Fri Feb 4 06:28:48 GMT 2022 > > That will show you when an encoder has connected/disconnected. > > Hope that helps > > Chip Scooter > > On Mon, 14 Feb 2022 at 12:29, Richard Bartholomew <rlbart53 at gmail.com> > wrote: > >> Hi, >> >> >> >> Is there a way, please, of being able to see historical connection >> details in V2.4.4? For example, I wish to be able to see when a presenter >> disconnected from the server and the following one connected in order to be >> able to troubleshoot a problem. Since the incident, there have been >> subsequent connections and, so, the admin page doesn't show the info I'm >> after as it shows the current status. >> >> >> >> I've had a look through the access.log file but this doesn't seem to >> detail when a streaming connection is made or dropped. The software being >> used for streaming is Station Playlist and I can see lots of entries for >> this but it all seems to be related to getting listener stats! >> >> >> >> Maybe I'm not interpreting the access.log correctly but if anyone can >> shed any light upon what I'm trying to do, I'd really appreciate it. >> >> >> >> Thanks for any help. >> >> >> >> Regards >> >> Richard Bartholomew >> >> >> >> >> _______________________________________________ >> Icecast mailing list >> Icecast at xiph.org >> http://lists.xiph.org/mailman/listinfo/icecast >> > _______________________________________________ > Icecast mailing list > Icecast at xiph.org > http://lists.xiph.org/mailman/listinfo/icecast >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xiph.org/pipermail/icecast/attachments/20220215/242732ca/attachment.htm>