an implementation to monitor all niconama broadcast lives.
- tweet popular lives using the following indexes.
- active users
- participants
- tweet specified user's comments.
popular lives.
user comments.
- python 2.7.x
- versions except 2.7.x are not tested
first, setup runtime environment.
virtualenv --distribute venv
source ./venv/bin/activate
sudo apt-get install python-dev libxml2-dev libxslt-dev
pip install -r requirements.txt
then configure application specific settings. see the sample configuration contents for details.
cp ./nicocomment.config.sample ./nicocomment.config
vi ./nicocomment.config
nicocomment requires lots of os resources, please tune the system as followings.
first, check the current resource limit configuration.
ulimit -a
then configure the max open files and max open processes settings.
sudo vi /etc/security/limits.conf
# for opening tons of sockets to comment servers.
honishi - nofile 65536
# for forking thread in the live comment listening.
# thread is treated as process internally in the kernel that uses NPTL(Native POSIX Thread Library)
honishi - nproc 65536
restart the box and check the settings above are successfully configured.
sudo reboot
ulimit -a
just use start & stop.
./nicocomment.sh start
./nicocomment.sh stop
see nicocomment.sh
inside for the details of monitoring.
# monitoring nicocomment
* * * * * /path/to/nicocomment/nicocomment.sh monitor >> /path/to/nicocomment/log/monitor.log 2>&1
copyright © 2013- honishi, hiroyuki onishi.
distributed under the [MIT license][mit]. [mit]: http://www.opensource.org/licenses/mit-license.php