summaryrefslogtreecommitdiff
path: root/doc/debugging/faq.rst
blob: 87bd7467327e334935370cc158b713c21d75dd43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
FAQ
===============

HTB: quantum of class is big
----------------------------
When an error appears in the logs:

.. code-block:: sh

  HTB: quantum of class 10001 is big. Consider r2q change.

You need to set a parameter for the shaper:

.. code-block:: sh

  #accel-pp will calculate the value itself
  moderate-quantum=1


How to rotate logs ?
--------------------

You can use system logrotate utility for it. Put following file to /etc/logrotate.d

.. code-block:: sh

  /var/log/accel-ppp/*.log {
        missingok
        sharedscripts
        postrotate
                test -r /var/run/accel-pppd.pid && kill -HUP `cat /var/run/accel-pppd.pid`
        endscript
  }

I don't see pppd processes, how to manually terminate session ?
---------------------------------------------------------------

Yes, in fact accel-ppp doesn't use pppd because it has its own ppp implementation.
To terminate session you may use three methods:

1. Use cli (telnet or tcp):

.. code-block:: sh

  By default telnet listens connections on 2000 port and tcp on 2001 port.
  $ telnet 127.0.0.1 2000
  Trying 127.0.0.1...
  Connected to 127.0.0.1.
  Escape character is '^]'.
  accel-ppp version 1.5.0
  accel-ppp# terminate if ppp0


or

.. code-block:: sh

  $ echo 'terminate if ppp0' | nc -q0 127.0.0.1 2001


There are also other criterias to select session(s), use help cli command to get more information.

2. Use radius Disconnect-Message:

.. code-block:: sh

  $ echo 'NAS-Port=0' | radclient 127.0.0.1:3799 disconnect testing123
  Received response ID 170, code 41, length = 20

and you can control it in logs:

.. code-block:: sh

  [2012-01-21|16:48:55]:  info: ppp0: recv [RADIUS|Disconnect-Request id=aa <NAS-Port 0>]
  [2012-01-21|16:48:55]:  info: ppp0: send [RADIUS|Disconnect-ACK id=aa]

3. Use snmp:

.. code-block:: sh

  $ snmpset -m +ACCEL-PPP-MIB -v 2c -c local 127.0.0.1 ACCEL-PPP-MIB::termByIfName.0 = ppp0