/[radius]/radius/doc/texinfo/debug.texi
ViewVC logotype

Diff of /radius/doc/texinfo/debug.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by gray, Sat Nov 8 15:49:04 2003 UTC revision 1.11 by gray, Tue Dec 2 14:30:16 2003 UTC
# Line 42  then only the first file name appears wi Line 42  then only the first file name appears wi
42  Here is an example of trace rule diagram:  Here is an example of trace rule diagram:
43  @smallexample  @smallexample
44  @cartouche  @cartouche
45  Oct 31 11:37:17 [28322]: Auth.info: (AUTHREQ foo 170 bar):  Oct 31 11:37:17 [28322]: Auth.info: (Access-Request foo 170 bar):
46  rule trace: /etc/raddb/users:157,22,3; huntgroups:72; hints:34  rule trace: /etc/raddb/users:157,22,3; huntgroups:72; hints:34
47  @end cartouche  @end cartouche
48  @end smallexample  @end smallexample
# Line 123  in @command{radiusd} logs you see: Line 123  in @command{radiusd} logs you see:
123    
124  @smallexample  @smallexample
125  @cartouche  @cartouche
126  Nov 06 21:25:24: Auth.notice: (AUTHREQ local 61 svp):  Nov 06 21:25:24: Auth.notice: (Access-Request local 61 svp):
127    Login incorrect [svp], CLID unknown    Login incorrect [svp]
128  @end cartouche  @end cartouche
129  @end smallexample  @end smallexample
130    
# Line 142  logs: Line 142  logs:
142    
143  @smallexample  @smallexample
144  @cartouche  @cartouche
145  Nov 06 21:31:24: Auth.notice: (AUTHREQ local 13 svp):  Nov 06 21:31:24: Auth.notice: (Access-Request local 13 svp):
146    Login incorrect [svp], CLID unknown    Login incorrect [svp]
147  Nov 06 21:31:24: Auth.info: (AUTHREQ local 13 svp):  Nov 06 21:31:24: Auth.info: (Access-Request local 13 svp):
148    rule trace: /etc/raddb/users:1, hints: 5    rule trace: /etc/raddb/users:1, hints: 5
149  @end cartouche  @end cartouche
150  @end smallexample  @end smallexample
# Line 181  Now, you ask @samp{svp} to log in again, Line 181  Now, you ask @samp{svp} to log in again,
181    
182  @smallexample  @smallexample
183  @cartouche  @cartouche
184  Nov 06 21:35:14: Auth.notice: (AUTHREQ local 42 svp):  Nov 06 21:35:14: Auth.notice: (Access-Request local 42 svp):
185    Login OK [svp], CLID unknown    Login OK [svp]
186  Nov 06 21:35:14: Auth.info: (AUTHREQ local 42 svp):  Nov 06 21:35:14: Auth.info: (Access-Request local 42 svp):
187    rule trace: /etc/raddb/users:7, hints: 5    rule trace: /etc/raddb/users:7, hints: 5
188  @end cartouche  @end cartouche
189  @end smallexample  @end smallexample
# Line 194  using SQL. When he logs in, you see in y Line 194  using SQL. When he logs in, you see in y
194    
195  @smallexample  @smallexample
196  @cartouche  @cartouche
197  Nov 06 21:39:05: Auth.notice: (AUTHREQ local 122 plog):  Nov 06 21:39:05: Auth.notice: (Access-Request local 122 plog):
198    Login OK [svp], CLID unknown    Login OK [svp]
199  Nov 06 21:39:05: Auth.info: (AUTHREQ local 122 plog):  Nov 06 21:39:05: Auth.info: (Access-Request local 122 plog):
200    rule trace: /etc/raddb/users:14    rule trace: /etc/raddb/users:14
201  @end cartouche  @end cartouche
202  @end smallexample  @end smallexample
# Line 243  to release. Line 243  to release.
243  @section Test Mode  @section Test Mode
244  @cindex Test Mode  @cindex Test Mode
245    
246    @dfn{Test mode} is used to test various aspects of radius
247    configuration, without starting the daemon. To enter test mode,
248    run
249    
250    @smallexample
251    radiusd -mt
252    @end smallexample
253    
254    @noindent
255    You will see usual @command{radiusd} diagnostics and the following two lines:
256    
257    @smallexample
258    @cartouche
259    ** TEST SHELL **
260    (radiusd) _
261    @end cartouche
262    @end smallexample
263    
264    The string @samp{** TEST SHELL **} indicates that @command{radiusd}
265    has entered test mode, the string @samp{(radiusd)} is the shell
266    prompt, indicating that @command{radiusd} is waiting for your
267    commands.
268    
269    The syntax of test shell command resembles that of Bourne shell:
270    each command consists of a list of @dfn{words} separated by
271    any amount of whitespace. Each word is either a sequence of
272    @dfn{allowed word characters} (i.e. alphabetical characters, decimal
273    digits, dashes and underscores), or any sequence of characters
274    enclosed in a pair of double quotes. The very first word is
275    a @dfn{command verb}, the rest of words are arguments to this
276    command verb. A command verb may be used in its full form,
277    in its abbreviated form (i.e. you may type only several first
278    characters of the verb, the only condition being that they
279    do not coincide with another command verb), or in it's short
280    form.
281    
282    The first command you should know is @code{help} (or, in its short
283    form, @code{h}). This command takes no arguments and displays
284    the short summary of all the available commands. Here is an example
285    of its output:
286    
287    @smallexample
288    @group
289    @cartouche
290    (radiusd) help
291    h       help                           Print this help screen
292    q       query-nas NAS LOGIN SID PORT [IP]
293                                           Query the given NAS
294    g       guile                          Enter Guile
295    rs      rewrite-stack [NUMBER]         Print or set the Rewrite
296                                           stack size
297    r       run-rewrite FUNCTION(args..)   Run given Rewrite function
298    s       source FILE                    Source the given Rewrite file
299    t       timespan TIMESPAN [DOW [HH [MM]]]
300                                           Check the timespan interval
301    d       debug LEVEL                    Set debugging level
302    rd      request-define [PAIR [,PAIR]]  Define a request
303    rp      request-print                  Print the request
304    quit    quit                           Quit the shell
305    @end cartouche
306    @end group
307    @end smallexample
308    
309    Each line of the output consists of three fields. The first field
310    shows the short command form. The second one lists its full form
311    and its arguments, optional arguments being enclosed in square
312    brackets. The third field contains short textual description of
313    the command.
314    
315    
316    
317    @deffn {Test Shell Command} query-nas @var{nas} @var{login} @var{sid} @var{port} [@var{ip}]
318    @deffnx {Test Shell Abbreviation} q
319    Queries the given @NAS{} about the session described by its
320    arguments. This command is useful in testing simultaneous login verification
321    (@pxref{Checking Simultaneous Logins}. Its arguments are
322    
323    @table @var
324    @item nas
325    Specifies the @NAS{} to query. It cn be its short name as defined
326    in @file{raddb/naslist}, or its fully qualified domain name, or
327    its @IP{}.
328    @item login
329    Name of the user whose session should be verified.
330    @item sid
331    Session ID.
332    @item port
333    Port number on the @NAS{}.
334    @item ip
335    Framed @IP{}, assigned to the user.
336    @end table
337    
338    The command displays the following result codes:
339    
340    @table @asis
341    @item 0
342    The session is not active.
343    @item 1
344    The session is active
345    @item -1
346    Some error occurred.
347    @end table
348    @end deffn
349    
350    @deffn {Test Shell Command} guile
351    @deffnx {Test Shell Abbreviation} g
352    Enter Guile shell. The command is only available if the package has
353    been compiled with Guile support. For more information, @xref{Guile}.
354    @end deffn
355    
356    @deffn {Test Shell Command} rewrite-stack [@var{number}]
357    @deffnx {Test Shell Abbreviation} rs
358    Prints or sets the Rewrite stack size.
359    @end deffn
360    
361    @deffn {Test Shell Command} run-rewrite @var{function}(@var{args} @dots{})  
362    @deffnx {Test Shell Abbreviation} r
363    Runs given Rewrite @var{function} and displays its return
364    value. Function arguments are specified in the usual way, i.e. as a
365    comma-separated list of Rewrite tokens.
366    
367    If the function being tested operates on request contents
368    (@pxref{Rewriting Incoming Requests}), you may supply the request
369    using @code{request-define} command (see below).
370    @end deffn
371    
372    @deffn {Test Shell Command} source @var{file}
373    @deffnx {Test Shell Abbreviation} s
374    Reads and compiles (``source'') the given Rewrite @var{file}. The
375    command prints @samp{0} if the file was compiled
376    successfully. Otherwise, it prints @samp{1} and any relevant diagnostics.
377    @end deffn
378    
379    @deffn {Test Shell Command} timespan @var{timespan} [@var{day-of-week} [@var{hour} [@var{minutes}]]]
380    @deffnx {Test Shell Abbreviation} t      
381    Checks whether the given time falls within the timespan
382    interval. Its first argument, @var{timespan}, contains the valid
383    @radiusd{} timespan specification (@pxref{Login-Time}). Rest of
384    arguments define the time. If any of these is omitted, the
385    corresponding value from current local time is used.
386    
387    @table @var
388    @item day-of-week
389    Ordinal day of week number, counted from 0. I.e.: Sunday -- 0, Monday
390    -- 1, etc.
391    @item hour
392    Hours counted from 0 to 24.
393    @item minutes
394    Minutes.
395    @end table
396    
397    The following set of samples illustrates this command:
398    
399    @smallexample
400    @group
401    @cartouche
402    (radiusd) timespan Wk0900-1800
403    ctime: Tue Dec  2 16:08:47 2003
404    inside Wk0900-1800: 6720 seconds left
405    
406    (radiusd) timespan Wk0900-1800 0
407    ctime: Sun Nov 30 16:09:03 2003
408    OUTSIDE Wk0900-1800: 60660 seconds to wait
409    
410    (radiusd) timespan Wk0900-1800 0 12 30
411    ctime: Sun Nov 30 12:30:13 2003
412    OUTSIDE Wk0900-1800: 73800 seconds to wait
413    
414    (radiusd) timespan Wk0900-1800 1 05 00
415    ctime: Mon Dec  1 05:00:33 2003
416    OUTSIDE Wk0900-1800: 14400 seconds to wait
417    
418    (radiusd) timespan Wk0900-1800 1 09 10
419    ctime: Wed Jan  7 22:09:41 2004
420    OUTSIDE Wk0900-1800: 39060 seconds to wait
421    
422    (radiusd) timespan Wk0900-1800 1 09 10
423    ctime: Mon Dec  1 09:10:44 2003
424    inside Wk0900-1800: 31800 seconds left
425    
426    (radiusd)
427    @end cartouche
428    @end group
429    @end smallexample
430    @end deffn
431    
432    @deffn {Test Shell Command} debug @var{level}
433    @deffnx {Test Shell Abbreviation} d
434    Set debugging level. @var{Level} is any valid debug level
435    specification (@pxref{Debugging}).
436    @end deffn
437    
438    @deffn {Test Shell Command} request-define [@var{pair} [,@var{pair}]]
439    @deffnx {Test Shell Abbreviation} rd    
440    Define a request for testing Rewrite functions. The optional arguments
441    are a comma-separated list of @AVP{}s. If they are omitted, the
442    command enters interactive mode, allowing you to enter the desired
443    @AVP{}s, as in the following example:
444    
445    @smallexample
446    @group
447    @cartouche
448    (radiusd) request-define
449    Enter the pair list. End with end of file
450    [radiusd] User-Name = smith, User-Password = guessme
451    [radiusd] NAS-IP-Address = 10.10.10.1
452    [radiusd] NAS-Port-Id = 34
453    [radiusd]
454    (radiusd)
455    @end cartouche
456    @end group
457    @end smallexample
458    
459    Notice that any number of @AVP{}s may be specified in a line. To
460    finish entering the request, either type an @key{EOF} character or
461    enter an empty line.
462    @end deffn
463    
464    @deffn {Test Shell Command} request-print
465    @deffnx {Test Shell Abbreviation} rp
466    Prints the request, defined by @code{request-define}.
467    
468    @smallexample
469    @group
470    @cartouche
471    (radiusd) request-print
472        User-Name = (STRING) smith
473        User-Password = (STRING) guessme
474        NAS-IP-Address = (IPADDR) 10.10.10.1
475        NAS-Port-Id = (INTEGER) 34
476    (radiusd)
477    @end cartouche
478    @end group
479    @end smallexample
480    @end deffn
481    
482    @deffn {Test Shell Command} quit
483    Immediately quits the shell.
484    @end deffn
485    
486    

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26