/l3/users/Sergey-Ma/nt-voip-2014-apr/debian8/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 |
|
#asterisk restart
Privilege escalation protection disabled! See https://wiki.asterisk.org/wiki/x/1gKfAQ for more details. Asterisk already running on /var/run/asterisk/asterisk.ctl. Use 'asterisk -r' to connect. |
#asterisk restart
Privilege escalation protection disabled! See https://wiki.asterisk.org/wiki/x/1gKfAQ for more details. Asterisk already running on /var/run/asterisk/asterisk.ctl. Use 'asterisk -r' to connect. |
#asterisk -r restart
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 debian8 (pid = 2622) Verbosity is at least 7 == Using SIP RTP CoS mark 5 ... -- Executing [s@macro-localcall:7] Goto("SIP/3201-00000179", "s-CHANUNAVAIL,1") in new stack -- Goto (macro-localcall,s-CHANUNAVAIL,1) -- Executing [s-CHANUNAVAIL@macro-localcall:1] Playback("SIP/3201-00000179", "/var/tmp/asterisk/message") in new stack -- <SIP/3201-00000179> Playing '/var/tmp/asterisk/message.gsm' (language 'ru') -- Auto fallthrough, channel 'SIP/3201-00000179' status is 'CHANUNAVAIL' -- Executing [h@gr1:1] Playback("SIP/3201-00000179", "/var/tmp/asterisk/message") in new stack [Apr 25 17:02:02] WARNING[22103]: file.c:766 ast_readaudio_callback: Failed to write frame -- <SIP/3201-00000179> Playing '/var/tmp/asterisk/message.gsm' (language 'ru') [Apr 25 17:02:02] WARNING[22103]: app_playback.c:475 playback_exec: ast_streamfile failed on SIP/3201-00000179 for /var/tmp/asterisk/message debian8*CLI> quit |
#asterisk -r restart
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 debian8 (pid = 2622) Verbosity is at least 7 == Using SIP RTP CoS mark 5 ... -- Executing [s@macro-localcall:7] Goto("SIP/3201-00000179", "s-CHANUNAVAIL,1") in new stack -- Goto (macro-localcall,s-CHANUNAVAIL,1) -- Executing [s-CHANUNAVAIL@macro-localcall:1] Playback("SIP/3201-00000179", "/var/tmp/asterisk/message") in new stack -- <SIP/3201-00000179> Playing '/var/tmp/asterisk/message.gsm' (language 'ru') -- Auto fallthrough, channel 'SIP/3201-00000179' status is 'CHANUNAVAIL' -- Executing [h@gr1:1] Playback("SIP/3201-00000179", "/var/tmp/asterisk/message") in new stack [Apr 25 17:02:02] WARNING[22103]: file.c:766 ast_readaudio_callback: Failed to write frame -- <SIP/3201-00000179> Playing '/var/tmp/asterisk/message.gsm' (language 'ru') [Apr 25 17:02:02] WARNING[22103]: app_playback.c:475 playback_exec: ast_streamfile failed on SIP/3201-00000179 for /var/tmp/asterisk/message debian8*CLI> quit |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -rvv
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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian8 (pid = 22243) ... -- SIP/3201-0000000b is ringing -- SIP/3202-0000000a is ringing -- Stopped music on hold on SIP/havana-00000008 == Spawn extension (gr_relay, 3298, 2) exited non-zero on 'SIP/havana-00000008' -- Executing [h@gr_relay:1] Playback("SIP/havana-00000008", "/var/tmp/asterisk/message") in new stack [Apr 25 17:09:21] WARNING[22339]: file.c:766 ast_readaudio_callback: Failed to write frame -- <SIP/havana-00000008> Playing '/var/tmp/asterisk/message.gsm' (language 'en') [Apr 25 17:09:21] WARNING[22339]: app_playback.c:475 playback_exec: ast_streamfile failed on SIP/havana-00000008 for /var/tmp/asterisk/message debian8*CLI> quit Executing last minute cleanups |
#asterisk -rvv
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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian8 (pid = 22243) ... -- SIP/3201-0000000b is ringing -- SIP/3202-0000000a is ringing -- Stopped music on hold on SIP/havana-00000008 == Spawn extension (gr_relay, 3298, 2) exited non-zero on 'SIP/havana-00000008' -- Executing [h@gr_relay:1] Playback("SIP/havana-00000008", "/var/tmp/asterisk/message") in new stack [Apr 25 17:09:21] WARNING[22339]: file.c:766 ast_readaudio_callback: Failed to write frame -- <SIP/havana-00000008> Playing '/var/tmp/asterisk/message.gsm' (language 'en') [Apr 25 17:09:21] WARNING[22339]: app_playback.c:475 playback_exec: ast_streamfile failed on SIP/havana-00000008 for /var/tmp/asterisk/message debian8*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-7112.1314.11621 2014-04-25 17:23:02.594211068 +0300 +++ /etc/asterisk/extensions.conf 2014-04-25 17:23:41.810210650 +0300 @@ -17,7 +17,8 @@ [macro-localcall] exten=>s,1,NoOp(Answering ${MACRO_EXTEN}) -exten => s,n,System(/usr/local/bin/jabber-send user8@lab0.xgu.ru ${CALLERID(num)} is calling) +;--- send jabber notification +;----exten => s,n,System(/usr/local/bin/jabber-send user8@lab0.xgu.ru ${CALLERID(num)} is calling) 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(SIP/${ARG1},8,tTkK) |
#;kK - for call parking
;{ARG1}-- outgoing channel ;EPOCH = second since 1.01.1970 :%M:%S")})oname(......)} exten=>s,n,Monitor(wav,${CALLFILENAME},m)%d-%H:%M:%S")} exten=>s,n,Dial(${ARG1}) exten=>s,1,Answer [macro-localcall] exten=>s,n,Set(CALLFILENAME=${MACRO_EXTEN}-${CALLERID(num)}- ${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%HH exten=>s,1,NoOp(Answering ${MACRO_EXTEN}) %M:%S")}) jabber notification exten=>s,n,Monitor(wav,${CALLFILENAME},m)abber-send user8@lab0.xgu.ru ${CALLERID(num)} is calling) exten=>s,n,Dial(SIP/${ARG1},8,tTkK)_EXTEN}-${CALLERID(num)}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H:: "/etc/asterisk/extensions.conf" 311L, 8259C ;tT- for call transfer |
#;kK - for call parking
;{ARG1}-- outgoing channel ;EPOCH = second since 1.01.1970 :%M:%S")})oname(......)} exten=>s,n,Monitor(wav,${CALLFILENAME},m)%d-%H:%M:%S")} exten=>s,n,Dial(${ARG1}) exten=>s,1,Answer [macro-localcall] exten=>s,n,Set(CALLFILENAME=${MACRO_EXTEN}-${CALLERID(num)}- ${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%HH exten=>s,1,NoOp(Answering ${MACRO_EXTEN}) %M:%S")}) jabber notification exten=>s,n,Monitor(wav,${CALLFILENAME},m)abber-send user8@lab0.xgu.ru ${CALLERID(num)} is calling) exten=>s,n,Dial(SIP/${ARG1},8,tTkK)_EXTEN}-${CALLERID(num)}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H:: "/etc/asterisk/extensions.conf" 311L, 8259C ;tT- for call transfer |
#[queue1]
;recordagentcalls=yes ; ; The format to be used to record the calls: wav, gsm, wav49. ; By default its "wav". ;recordformat=gsm ; ; The text to be added to the name of the recording. Allows forming a url link. ;urlprefix=http://localhost/calls/ ; ; The optional directory to save the conversations in. The default is ... ~ ~ ~ ~ ~ ~ ~ ~ ~ "/etc/asterisk/agents.conf" 106L, 2788C written |
#[queue1]
; The keywords are global to the chan_agent channel driver ; ; Enable recording calls addressed to agents. It's turned off by default. ;recordagentcalls=yes ;agent => 1002,4321,Will Meadows agent=>007,1234,James Bond ~ ~ ~ ~ ... ~ ~ ~ ~ ~ ~ ~ ~ ~ "/etc/asterisk/agents.conf" 106L, 2788C written |
#~
exten=>3299,1,Dial(SIP/3202&SIP/3202&SIP/3201) exten=>3299,n,Hangup ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "/etc/asterisk/extensions.conf.local" 12L, 217C written |
#~
exten=>3299,1,Dial(SIP/3202&SIP/3202&SIP/3201) exten=>3299,n,Hangup ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "/etc/asterisk/extensions.conf.local" 12L, 217C written |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-7112.27610.23806 2014-04-26 09:09:40.909607024 +0300 +++ /etc/asterisk/extensions.conf 2014-04-26 09:12:04.413605498 +0300 @@ -124,12 +124,12 @@ ; exten=>8200,n,Goto(menu,s,1) ; exten=>8200,n(open),Dial(SIP/3201) +exten=>_83XX,1,Answer +exten=>_83XX,n,AgentLogin(0${EXTEN:2}) - - -; 8026 => Give a # for call forwarding + 8026 => Give a # for call forwarding ; 8027 => Forwarding from # ; 8028 => will be forward to # |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-7112.22592.29021 2014-04-26 09:13:14.665604752 +0300 +++ /etc/asterisk/extensions.conf 2014-04-26 09:14:53.277603702 +0300 @@ -124,11 +124,14 @@ ; exten=>8200,n,Goto(menu,s,1) ; exten=>8200,n(open),Dial(SIP/3201) + + exten=>_83XX,1,Answer +exten=>8307,n,AgentLogin(007) +exten=>8309,n,AgentLogin(008) exten=>_83XX,n,AgentLogin(0${EXTEN:2}) - 8026 => Give a # for call forwarding ; 8027 => Forwarding from # ; 8028 => will be forward to # |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#vim /etc/asterisk/queues.conf
--- /tmp/l3-saved-7112.15956.21964 2014-04-26 09:21:45.533599319 +0300 +++ /etc/asterisk/queues.conf 2014-04-26 09:22:02.709599136 +0300 @@ -536,8 +536,8 @@ ; available, but consider with penalty [queue1] strategy=linear -member=>SIP/3201 -member=>SIP/3202 -member=>SIP/3203 +;member=>SIP/3201 +;member=>SIP/3202 +;member=>SIP/3203 member=>Agent/007 |
#~
Channel: SIP 3201 Exten: 8200 Context: internal ^Z [3]+ Stopped cat > /tmp/1.call |
#~
Channel: SIP 3201 Exten: 8200 Context: internal ^Z [3]+ Stopped cat > /tmp/1.call |
#vim /tmp/1.call
--- /tmp/l3-saved-7112.374.3704 2014-04-26 09:33:09.385592045 +0300 +++ /tmp/1.call 2014-04-26 09:33:18.369591950 +0300 @@ -1,3 +1,3 @@ Channel: SIP 3201 -Exten: 8200 +Exten: 8107 Context: internal |
#vim /tmp/1.call
--- /tmp/l3-saved-7112.3783.28344 2014-04-26 09:34:02.973591476 +0300 +++ /tmp/1.call 2014-04-26 09:34:21.881591275 +0300 @@ -1,3 +1,3 @@ -Channel: SIP 3201 -Exten: 8107 +Channel: SIP/3201 +Extenion 8107 Context: internal |
#crontab -e
# and day of week (dow) or use '*' in these fields (for 'any').# # Notice that tasks will be started based on the cron's system # daemon's notion of time and timezones. # # Output of the crontab jobs (including errors) is sent through # email to the user the crontab file belongs to (unless redirected). # # For example, you can run a backup of all your user accounts # at 5 a.m every week with: # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ # # For more information see the manual pages of crontab(5) and cron(8) # # m h dom mon dow command 8 8 8 8 8 /usr/local/bin/call-all [ Wrote 23 lines ] crontab: installing new crontab "/tmp/crontab.LQAT8b/crontab":22: bad day-of-week errors in crontab file, can't install. Do you want to retry the same edit? (y/n) n crontab: edits left in /tmp/crontab.LQAT8b/crontab |
#crontab -e
# and day of week (dow) or use '*' in these fields (for 'any').# # Notice that tasks will be started based on the cron's system # daemon's notion of time and timezones. # # Output of the crontab jobs (including errors) is sent through # email to the user the crontab file belongs to (unless redirected). # # For example, you can run a backup of all your user accounts # at 5 a.m every week with: # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ # # For more information see the manual pages of crontab(5) and cron(8) # # m h dom mon dow command 8 8 8 8 8 /usr/local/bin/call-all [ Wrote 23 lines ] crontab: installing new crontab "/tmp/crontab.LQAT8b/crontab":22: bad day-of-week errors in crontab file, can't install. Do you want to retry the same edit? (y/n) n crontab: edits left in /tmp/crontab.LQAT8b/crontab |
#crontab -e
# Edit this file to introduce tasks to be run by cron. # # Each task to run has to be defined through a single line # indicating with different fields when the task will be run # and what command to run for the task # # To define the time you can provide concrete values for # minute (m), hour (h), day of month (dom), month (mon), # and day of week (dow) or use '*' in these fields (for 'any').# # Notice that tasks will be started based on the cron's system ... # # For example, you can run a backup of all your user accounts # at 5 a.m every week with: # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ # # For more information see the manual pages of crontab(5) and cron(8) # # m h dom mon dow command Save modified buffer (ANSWERING "No" WILL DESTROY CHANGES) ? No modification made |
#crontab -e
# Edit this file to introduce tasks to be run by cron. # # Each task to run has to be defined through a single line # indicating with different fields when the task will be run # and what command to run for the task # # To define the time you can provide concrete values for # minute (m), hour (h), day of month (dom), month (mon), # and day of week (dow) or use '*' in these fields (for 'any').# # Notice that tasks will be started based on the cron's system ... # # For example, you can run a backup of all your user accounts # at 5 a.m every week with: # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ # # For more information see the manual pages of crontab(5) and cron(8) # # m h dom mon dow command Save modified buffer (ANSWERING "No" WILL DESTROY CHANGES) ? No modification made |
#crontab -e
# Output of the crontab jobs (including errors) is sent through # email to the user the crontab file belongs to (unless redirected). # # For example, you can run a backup of all your user accounts # at 5 a.m every week with: # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ # # For more information see the manual pages of crontab(5) and cron(8) # # m h dom mon dow command * * * * * /usr/local/bin/call-all 0 11 8 3 * /usrlocal/bin/call-all-girls [ Wrote 25 lines ] crontab: installing new crontab |
#crontab -e
# Output of the crontab jobs (including errors) is sent through # email to the user the crontab file belongs to (unless redirected). # # For example, you can run a backup of all your user accounts # at 5 a.m every week with: # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ # # For more information see the manual pages of crontab(5) and cron(8) # # m h dom mon dow command * * * * * /usr/local/bin/call-all 0 11 8 3 * /usrlocal/bin/call-all-girls [ Wrote 25 lines ] crontab: installing new crontab |
#crontab -l
# Edit this file to introduce tasks to be run by cron. # # Each task to run has to be defined through a single line # indicating with different fields when the task will be run # and what command to run for the task # # To define the time you can provide concrete values for # minute (m), hour (h), day of month (dom), month (mon), # and day of week (dow) or use '*' in these fields (for 'any').# # Notice that tasks will be started based on the cron's system ... # # For example, you can run a backup of all your user accounts # at 5 a.m every week with: # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ # # For more information see the manual pages of crontab(5) and cron(8) # # m h dom mon dow command * * * * * /usr/local/bin/call-all 0 11 8 3 * /usrlocal/bin/call-all-girls |
#crontab -l
# Edit this file to introduce tasks to be run by cron. # # Each task to run has to be defined through a single line # indicating with different fields when the task will be run # and what command to run for the task # # To define the time you can provide concrete values for # minute (m), hour (h), day of month (dom), month (mon), # and day of week (dow) or use '*' in these fields (for 'any').# # Notice that tasks will be started based on the cron's system ... # # For example, you can run a backup of all your user accounts # at 5 a.m every week with: # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ # # For more information see the manual pages of crontab(5) and cron(8) # # m h dom mon dow command * * * * * /usr/local/bin/call-all 0 11 8 3 * /usrlocal/bin/call-all-girls |
#ls -la /usr/local/bin/call-all
-rw-r--r-- 1 root staff 267 Apr 26 09:56 /usr/local/bin/call-all |
#ls -la /usr/local/bin/call-all
-rw-r--r-- 1 root staff 267 Apr 26 09:56 /usr/local/bin/call-all |
#asterisk -rvvvvvv
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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian8 (pid = 24779) ... -- Executing [s@macro-localcall:3] Monitor("SIP/havana-00000022", "wav,3202-asterisk-"2014-04-26-10:00:58",m") in new stack -- Executing [s@macro-localcall:4] Dial("SIP/havana-00000022", "SIP/3202,8,tTkK") in new stack == Using SIP RTP CoS mark 5 -- Called SIP/3202 -- SIP/3201-00000021 is ringing -- SIP/3202-00000023 is ringing debian8*CLI> q No such command 'q' (type 'core show help q' for other possible commands) debian8*CLI> quit Executing last minute cleanups |
#asterisk -rvvvvvv
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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian8 (pid = 24779) ... -- Executing [s@macro-localcall:3] Monitor("SIP/havana-00000022", "wav,3202-asterisk-"2014-04-26-10:00:58",m") in new stack -- Executing [s@macro-localcall:4] Dial("SIP/havana-00000022", "SIP/3202,8,tTkK") in new stack == Using SIP RTP CoS mark 5 -- Called SIP/3202 -- SIP/3201-00000021 is ringing -- SIP/3202-00000023 is ringing debian8*CLI> q No such command 'q' (type 'core show help q' for other possible commands) debian8*CLI> quit Executing last minute cleanups |
#~
FILENAME=/tmp/$RANDOM$RANDOM.call @havana/11@11@` cat <<EOF > $FILENAME Channel: SIP/$N Extension: 8107 Context: internal EOF chown asterisk:asterisk $FILENAME ~ ~ ~ ~ ~ ~ ~ ~ ~ "/usr/local/bin/call-all" 18L, 281C written |
#~
FILENAME=/tmp/$RANDOM$RANDOM.call @havana/11@11@` cat <<EOF > $FILENAME Channel: SIP/$N Extension: 8107 Context: internal EOF chown asterisk:asterisk $FILENAME ~ ~ ~ ~ ~ ~ ~ ~ ~ "/usr/local/bin/call-all" 18L, 281C written |
#crontab -e
# Edit this file to introduce tasks to be run by cron. # # Each task to run has to be defined through a single line # indicating with different fields when the task will be run # and what command to run for the task # # To define the time you can provide concrete values for # minute (m), hour (h), day of month (dom), month (mon), # and day of week (dow) or use '*' in these fields (for 'any').# # Notice that tasks will be started based on the cron's system ... # at 5 a.m every week with: # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ # # For more information see the manual pages of crontab(5) and cron(8) # # m h dom mon dow command * * * * * /usr/local/bin/call-all 0 11 8 3 * /usrlocal/bin/call-all-girls [ Wrote 25 lines ] crontab: installing new crontab |
#crontab -e
# Edit this file to introduce tasks to be run by cron. # # Each task to run has to be defined through a single line # indicating with different fields when the task will be run # and what command to run for the task # # To define the time you can provide concrete values for # minute (m), hour (h), day of month (dom), month (mon), # and day of week (dow) or use '*' in these fields (for 'any').# # Notice that tasks will be started based on the cron's system ... # at 5 a.m every week with: # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ # # For more information see the manual pages of crontab(5) and cron(8) # # m h dom mon dow command * * * * * /usr/local/bin/call-all 0 11 8 3 * /usrlocal/bin/call-all-girls [ Wrote 25 lines ] crontab: installing new crontab |
#asterisk -rvvvvvv
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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian8 (pid = 24779) ... [Apr 26 10:03:01] NOTICE[25838]: pbx_spool.c:356 attempt_thread: Queued call to SIP/kiev/3301 expired without completion after 0 attempts -- Attempting call on SIP/kiev/3302 for 8107@internal:1 (Retry 1) == Using SIP RTP CoS mark 5 [Apr 26 10:03:01] ERROR[25845]: netsock2.c:263 ast_sockaddr_resolve: getaddrinfo("kiev", "(null)", ...): No address associated with hostname [Apr 26 10:03:01] WARNING[25845]: chan_sip.c:5498 create_addr: No such host: kiev [Apr 26 10:03:01] NOTICE[25845]: channel.c:5347 __ast_request_and_dial: Unable to request channel SIP/kiev/3302 [Apr 26 10:03:01] NOTICE[25845]: pbx_spool.c:353 attempt_thread: Call failed to go through, reason (0) Call Failure (not BUSY, and not NO_ANSWER, maybe Circuit busy or down?) [Apr 26 10:03:01] NOTICE[25845]: pbx_spool.c:356 attempt_thread: Queued call to SIP/kiev/3302 expired without completion after 0 attempts debian8*CLI> quit Executing last minute cleanups |
#asterisk -rvvvvvv
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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian8 (pid = 24779) ... [Apr 26 10:03:01] NOTICE[25838]: pbx_spool.c:356 attempt_thread: Queued call to SIP/kiev/3301 expired without completion after 0 attempts -- Attempting call on SIP/kiev/3302 for 8107@internal:1 (Retry 1) == Using SIP RTP CoS mark 5 [Apr 26 10:03:01] ERROR[25845]: netsock2.c:263 ast_sockaddr_resolve: getaddrinfo("kiev", "(null)", ...): No address associated with hostname [Apr 26 10:03:01] WARNING[25845]: chan_sip.c:5498 create_addr: No such host: kiev [Apr 26 10:03:01] NOTICE[25845]: channel.c:5347 __ast_request_and_dial: Unable to request channel SIP/kiev/3302 [Apr 26 10:03:01] NOTICE[25845]: pbx_spool.c:353 attempt_thread: Call failed to go through, reason (0) Call Failure (not BUSY, and not NO_ANSWER, maybe Circuit busy or down?) [Apr 26 10:03:01] NOTICE[25845]: pbx_spool.c:356 attempt_thread: Queued call to SIP/kiev/3302 expired without completion after 0 attempts debian8*CLI> quit Executing last minute cleanups |
#vim /usr/local/bin/call-all
--- /tmp/l3-saved-7112.21469.2227 2014-04-26 10:03:13.233572863 +0300 +++ /usr/local/bin/call-all 2014-04-26 10:03:35.257572627 +0300 @@ -1,5 +1,5 @@ #!/bin/bash -for N in kiev/{1,2,3}{1,2,3}0{1,2} +for N in havana/{1,2,3}{1,2,3}0{1,2} do N=`echo $N | sed s@havana/11@11@` |
#crontab -e
# email to the user the crontab file belongs to (unless redirected). # # For example, you can run a backup of all your user accounts # at 5 a.m every week with: # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ # # For more information see the manual pages of crontab(5) and cron(8) # # m h dom mon dow command #* * * * * /usr/local/bin/call-all 0 11 8 3 * /usrlocal/bin/call-all-girls # at 11:00 8 March each year [ Wrote 26 lines ] crontab: installing new crontab |
#crontab -e
# email to the user the crontab file belongs to (unless redirected). # # For example, you can run a backup of all your user accounts # at 5 a.m every week with: # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ # # For more information see the manual pages of crontab(5) and cron(8) # # m h dom mon dow command #* * * * * /usr/local/bin/call-all 0 11 8 3 * /usrlocal/bin/call-all-girls # at 11:00 8 March each year [ Wrote 26 lines ] crontab: installing new crontab |
#vim /usr/local/bin/call-all
--- /tmp/l3-saved-7112.20353.20986 2014-04-26 10:10:54.785567954 +0300 +++ /usr/local/bin/call-all 2014-04-26 10:11:23.729567645 +0300 @@ -2,6 +2,12 @@ for N in havana/{1,2,3}{1,2,3}0{1,2} do +I=$[I+1] + +[ $[I%2] == 0 ] && sleep 10 + +echo $N + N=`echo $N | sed s@havana/11@11@` FILENAME=/tmp/$RANDOM$RANDOM.call |
#vim /usr/local/bin/call-all
--- /tmp/l3-saved-7112.10032.31248 2014-04-26 10:11:31.617567561 +0300 +++ /usr/local/bin/call-all 2014-04-26 10:11:53.709567326 +0300 @@ -1,7 +1,7 @@ #!/bin/bash for N in havana/{1,2,3}{1,2,3}0{1,2} do - +# it's a pause in list generation I=$[I+1] [ $[I%2] == 0 ] && sleep 10 |
#[ ]
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09) 00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) 00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04) 00:16.3 Serial controller: Intel Corporation 6 Series/C200 Series Chipset Family KT Controller (rev 04) 00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04) 00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04) 00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04) 00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4) 00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b4) 00:1c.6 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 7 (rev b4) 00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b4) 00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 04) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a4) 00:1f.0 ISA bridge: Intel Corporation Q67 Express Chipset Family LPC Controller (rev 04) 00:1f.2 RAID bus controller: Intel Corporation 82801 SATA Controller [RAID mode] (rev 04) 00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 04) |
#[ ]
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09) 00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) 00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04) 00:16.3 Serial controller: Intel Corporation 6 Series/C200 Series Chipset Family KT Controller (rev 04) 00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04) 00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04) 00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04) 00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4) 00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b4) 00:1c.6 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 7 (rev b4) 00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b4) 00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 04) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a4) 00:1f.0 ISA bridge: Intel Corporation Q67 Express Chipset Family LPC Controller (rev 04) 00:1f.2 RAID bus controller: Intel Corporation 82801 SATA Controller [RAID mode] (rev 04) 00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 04) |
Channel: SIP 3201 Exten: 8200 Context: internal
Время первой команды журнала | 15:59:43 2014- 4-25 | ||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 09:18:48 2014- 4-26 | ||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 43.56 | ||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 1.98 | ||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.55 | ||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.66 | ||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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