Project

General

Profile

FAQ » History » Version 11

Pierre-Louis Bonicoli, 2017-09-16 18:54
Add typical logrotate configuration

1 1 Pierre-Louis Bonicoli
h1. FAQ
2 1 Pierre-Louis Bonicoli
3 11 Pierre-Louis Bonicoli
* Do you have a typical @logrotate@ configuration to archive and compress bip logs?
4 11 Pierre-Louis Bonicoli
5 11 Pierre-Louis Bonicoli
 * @/etc/crontab@:
6 11 Pierre-Louis Bonicoli
<pre>
7 11 Pierre-Louis Bonicoli
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
8 11 Pierre-Louis Bonicoli
9 11 Pierre-Louis Bonicoli
# adapt minute, hour, day of month, month and day of the week
10 11 Pierre-Louis Bonicoli
# run every 1:11am sunday
11 11 Pierre-Louis Bonicoli
11 1    * * 7   root    ionice -c3 srv_bip_logs_compress
12 11 Pierre-Louis Bonicoli
</pre>
13 11 Pierre-Louis Bonicoli
14 11 Pierre-Louis Bonicoli
 * @srv_bip_logs_compress@
15 11 Pierre-Louis Bonicoli
<pre>
16 11 Pierre-Louis Bonicoli
$ cat /usr/local/sbin/srv_bip_logs_compress
17 11 Pierre-Louis Bonicoli
#!/bin/sh
18 11 Pierre-Louis Bonicoli
19 11 Pierre-Louis Bonicoli
LOG_CURDIR=$(date +'%Y-%m')
20 11 Pierre-Louis Bonicoli
21 11 Pierre-Louis Bonicoli
find /srv/bip/logs -mindepth 2 -type f -mtime 1 -name "*.log" ! -wholename "*/${LOG_CURDIR}/*" -exec gzip {} \;
22 11 Pierre-Louis Bonicoli
</pre>
23 11 Pierre-Louis Bonicoli
24 4 Pierre-Louis Bonicoli
* when building Bip @error: unused parameter@  occurs
25 4 Pierre-Louis Bonicoli
source:configure.ac#L32 use the "AX_C___ATTRIBUTE__":http://www.gnu.org/s/autoconf-archive/ax_c___attribute__.html macro. This macro is included in "autoconf-archive":http://www.gnu.org/software/autoconf-archive/
26 3 Pierre-Louis Bonicoli
Full error message:
27 3 Pierre-Louis Bonicoli
<pre>
28 3 Pierre-Louis Bonicoli
src/connection.c: In function ‘tmp_dh_cb’:
29 3 Pierre-Louis Bonicoli
src/connection.c:1093: error: unused parameter ‘ssl_unused’
30 3 Pierre-Louis Bonicoli
make[1]: *** [src/connection.o] Error 1
31 3 Pierre-Louis Bonicoli
</pre>
32 6 Pierre-Louis Bonicoli
Rerun @bootstrap@ script after installation of @autoconf-archive@.
33 6 Pierre-Louis Bonicoli
34 8 Pierre-Louis Bonicoli
* How take in account bip.conf modifications without restarting bip ?
35 5 Pierre-Louis Bonicoli
Send signal HUP to bip.
36 5 Pierre-Louis Bonicoli
<pre>
37 5 Pierre-Louis Bonicoli
# Debian / Ubuntu
38 5 Pierre-Louis Bonicoli
/etc/init.d/bip reload
39 5 Pierre-Louis Bonicoli
# Other
40 5 Pierre-Louis Bonicoli
killall -HUP bip 
41 6 Pierre-Louis Bonicoli
</pre>
42 6 Pierre-Louis Bonicoli
43 6 Pierre-Louis Bonicoli
* Ubuntu 10.04: How to compile bip from repository ?
44 6 Pierre-Louis Bonicoli
<pre>
45 6 Pierre-Louis Bonicoli
sudo apt-get install git-core gcc flex bison libssl-dev automake autoconf-archive
46 6 Pierre-Louis Bonicoli
./bootstrap
47 6 Pierre-Louis Bonicoli
./configure --prefix=/opt/bip
48 6 Pierre-Louis Bonicoli
CFLAGS="-Wno-error" ./configure --prefix=/opt/bip
49 6 Pierre-Louis Bonicoli
make
50 5 Pierre-Louis Bonicoli
</pre>
51 9 Pierre-Louis Bonicoli
52 9 Pierre-Louis Bonicoli
53 9 Pierre-Louis Bonicoli
* Is there a limit on the number of lines bip saves for each channel ?
54 9 Pierre-Louis Bonicoli
See backlog_lines option when backlog is then stored into memory.
55 9 Pierre-Louis Bonicoli
56 9 Pierre-Louis Bonicoli
* Does bip try to connect to IRC servers automatically after bip is started ?
57 9 Pierre-Louis Bonicoli
Yes. But note that Bip will not connect to a network if there is no connection using this network.
58 9 Pierre-Louis Bonicoli
59 9 Pierre-Louis Bonicoli
* Does bip have a command that displays list of networks in bip.conf ?
60 9 Pierre-Louis Bonicoli
There is a "/BIP LIST" command. Admin could use "/BIP LIST networks|users|connections|all_links|all_connections" while user could use "/BIP LIST networks|connections".
61 9 Pierre-Louis Bonicoli
62 9 Pierre-Louis Bonicoli
* Does bip support modules ?
63 9 Pierre-Louis Bonicoli
No
64 9 Pierre-Louis Bonicoli
65 9 Pierre-Louis Bonicoli
* How to send command to bip ?
66 9 Pierre-Louis Bonicoli
Use "/BIP command" or "/quote BIP command" or "/query -BIP command"
67 10 Pierre-Louis Bonicoli
68 10 Pierre-Louis Bonicoli
* Any way to use sasl with bip ?
69 10 Pierre-Louis Bonicoli
No