/l3/users/YOUR-L3BACKEND-USER/SET-YOUR-FIRSTLAB-NAME-HERE/debian6/root :1 :2 :3 :4 |
|
#grep AGI /etc/asterisk/extensions.conf
exten => 8101,1,AGI(/usr/local/bin/asterisk-festival.pl,/home/user/belka.txt) exten => 8102,1,AGI(/usr/local/bin/asterisk-festival.pl,/home/user/burunduki.txt) exten => 8103,1,AGI(/usr/local/bin/asterisk-festival.pl,Я рад вас слышать. Добрый |
#/usr/local/bin/asterisk-festival.pl /home/user/belka.txt
Can't locate Asterisk/AGI.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /usr/local/bin/asterisk-festival.pl line 3. BEGIN failed--compilation aborted at /usr/local/bin/asterisk-festival.pl line 3. |
#/usr/local/bin/asterisk-festival.pl /home/user/belka.txt
Can't locate Asterisk/AGI.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /usr/local/bin/asterisk-festival.pl line 3. BEGIN failed--compilation aborted at /usr/local/bin/asterisk-festival.pl line 3. |
#фapt-get install perl
Reading package lists... Done Building dependency tree Reading state information... Done perl is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
#фapt-get install perl
Reading package lists... Done Building dependency tree Reading state information... Done perl is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
#apt-get install libasterisk-agi-perl
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: libasterisk-agi-perl 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 42.2 kB of archives. After this operation, 160 kB of additional disk space will be used. Get:1 http://192.168.12.254/debian/ wheezy/main libasterisk-agi-perl all 1.01-2 [42.2 kB] Fetched 42.2 kB in 0s (3,541 kB/s) Selecting previously unselected package libasterisk-agi-perl. (Reading database ... 134220 files and directories currently installed.) Unpacking libasterisk-agi-perl (from .../libasterisk-agi-perl_1.01-2_all.deb) ... Processing triggers for man-db ... Setting up libasterisk-agi-perl (1.01-2) ... |
#apt-get install libasterisk-agi-perl
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: libasterisk-agi-perl 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 42.2 kB of archives. After this operation, 160 kB of additional disk space will be used. Get:1 http://192.168.12.254/debian/ wheezy/main libasterisk-agi-perl all 1.01-2 [42.2 kB] Fetched 42.2 kB in 0s (3,541 kB/s) Selecting previously unselected package libasterisk-agi-perl. (Reading database ... 134220 files and directories currently installed.) Unpacking libasterisk-agi-perl (from .../libasterisk-agi-perl_1.01-2_all.deb) ... Processing triggers for man-db ... Setting up libasterisk-agi-perl (1.01-2) ... |
#apt-get install sendxmpp
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libauthen-sasl-perl libnet-xmpp-perl libxml-stream-perl Suggested packages: libdigest-hmac-perl libgssapi-perl libnet-dns-perl The following NEW packages will be installed: libauthen-sasl-perl libnet-xmpp-perl libxml-stream-perl sendxmpp 0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. ... Unpacking libxml-stream-perl (from .../libxml-stream-perl_1.23-2_all.deb) ... Selecting previously unselected package libnet-xmpp-perl. Unpacking libnet-xmpp-perl (from .../libnet-xmpp-perl_1.02-3_all.deb) ... Selecting previously unselected package sendxmpp. Unpacking sendxmpp (from .../sendxmpp_1.22-1_all.deb) ... Processing triggers for man-db ... Setting up libauthen-sasl-perl (2.1500-1) ... Setting up libxml-stream-perl (1.23-2) ... Setting up libnet-xmpp-perl (1.02-3) ... Setting up sendxmpp (1.22-1) ... |
#apt-get install sendxmpp
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libauthen-sasl-perl libnet-xmpp-perl libxml-stream-perl Suggested packages: libdigest-hmac-perl libgssapi-perl libnet-dns-perl The following NEW packages will be installed: libauthen-sasl-perl libnet-xmpp-perl libxml-stream-perl sendxmpp 0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. ... Unpacking libxml-stream-perl (from .../libxml-stream-perl_1.23-2_all.deb) ... Selecting previously unselected package libnet-xmpp-perl. Unpacking libnet-xmpp-perl (from .../libnet-xmpp-perl_1.02-3_all.deb) ... Selecting previously unselected package sendxmpp. Unpacking sendxmpp (from .../sendxmpp_1.22-1_all.deb) ... Processing triggers for man-db ... Setting up libauthen-sasl-perl (2.1500-1) ... Setting up libxml-stream-perl (1.23-2) ... Setting up libnet-xmpp-perl (1.02-3) ... Setting up sendxmpp (1.22-1) ... |
#apt-get install sendxmpp
GNU nano 2.2.6 File: /etc/asterisk/extensions.conf Modified [macro-outgoingcall] exten => s,1,Answer exten => s,n,Set(CALLFILENAME=${MACRO_EXTEN}-${CALLERID(num)}-${EPOCH}) exten => s,n,Monitor(wav,${CALLFILENAME},m) exten => s,n,Dial(${ARG1}) [macro-localcall] exten => s,1,NoOp(Answering ${MACRO_EXTEN} exten => s,n,Dial(SIP/${ARG1},2) exten => s,n,NoOp(Dial Status: ${DIALSTATUS}) exten => s,n,Goto(s-${DIALSTATUS},1) exten => s-NOANSWER,1,NoOp(No Answer) exten => s-NOANSWER,n,VoiceMail({MACRO_EXTEN}@default) ^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos ^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Text^T To Spell |
#apt-get install sendxmpp
GNU nano 2.2.6 File: /etc/asterisk/extensions.conf Modified [macro-outgoingcall] exten => s,1,Answer exten => s,n,Set(CALLFILENAME=${MACRO_EXTEN}-${CALLERID(num)}-${EPOCH}) exten => s,n,Monitor(wav,${CALLFILENAME},m) exten => s,n,Dial(${ARG1}) [macro-localcall] exten => s,1,NoOp(Answering ${MACRO_EXTEN} exten => s,n,Dial(SIP/${ARG1},2) exten => s,n,NoOp(Dial Status: ${DIALSTATUS}) exten => s,n,Goto(s-${DIALSTATUS},1) exten => s-NOANSWER,1,NoOp(No Answer) exten => s-NOANSWER,n,VoiceMail({MACRO_EXTEN}@default) ^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos ^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Text^T To Spell |
#cat /usr/local/bin/jabber-send
#!/bin/sh # $1 -- JID (Jabber-ID) of recipient # STDIN -- message /usr/bin/sendxmpp -i /var/lib/asterisk/.sendxmpprc "$1" |
#cat /usr/local/bin/jabber-send
#!/bin/sh # $1 -- JID (Jabber-ID) of recipient # STDIN -- message /usr/bin/sendxmpp -i /var/lib/asterisk/.sendxmpprc "$1" |
#apt-get install sendxmpp
asterisk -rv Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian6 (pid = 6128) Verbosity is at least 4 ... -- Registered extension context 'ael-dundi-e164-customers'; registrar: pbx_ael -- merging incls/swits/igpats from old(ael-dundi-e164-customers) to new(ael-dundi-e164-customers) context, registrar = pbx_config -- Registered extension context 'ael-dundi-e164-canonical'; registrar: pbx_ael -- merging incls/swits/igpats from old(ael-dundi-e164-canonical) to new(ael-dundi-e164-canonical) context, registrar = pbx_config -- Time to scan old dialplan and merge leftovers back into the new: 0.000828 sec -- Time to restore hints and swap in new dialplan: 0.000003 sec -- Time to delete the old dialplan: 0.000090 sec -- Total time merge_contexts_delete: 0.000921 sec debian6*CLI> quit Executing last minute cleanups |
#apt-get install sendxmpp
asterisk -rv Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian6 (pid = 6128) Verbosity is at least 4 ... -- Registered extension context 'ael-dundi-e164-customers'; registrar: pbx_ael -- merging incls/swits/igpats from old(ael-dundi-e164-customers) to new(ael-dundi-e164-customers) context, registrar = pbx_config -- Registered extension context 'ael-dundi-e164-canonical'; registrar: pbx_ael -- merging incls/swits/igpats from old(ael-dundi-e164-canonical) to new(ael-dundi-e164-canonical) context, registrar = pbx_config -- Time to scan old dialplan and merge leftovers back into the new: 0.000828 sec -- Time to restore hints and swap in new dialplan: 0.000003 sec -- Time to delete the old dialplan: 0.000090 sec -- Total time merge_contexts_delete: 0.000921 sec debian6*CLI> quit Executing last minute cleanups |
#[macro-outgoingcall]
|
#nano /etc/asterisk/extensions.conf
|
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-16910.30009.1687 2014-04-24 16:58:04.387349548 +0300 +++ /etc/asterisk/extensions.conf 2014-04-24 17:00:31.583347573 +0300 @@ -7,7 +7,7 @@ [macro-localcall] exten => s,1,NoOp(Answering ${MACRO_EXTEN}) -exten => s,n,System(echo ${CALLERID}(num) is calling | /usr/local/bin/jabber-send user6@lab0.xgu.ru) +exten => s,n,System(echo ${CALLERID(num)} is calling | /usr/local/bin/jabber-send user6@lab0.xgu.ru) exten => s,n,Set(CALLFILENAME={MACRO_EXTEN}-${CALLFILERID(num)}-${EPOCH}) exten => s,n,Monitor(wav,${CALLFILENAME},m) exten => s,n,Dial(SIP/${ARG1},2) |
#asterisk -rv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian6 (pid = 6128) Verbosity is at least 4 debian6*CLI> dialplan reload ... [Apr 24 17:00:46] WARNING[6166]: chan_sip.c:14460 check_auth: username mismatch, have <2301>, digest has <berlin> [Apr 24 17:00:46] NOTICE[6166]: chan_sip.c:22653 handle_request_invite: Failed to authenticate device "2301" <sip:2301@192.168.12.3>;tag=as7755b5fa -- Got SIP response 503 "Service Unavailable" back from 192.168.12.3:5060 -- SIP/berlin-000000fc is circuit-busy == Everyone is busy/congested at this time (1:0/1/0) -- Auto fallthrough, channel 'SIP/2301-000000fb' status is 'CONGESTION' [Apr 24 17:00:57] WARNING[23957]: pbx.c:4466 pbx_extension_helper: No application 'Playback/var/tmp/asterisk/message)' for extension (gr1, h, 1) == Spawn extension (gr1, h, 1) exited non-zero on 'SIP/2301-000000fb' debian6*CLI> quit Executing last minute cleanups |
#asterisk -rv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian6 (pid = 6128) Verbosity is at least 4 debian6*CLI> dialplan reload ... [Apr 24 17:00:46] WARNING[6166]: chan_sip.c:14460 check_auth: username mismatch, have <2301>, digest has <berlin> [Apr 24 17:00:46] NOTICE[6166]: chan_sip.c:22653 handle_request_invite: Failed to authenticate device "2301" <sip:2301@192.168.12.3>;tag=as7755b5fa -- Got SIP response 503 "Service Unavailable" back from 192.168.12.3:5060 -- SIP/berlin-000000fc is circuit-busy == Everyone is busy/congested at this time (1:0/1/0) -- Auto fallthrough, channel 'SIP/2301-000000fb' status is 'CONGESTION' [Apr 24 17:00:57] WARNING[23957]: pbx.c:4466 pbx_extension_helper: No application 'Playback/var/tmp/asterisk/message)' for extension (gr1, h, 1) == Spawn extension (gr1, h, 1) exited non-zero on 'SIP/2301-000000fb' debian6*CLI> quit Executing last minute cleanups |
#echo hi | /usr/local/bin/jabber-send user6@lab0.xgu.ru
cannot read /root/.sendxmpprc: No such file or directory |
#echo hi | /usr/local/bin/jabber-send user6@lab0.xgu.ru
cannot read /root/.sendxmpprc: No such file or directory |
#echo hi | /usr/local/bin/jabber-send user6@lab0.xgu.ru
you must own /var/lib/asterisk/.sendxmpprc |
#echo hi | /usr/local/bin/jabber-send user6@lab0.xgu.ru
you must own /var/lib/asterisk/.sendxmpprc |
#echo hi | /usr/local/bin/jabber-send user6@lab0.xgu.ru
you must own /var/lib/asterisk/.sendxmpprc |
#echo hi | /usr/local/bin/jabber-send user6@lab0.xgu.ru
you must own /var/lib/asterisk/.sendxmpprc |
#getent passwd asterisk
asterisk:x:111:117:Asterisk PBX daemon,,,:/var/lib/asterisk:/bin/false |
#getent passwd asterisk
asterisk:x:111:117:Asterisk PBX daemon,,,:/var/lib/asterisk:/bin/false |
#su asterisk
asterisk@debian6:/$ echo test | /usr/local/bin/jabber-send user0@lab0.xgu.ru asterisk@debian6:/$ echo test | /usr/local/bin/jabber-send user0@lab6.xgu.ru asterisk@debian6:/$ # должÐно бÑло пÑийÑи asterisk@debian6:/$ exit exit |
#su asterisk
asterisk@debian6:/$ echo test | /usr/local/bin/jabber-send user0@lab0.xgu.ru asterisk@debian6:/$ echo test | /usr/local/bin/jabber-send user0@lab6.xgu.ru asterisk@debian6:/$ # должÐно бÑло пÑийÑи asterisk@debian6:/$ exit exit |
## пришло?
|
#su asterisk
- $i@lab0.xgu.ru; done s exit r-send user$i@lab0.xgu.ru; done½Ð¾ Ðfor i in {1..9}; do echo test from 6 | /usr/local/bin/jabber exit f o d ; el } ... . 1 { echo test | /usr/local/bin/jabber-send user0@lab6. necho test | /usr/local/bin/jabber-send user0@lab6.xgu.ru iecho test | /usr/local/bin/jabber-send user0@lab6.xgu.ru echo test | /usr/local/bin/jabber-send user0@lab6.xgu.ru iecho test | /usr/local/bin/jabber-send user0@lab6.xgu.ru u echo test | /usr/local/bin/jabber-send user0@lab6.xgu.ru echo test | /usr/local/bin/jabber-send user0@lab6.xgu.ru u forecho test | /usr/local/bin/jabber-send user0@lab6.xgu.ru echo test | /usr/local/bin/jabber-send user0@lab6.xgu.ru |
#su asterisk
- $i@lab0.xgu.ru; done s exit r-send user$i@lab0.xgu.ru; done½Ð¾ Ðfor i in {1..9}; do echo test from 6 | /usr/local/bin/jabber exit f o d ; el } ... . 1 { echo test | /usr/local/bin/jabber-send user0@lab6. necho test | /usr/local/bin/jabber-send user0@lab6.xgu.ru iecho test | /usr/local/bin/jabber-send user0@lab6.xgu.ru echo test | /usr/local/bin/jabber-send user0@lab6.xgu.ru iecho test | /usr/local/bin/jabber-send user0@lab6.xgu.ru u echo test | /usr/local/bin/jabber-send user0@lab6.xgu.ru echo test | /usr/local/bin/jabber-send user0@lab6.xgu.ru u forecho test | /usr/local/bin/jabber-send user0@lab6.xgu.ru echo test | /usr/local/bin/jabber-send user0@lab6.xgu.ru |
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-16910.10890.28144 2014-04-25 09:46:33.786538874 +0300 +++ /etc/asterisk/extensions.conf 2014-04-25 09:49:07.806536827 +0300 @@ -1,6 +1,6 @@ [macro-outgoingcall] exten => s,1,Answer -exten => s,n,Set(CALLFILENAME=${MACRO_EXTEN}-${CALLERID(num)}-${EPOCH}) +exten => s,n,Set(CALLFILENAME=${MACRO_EXTEN}-${CALLERID(num)}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H:%M:S")}) exten => s,n,Monitor(wav,${CALLFILENAME},m) exten => s,n,Dial(${ARG1}) |
#ls /var/spool/asterisk/monitor/
1101-2301-1398336210.wav 2301-2302-1398337527.wav 1201-2301-1398327036.wav 2301-2302-1398347842.wav 1201-2301-1398335405.wav 2302-2301-1398337511.wav 1201-2301-2014-04-25-09:50:S.wav 2302-2301-1398347811.wav 1301-2301-1398348936.wav 2302-2301-1398348046.wav 2201-2301-1398326939.wav 2302-2301-1398348409.wav 2201-2301-1398350630.wav 2302-2301-1398348928.wav 2301-2301-1398348405.wav 2303-2301-1398338800.wav 2301-2301-1398348932.wav 2303-2301-1398338895.wav |
#ls /var/spool/asterisk/monitor/
1101-2301-1398336210.wav 2301-2302-1398337527.wav 1201-2301-1398327036.wav 2301-2302-1398347842.wav 1201-2301-1398335405.wav 2302-2301-1398337511.wav 1201-2301-2014-04-25-09:50:S.wav 2302-2301-1398347811.wav 1301-2301-1398348936.wav 2302-2301-1398348046.wav 2201-2301-1398326939.wav 2302-2301-1398348409.wav 2201-2301-1398350630.wav 2302-2301-1398348928.wav 2301-2301-1398348405.wav 2303-2301-1398338800.wav 2301-2301-1398348932.wav 2303-2301-1398338895.wav |
#[macro-outgoingcall]
(gedit:25811): EggSMClient-WARNING **: Failed to connect to the session manager: None of the authentication protocols specified are supported ** (gedit:25811): WARNING **: Could not connect to session bus |
#[macro-outgoingcall]
(gedit:25811): EggSMClient-WARNING **: Failed to connect to the session manager: None of the authentication protocols specified are supported ** (gedit:25811): WARNING **: Could not connect to session bus |
#asterisk -rv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian6 (pid = 6128) Verbosity is at least 4 == Using SIP RTP CoS mark 5 ... -- Executing [s@macro-outgoingcall:4] Dial("SIP/2301-00000113", "SIP/berlin/1101") in new stack == Using SIP RTP CoS mark 5 -- Called SIP/berlin/1101 -- SIP/berlin-00000114 answered SIP/2301-00000113 [Apr 25 10:04:49] WARNING[25941]: pbx.c:4466 pbx_extension_helper: No application 'Playback/var/tmp/asterisk/message)' for extension (gr1, h, 1) == Spawn extension (gr1, h, 1) exited non-zero on 'SIP/2301-00000113' == Spawn extension (macro-outgoingcall, s, 4) exited non-zero on 'SIP/2301-00000113' in macro 'outgoingcall' == Spawn extension (gr1, 1101, 1) exited non-zero on 'SIP/2301-00000113' debian6*CLI> quit Executing last minute cleanups |
#asterisk -rv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian6 (pid = 6128) Verbosity is at least 4 == Using SIP RTP CoS mark 5 ... -- Executing [s@macro-outgoingcall:4] Dial("SIP/2301-00000113", "SIP/berlin/1101") in new stack == Using SIP RTP CoS mark 5 -- Called SIP/berlin/1101 -- SIP/berlin-00000114 answered SIP/2301-00000113 [Apr 25 10:04:49] WARNING[25941]: pbx.c:4466 pbx_extension_helper: No application 'Playback/var/tmp/asterisk/message)' for extension (gr1, h, 1) == Spawn extension (gr1, h, 1) exited non-zero on 'SIP/2301-00000113' == Spawn extension (macro-outgoingcall, s, 4) exited non-zero on 'SIP/2301-00000113' in macro 'outgoingcall' == Spawn extension (gr1, 1101, 1) exited non-zero on 'SIP/2301-00000113' debian6*CLI> quit Executing last minute cleanups |
#[macro-outgoingcall]
Reading package lists... Done Building dependency tree Reading state information... Done sudo is already the newest version. sudo set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
#[macro-outgoingcall]
Reading package lists... Done Building dependency tree Reading state information... Done sudo is already the newest version. sudo set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
#visudo
# # This file MUST be edited with the 'visudo' command as root. # # Please consider adding local content in /etc/sudoers.d/ instead of # directly modifying this file. # # See the man page for details on how to write a sudoers file. # Defaults env_reset Defaults mail_badpass Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:$ # Host alias specification # User alias specification # Cmnd alias specification # User privilege specification [ Read 29 lines ] visudo: /etc/sudoers.tmp unchanged |
#visudo
# # This file MUST be edited with the 'visudo' command as root. # # Please consider adding local content in /etc/sudoers.d/ instead of # directly modifying this file. # # See the man page for details on how to write a sudoers file. # Defaults env_reset Defaults mail_badpass Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:$ # Host alias specification # User alias specification # Cmnd alias specification # User privilege specification [ Read 29 lines ] visudo: /etc/sudoers.tmp unchanged |
#ps -aux | grep smbd
warning: bad ps syntax, perhaps a bogus '-'? See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ root 26308 0.0 0.0 99368 3308 ? Ss 10:28 0:00 /usr/sbin/smbd -D root 26315 0.0 0.0 99884 1308 ? S 10:28 0:00 /usr/sbin/smbd -D root 26494 0.0 0.0 7832 876 pts/4 S+ 10:50 0:00 grep smbd |
#ps -aux | grep smbd
warning: bad ps syntax, perhaps a bogus '-'? See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ root 26308 0.0 0.0 99368 3308 ? Ss 10:28 0:00 /usr/sbin/smbd -D root 26315 0.0 0.0 99884 1308 ? S 10:28 0:00 /usr/sbin/smbd -D root 26494 0.0 0.0 7832 876 pts/4 S+ 10:50 0:00 grep smbd |
#ps aux | grep smbd
root 26308 0.0 0.0 99368 3308 ? Ss 10:28 0:00 /usr/sbin/smbd -D root 26315 0.0 0.0 99884 1308 ? S 10:28 0:00 /usr/sbin/smbd -D root 26508 0.0 0.0 7832 876 pts/4 S+ 10:57 0:00 grep smbd |
#ps aux | grep smbd
root 26308 0.0 0.0 99368 3308 ? Ss 10:28 0:00 /usr/sbin/smbd -D root 26315 0.0 0.0 99884 1308 ? S 10:28 0:00 /usr/sbin/smbd -D root 26508 0.0 0.0 7832 876 pts/4 S+ 10:57 0:00 grep smbd |
#!/bin/sh # $1 -- JID (Jabber-ID) of recipient # STDIN -- message /usr/bin/sendxmpp -i /var/lib/asterisk/.sendxmpprc "$1"
aster6@lab0.xgu.ru password
Время первой команды журнала | 15:35:50 2014- 4-24 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 09:57:11 2014- 4-25 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 22.77 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 3.96 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.86 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.90 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ find / -name abc find: /home/devi-orig/.gnome2: Keine Berechtigung find: /home/devi-orig/.gnome2_private: Keine Berechtigung find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung find: /home/devi-orig/.metacity: Keine Berechtigung find: /home/devi-orig/.inkscape: Keine Berechtigung ^C |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008