Hi there. Great app. I was looking for a way to show how many active connections were open to the webcam_server module, and came up with a bash script to do it. I am pretty sure that showing active/open connections isn't a native function to camsource, right?
connections come into my server on rtsp port 554
here is my script. All it does is netstat and count how many connections to rtsp are seen.
conn=$(netstat -ta | grep -c mandrake.brittonfa:rtsp)
if [ "$conn" = "1" ]; then
echo " $conn connection $(date) "
else
echo " $conn connections $(date) "
fi
I call the bash script from the text module with
<cmd>/etc/camtext.sh</cmd>
and the output of the script is put on each frame from the webcam_server module. A lot of overhead I'm sure. I can usually figure out how to get something done but rarely is it the most optimized way so I thought I would ask here if anyone has a better way to do this.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i know there should be a built-in method for getting the current connections (not only for showing it in the webcam picture, but also as an administrative interface or something). the modular/threaded design of camsource doesnt make this easier though. i'll try to think something up for the next release anyway.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi there. Great app. I was looking for a way to show how many active connections were open to the webcam_server module, and came up with a bash script to do it. I am pretty sure that showing active/open connections isn't a native function to camsource, right?
connections come into my server on rtsp port 554
here is my script. All it does is netstat and count how many connections to rtsp are seen.
conn=$(netstat -ta | grep -c mandrake.brittonfa:rtsp)
if [ "$conn" = "1" ]; then
echo " $conn connection $(date) "
else
echo " $conn connections $(date) "
fi
I call the bash script from the text module with
<cmd>/etc/camtext.sh</cmd>
and the output of the script is put on each frame from the webcam_server module. A lot of overhead I'm sure. I can usually figure out how to get something done but rarely is it the most optimized way so I thought I would ask here if anyone has a better way to do this.
i know there should be a built-in method for getting the current connections (not only for showing it in the webcam picture, but also as an administrative interface or something). the modular/threaded design of camsource doesnt make this easier though. i'll try to think something up for the next release anyway.