A long time I've waited for phpbnc, and when I almost forgot about it, there was 0.16-beta
I'm currently running miau, and for each connection I need an own process with it's own config, not very flexible.
So, I hope to get phpbnc running perfectly.
My first concern currently is the abnormal high cpu usage.
My server I'm using is not a high end server, it's an Epia Via C3, 1300 MHz, with 1 GB memory.
Which is more then enough for my functions.
I'm running another PHP process, an IRC bot, and it hardly takes cpu load.
sander@Homer:~$ ps aux | grep php
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
sander 28454 0.8 0.7 20508 7312 ? S Jan23 285:48 /usr/bin/php5 -q ./start.php
sander 31403 75.3 1.1 23888 10900 pts/4 R+ 18:39 18:29 php main.php
sander 31429 1.0 0.0 2972 764 pts/0 R+ 19:03 0:00 grep php
As you can see, main.php, aka phpbnc, takes up to 75% cpu usage.
I think the cause is the ioncube loader, but I don't know exactly how I can test this.
As a reference, 4 miau bnc processes on the same machine, with ~30 (5 high activity) channels open.
sander@Homer:~$ ps aux | grep miau
sander 31367 0.0 0.0 2096 968 pts/4 S 18:27 0:00 miau -d /home/sander/Programs/.miau/configs/*/
sander 31369 0.0 0.0 2100 964 pts/4 S 18:27 0:01 miau -d /home/sander/Programs/.miau/configs/*/
sander 31371 0.0 0.0 2088 956 pts/4 S 18:27 0:00 miau -d /home/sander/Programs/.miau/configs/*/
sander 31373 0.0 0.0 2096 960 pts/4 S 18:27 0:00 miau -d /home/sander/Programs/.miau/configs/*/
sander 31432 0.0 0.0 2976 752 pts/0 R+ 19:06 0:00 grep miau
Almost no cpu/mem usage.
Below is my normal load, almost idle
sander@Homer:~/Programs/phpbnc$ uptime
19:38:14 up 95 days, 5:46, 4 users, load average: 0.00, 0.00, 0.00
This is my load when running phpbnc:
sander@Homer:~/Programs/phpbnc$ uptime
19:23:41 up 95 days, 5:32, 4 users, load average: 1.04, 1.09, 1.04
When I disconnect my irc client, and let phpbnc log everything (/pb set channellog on), the load is even higher:
sander@Homer:~/Programs/phpbnc$ uptime
19:25:18 up 95 days, 5:33, 4 users, load average: 1.45, 1.27, 1.11
So I really hope this can be solved
There is no way I'm gonna run phpbnc with such high cpu loads.
And now, a few warnings I got while running phpbnc.
In the config.php:
define("identdip", "0.0.0.0"); //recommended to have 0.0.0.0
So, when I leave this value to 0.0.0.0, and start phpbnc:
sander@Homer:~/Programs/phpbnc$ php main.php
Connecting to MySQL...
Connected to MySQL.
Starting listening sockets...
0
0
Warning: stream_socket_server(): unable to connect to tcp://0.0.0.0:113 (Permission denied) in /home/sander/Programs/phpbnc/main.php on line 0
0 Permission denied[/b[
Sockets up and runnning.
Loading usersettings into memory...
Loaded usersettings into memory.
Loading blowfish keys into memory...
Loaded blowfish keys into memory.
Im good to go, phpBNC v.0.16-beta, http://www.phpBNC.se/
Starting in..5..4..3..2..1..
Warning: stream_select(): supplied argument is not a valid stream resource in /home/sander/Programs/phpbnc/main.php on line 0
Warning: stream_select(): supplied argument is not a valid stream resource in /home/sander/Programs/phpbnc/main.php on line 0
Warning: stream_select(): supplied argument is not a valid stream resource in /home/sander/Programs/phpbnc/main.php on line 0
Warning: fclose(): supplied argument is not a valid stream resource in /home/sander/Programs/phpbnc/main.php on line 0
identd request got disconnected
Even tried to change the identdip to 10.0.0.1, my server IP, but I got the same warning.
And I've still some general questions left
1: Channellogs: Is is possible to control how many lines are "readed" when you reconnect to the BNC?
Currently all the logs are "readed", which isn't very useful on a channel with ~5 lines per second.
2: Channellogs: Logging in MySQL is fun, but I would be glad if it is possible to log in plain text files, somewhat simular to mIRC logging.
At miau I'm using logfiles for all channels (After configuring them in the config...) even when I'm connected to the BNC. I love logs.
3: Channellogs: It would be nice if you could log always, even when you are on the channel.
Again a personal request
Oh, and before I forgot, keep up the good work!
There aren't many good BNC's for IRC, so there isn't much to choose, and I really hope that I can take the step to phpbnc some day
