/l3/users/igor-gorbatko/asterisk/debian3.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 |
|
#vi /tmp/send.sh
![]() |
#ls /tmp
filePcdnNI orbit-root ssh-voKTUn2519 tmp.wXAnqvhzYg gconfd-root send.sh sylpheed-0 l3-saved-3491.16364.1728 serverauth.TKVGMGPRJD tmp.dBatliZoQl |
#ls -l /tmp
total 40 -rw------- 1 root root 0 2009-12-10 01:18 filePcdnNI drwx------ 3 root root 4096 2009-12-10 00:57 gconfd-root -rwxr-xr-x 1 root root 72 2009-12-10 03:23 l3-saved-3491.16364.1728 drwx------ 2 root root 4096 2009-12-10 01:39 orbit-root -rwxr-xr-x 1 asterisk asterisk 72 2009-12-10 03:22 send.sh -rw------- 1 root root 120 2009-12-10 00:55 serverauth.TKVGMGPRJD drwx------ 2 root root 4096 2009-12-10 00:55 ssh-voKTUn2519 srwxr-xr-x 1 root root 0 2009-12-10 01:21 sylpheed-0 -rw------- 1 root root 0 2009-12-10 01:27 tmp.dBatliZoQl -rw------- 1 root root 12963 2009-12-10 01:27 tmp.wXAnqvhzYg |
#rm tmp /tmp
![]() rm: cannot remove `tmp': No such file or directory rm: cannot remove `/tmp': Is a directory |
#rm tmp*.* /tmp
![]() rm: cannot remove `tmp*.*': No such file or directory rm: cannot remove `/tmp': Is a directory |
#cd /etc/asterisk/
|
#vi extensions.
![]() |
#~
![]() [xten => ]99,1,Answer exten => 999,n,Echo() exten => 880,1,Answer exten => 102,n,System(ech(rondo)ing | setxkbmap -option "grp:ctrl_shift_toggle,gg exten => 102,n,System(echo incoming | sendxmpp -f /var/lib/asterisk/.sendxmpprc gib@poltava.unix.nt) .sendxmpprc igor@kiev.unix.nt) exten => 880,n,Playback(/tmp/hello) exten => 881,1,Answer exten => 881,n,Wait(1) exten => 881,n,Record(/tmp/hello2:gsm|2) exten => 881,n,Playback(/tmp/hello2) -- INSERT -- 10,1 Top "extensions.conf" 67L, 1939C written |
#asterisk -rv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= Connected to Asterisk 1.4.21.2~dfsg-3 currently running on poltava (pid = 2204) Verbosity is at least 1 poltava*CLI> extensions reload Dialplan reloaded. poltava*CLI> exit Executing last minute cleanups |
#vi extensions.conf
![]() --- /tmp/l3-saved-7310.25506.16631 2009-12-10 03:28:57.000000000 -1000 +++ extensions.conf 2009-12-10 03:29:57.000000000 -1000 @@ -5,8 +5,8 @@ exten => s,n,Background(rondo) exten => 102,1,Answer ;exten => 102,n,Wait(1) -exten => 102,n,Background(rondo) exten => 102,n,System(echo incoming | sendxmpp -f /var/lib/asterisk/.sendxmpprc gib@poltava.unix.nt) +exten => 102,n,Background(rondo) exten => 102,n,Hangup exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)}) exten => _1XX,n,Dial(SIP/${EXTEN}) |
#asterisk -rv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= Connected to Asterisk 1.4.21.2~dfsg-3 currently running on poltava (pid = 2204) Verbosity is at least 1 poltava*CLI> extensions reload Dialplan reloaded. [Dec 10 03:30:35] NOTICE[2250]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103 poltava*CLI> |
#vi extensions.conf
![]() --- /tmp/l3-saved-7310.10690.6119 2009-12-10 03:30:51.000000000 -1000 +++ extensions.conf 2009-12-10 03:31:56.000000000 -1000 @@ -5,7 +5,7 @@ exten => s,n,Background(rondo) exten => 102,1,Answer ;exten => 102,n,Wait(1) -exten => 102,n,System(echo incoming | sendxmpp -f /var/lib/asterisk/.sendxmpprc gib@poltava.unix.nt) +exten => 102,n,System(echo incoming: " ${STRFTIME(${EPOCH},,%d%m%Y-%H:%M:%S)} - ${CALLERID(all)} - ${CHANNEL} " | sendxmpp -f /var/lib/asterisk/.sendxmpprc gib@poltava.unix.nt) exten => 102,n,Background(rondo) exten => 102,n,Hangup exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)}) |
#asterisk -rv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= Connected to Asterisk 1.4.21.2~dfsg-3 currently running on poltava (pid = 2204) Verbosity is at least 1 poltava*CLI> extensions reload Dialplan reloaded. poltava*CLI> |
#vi extensions.conf
![]() --- /tmp/l3-saved-7310.25672.31822 2009-12-10 03:32:31.000000000 -1000 +++ extensions.conf 2009-12-10 03:32:58.000000000 -1000 @@ -5,7 +5,7 @@ exten => s,n,Background(rondo) exten => 102,1,Answer ;exten => 102,n,Wait(1) -exten => 102,n,System(echo incoming: " ${STRFTIME(${EPOCH},,%d%m%Y-%H:%M:%S)} - ${CALLERID(all)} - ${CHANNEL} " | sendxmpp -f /var/lib/asterisk/.sendxmpprc gib@poltava.unix.nt) +exten => 102,n,System(echo incoming: " ${STRFTIME(${EPOCH},,%d/\%m/\%Y-%H:%M:%S)} - ${CALLERID(all)} - ${CHANNEL} " | sendxmpp -f /var/lib/asterisk/.sendxmpprc gib@poltava.unix.nt) exten => 102,n,Background(rondo) exten => 102,n,Hangup exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)}) |
#asterisk -rv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= Connected to Asterisk 1.4.21.2~dfsg-3 currently running on poltava (pid = 2204) Verbosity is at least 1 poltava*CLI> extensions reload Dialplan reloaded. poltava*CLI> |
#vi extensions.conf
![]() --- /tmp/l3-saved-7310.26556.30510 2009-12-10 03:33:23.000000000 -1000 +++ extensions.conf 2009-12-10 04:07:22.000000000 -1000 @@ -1,5 +1,7 @@ [default] + + [internal] exten => s,1,Answer exten => s,n,Background(rondo) @@ -8,8 +10,11 @@ exten => 102,n,System(echo incoming: " ${STRFTIME(${EPOCH},,%d/\%m/\%Y-%H:%M:%S)} - ${CALLERID(all)} - ${CHANNEL} " | sendxmpp -f /var/lib/asterisk/.sendxmpprc gib@poltava.unix.nt) exten => 102,n,Background(rondo) exten => 102,n,Hangup + exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)}) exten => _1XX,n,Dial(SIP/${EXTEN}) + + exten => 999,1,Answer exten => 999,n,Echo() exten => 880,1,Answer |
#apt-get install sendxicq
![]() Reading package lists... Done Building dependency tree Reading state information... Done E: Couldn't find package sendxicq |
#apt-get install centericq
![]() Reading package lists... Done Building dependency tree Reading state information... Done Package centericq is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: centerim-common E: Package centericq has no installation candidate |
#apt-get install centerim
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: centerim-common The following NEW packages will be installed: centerim centerim-common 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 1662kB of archives. After this operation, 3977kB of additional disk space will be used. ... Get:2 http://10.0.35.1 lenny/main centerim 4.22.5-1+b1 [1206kB] Fetched 1662kB in 2s (629kB/s) Selecting previously deselected package centerim-common. (Reading database ... 58154 files and directories currently installed.) Unpacking centerim-common (from .../centerim-common_4.22.5-1_all.deb) ... Selecting previously deselected package centerim. Unpacking centerim (from .../centerim_4.22.5-1+b1_i386.deb) ... Processing triggers for man-db ... Setting up centerim-common (4.22.5-1) ... Setting up centerim (4.22.5-1+b1) ... |
#vi extensions.conf
![]() |
#[xten =>]880,n,Record(/tmp/hello:gsm|2)
|
#man centerim
|
#chown asterisk:asterisk /var/lib/asterisk/.centerim/
|
#echo bui | centerim 21089105
centerim 4.22.5 Usage: centerim [OPTION]... General options: --ascii, -a use ASCII characters for windows and UI controls --basedir, -b <path> set a custom base directory --bind, -B <host/ip> bind a custom local IP --no-xtitles, -T disable xterm titles --offline, -o set all protocols status to offline upon start --debug, -d enables debug info logging --help display this stuff --version, -v show the program version info Events sending options: -s, --send <event type> event type; can be msg, sms or url -S, --status <status> change the current IM status. Status; o, _, a, d, n, c, f, i -p, --proto <protocol> protocol type; can be icq, yahoo, msn, aim, irc, jab, rss, lj, gg or infocard -t, --to <destination> destination UIN or nick (depends on protocol) -n, --number <phone#> mobile number to send an event to (sms only) Report bugs to http://bugzilla.centerim.org/. |
#echo bui | centerim -s msg -t 21089105
![]() event sending error: not enough parameters |
#echo bui | centerim -s msg -p icq -t 21089105
message to [icq] 21089105 has been put to the queue |
#echo bui | centerim -s msg -p icq -t 381378360
message to [icq] 381378360 has been put to the queue |
#echo bui | centerim -p icq -t 381378360
![]() event sending error: not enough parameters |
#echo bui | centerim -s msg -p icq -t 381378360
message to [icq] 381378360 has been put to the queue |
#centerim
|
#man centerim
|
#vi /usr/local/bin/maillog
![]() --- /dev/null 2009-12-09 14:54:00.511420164 -1000 +++ /usr/local/bin/maillog 2009-12-10 04:27:39.000000000 -1000 @@ -0,0 +1,5 @@ +#!/bin/sh +MAILTABLE=/etc/asterisk/mailtable + +jid="`grep "$1" $MAILTABLE | awk '{print $2}'`" +[ -z "$jid" ] || sendxmpp -f /var/lib/asterisk/.sendxmpprc "$jid" |
#vi extensions.conf
![]() --- /tmp/l3-saved-7310.18142.5429 2009-12-10 04:28:17.000000000 -1000 +++ extensions.conf 2009-12-10 04:31:19.000000000 -1000 @@ -1,5 +1,8 @@ [default] +[macro-maillogi] +exten => s,1,System(echo Smini tpubku "${CALLERID(all)}" | /usr/local/bin/maillog ${ARG1}) +exten => s,n,Dial(SIP/${ARG1}) [internal] @@ -13,7 +16,7 @@ exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)}) exten => _1XX,n,Dial(SIP/${EXTEN}) - +exten => _1XX,1,Macro(maillog,${EXTEN}) exten => 999,1,Answer exten => 999,n,Echo() |
#chmod +x /usr/local/bin/maillog
|
#asterisk -rv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= Connected to Asterisk 1.4.21.2~dfsg-3 currently running on poltava (pid = 2204) Verbosity is at least 1 poltava*CLI> extensions reload Dialplan reloaded. [Dec 10 04:32:57] WARNING[8174]: pbx.c:4702 add_pri: Unable to register extension '_1XX', priority 1 in 'internal', already in use poltava*CLI> exit Executing last minute cleanups |
#asterisk -rv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= Connected to Asterisk 1.4.21.2~dfsg-3 currently running on poltava (pid = 2204) Verbosity is at least 1 poltava*CLI> extensions reload Dialplan reloaded. poltava*CLI> exit Executing last minute cleanups |
#ls -l
total 448 -rw-r----- 1 asterisk asterisk 140 2009-01-04 09:26 adsi.conf -rw-r----- 1 asterisk asterisk 840 2009-01-04 09:26 adtranvofr.conf -rw-r----- 1 asterisk asterisk 2724 2009-01-04 09:26 agents.conf -rw-r----- 1 asterisk asterisk 2227 2009-01-04 09:26 alarmreceiver.conf -rw-r----- 1 asterisk asterisk 2675 2009-01-04 09:26 alsa.conf -rw-r----- 1 asterisk asterisk 767 2009-01-04 09:26 amd.conf -rw-r----- 1 asterisk asterisk 3260 2009-01-04 09:26 asterisk.adsi -rw-r----- 1 asterisk asterisk 247 2009-01-04 09:17 asterisk.conf -rw-r----- 1 asterisk asterisk 7324 2009-01-04 09:26 cdr.conf ... -rw-r----- 1 asterisk asterisk 4044 2009-01-04 09:26 skinny.conf -rw-r----- 1 asterisk asterisk 6691 2009-01-04 09:26 sla.conf -rw-r----- 1 asterisk asterisk 2665 2009-01-04 09:26 smdi.conf -rw-r----- 1 asterisk asterisk 1384 2009-01-04 09:26 telcordia-1.adsi -rw-r----- 1 asterisk asterisk 598 2009-01-04 09:26 udptl.conf -rw-r----- 1 asterisk asterisk 1804 2009-01-04 09:26 users.conf -rw-r----- 1 asterisk asterisk 11723 2009-01-04 09:26 voicemail.conf -rw-r----- 1 asterisk asterisk 2772 2009-01-04 09:26 vpb.conf -rw-r----- 1 asterisk asterisk 393 2009-01-04 09:26 watchdog.conf -rw-r----- 1 asterisk asterisk 24201 2009-12-09 03:28 zapata.conf |
#ls -l | grep mail
-rw-r--r-- 1 root root 74 2009-12-10 04:26 mailtable -rw-r----- 1 asterisk asterisk 11723 2009-01-04 09:26 voicemail.conf |
#cat mailtable
101 gib@poltava.unix.nt 102 igor@kiev.unix.nt 103 romchik@obukhov.unix.nt |
#vi mailtable
![]() --- /tmp/l3-saved-7310.20670.3476 2009-12-10 04:34:54.000000000 -1000 +++ mailtable 2009-12-10 04:35:02.000000000 -1000 @@ -1,3 +1,3 @@ 101 gib@poltava.unix.nt 102 igor@kiev.unix.nt -103 romchik@obukhov.unix.nt +103 romchiko@obukhov.unix.nt |
#mail
![]() No mail for root |
#vi extensions.conf
![]() --- /tmp/l3-saved-7310.11001.11979 2009-12-10 04:35:39.000000000 -1000 +++ extensions.conf 2009-12-10 04:36:10.000000000 -1000 @@ -1,7 +1,7 @@ [default] [macro-maillogi] -exten => s,1,System(echo Smini tpubku "${CALLERID(all)}" | /usr/local/bin/maillog ${ARG1}) +exten => s,1,System(echo Snimi tpubku "${CALLERID(all)}" | /usr/local/bin/maillog ${ARG1}) exten => s,n,Dial(SIP/${ARG1}) |
#vi /usr/local/bin/maillog
![]() --- /tmp/l3-saved-7310.30734.128 2009-12-10 04:36:18.000000000 -1000 +++ /usr/local/bin/maillog 2009-12-10 04:37:09.000000000 -1000 @@ -1,5 +1,5 @@ #!/bin/sh MAILTABLE=/etc/asterisk/mailtable -jid="`grep "$1" $MAILTABLE | awk '{print $2}'`" -[ -z "$jid" ] || sendxmpp -f /var/lib/asterisk/.sendxmpprc "$jid" +mail="`grep "$1" $MAILTABLE | awk '{print $2}'`" +[ -z "$mail" ] || sendxmpp -f /var/lib/asterisk/.sendxmpprc "$mail" |
#mailq
MSP Queue status... /var/spool/mqueue-client is empty Total requests: 0 MTA Queue status... /var/spool/mqueue is empty Total requests: 0 |
#tail -f /var/log/mail.log
![]() Dec 10 01:16:08 poltava sm-mta[4139]: nBABG7m7004130: to=gib, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30681, dsn=2.0.0, stat=Sent Dec 10 01:17:12 poltava sm-mta[4176]: nBABHBYQ004176: from=<root@obukhov.unix.nt>, size=504, class=0, nrcpts=1, msgid=<200912101117.nBABHS7g016405@obukhov.unix.nt>, proto=ESMTP, daemon=MTA-v4, relay=[192.168.102.2] Dec 10 01:17:12 poltava sm-mta[4177]: nBABHBYQ004176: to=gib, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30698, dsn=2.0.0, stat=Sent Dec 10 01:23:47 poltava sm-mta[4774]: nBABNkKj004774: from=<gib@poltava.unix.nt>, size=395, class=0, nrcpts=2, msgid=<20091210012346.32ad2fa1.gib@poltava.unix.nt>, proto=SMTP, daemon=MTA-v4, relay=localhost [127.0.0.1] Dec 10 01:23:48 poltava sm-mta[4776]: nBABNkKj004774: to=<user@kiev.unix.nt>, ctladdr=<gib@poltava.unix.nt> (1000/1000), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=150395, relay=kiev.unix.nt. [192.168.102.1], dsn=2.0.0, stat=Sent (nBABO376013023 Message accepted for delivery) Dec 10 01:23:49 poltava sm-mta[4776]: nBABNkKj004774: to=<user@obukhov.unix.nt>, ctladdr=<gib@poltava.unix.nt> (1000/1000), delay=00:00:02, xdelay=00:00:01, mailer=esmtp, pri=150395, relay=mail.obukhov.unix.nt. [192.168.102.2], dsn=2.0.0, stat=Sent (nBABO54M016952 Message accepted for delivery) Dec 10 01:24:11 poltava sm-mta[4777]: nBABOAew004777: from=<root@obukhov.unix.nt>, size=801, class=0, nrcpts=1, msgid=<20091210132426.3c92c8ee.root@obukhov.unix.nt>, proto=ESMTP, daemon=MTA-v4, relay=[192.168.102.2] Dec 10 01:24:11 poltava sm-mta[4778]: nBABOAew004777: to=<gib@poltava.unix.nt>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30988, dsn=2.0.0, stat=Sent Dec 10 01:24:55 poltava sm-mta[4781]: nBABOtAX004781: from=<gib@poltava.unix.nt>, size=373, class=0, nrcpts=1, msgid=<20091210012455.498557a8.gib@poltava.unix.nt>, proto=SMTP, daemon=MTA-v4, relay=localhost [127.0.0.1] Dec 10 01:24:56 poltava sm-mta[4783]: nBABOtAX004781: to=<root@obukhov.unix.nt>, ctladdr=<gib@poltava.unix.nt> (1000/1000), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=120373, relay=mail.obukhov.unix.nt. [192.168.102.2], dsn=2.0.0, stat=Sent (nBABPC98016965 Message accepted for delivery) ^C |
#vi extensions.conf
![]() --- /tmp/l3-saved-7310.21916.9698 2009-12-10 04:38:25.000000000 -1000 +++ extensions.conf 2009-12-10 04:38:58.000000000 -1000 @@ -1,6 +1,6 @@ [default] -[macro-maillogi] +[macro-maillog] exten => s,1,System(echo Snimi tpubku "${CALLERID(all)}" | /usr/local/bin/maillog ${ARG1}) exten => s,n,Dial(SIP/${ARG1}) |
#/usr/local/bin/maillog 103
![]() you must own /var/lib/asterisk/.sendxmpprc |
#y
![]() bash: y: command not found |
#cat /usr/local/bin/maillog
#!/bin/sh MAILTABLE=/etc/asterisk/mailtable mail="`grep "$1" $MAILTABLE | awk '{print $2}'`" [ -z "$mail" ] || sendxmpp -f /var/lib/asterisk/.sendxmpprc "$mail" |
#vi /usr/local/bin/maillog
--- /tmp/l3-saved-8425.7573.24791 2009-12-10 04:39:57.000000000 -1000 +++ /usr/local/bin/maillog 2009-12-10 04:40:07.000000000 -1000 @@ -2,4 +2,4 @@ MAILTABLE=/etc/asterisk/mailtable mail="`grep "$1" $MAILTABLE | awk '{print $2}'`" -[ -z "$mail" ] || sendxmpp -f /var/lib/asterisk/.sendxmpprc "$mail" +[ -z "$mail" ] || mail "$mail" |
#/usr/local/bin/maillog 123
|
#~
101 gib@poltava.unix.nt 102 igor@kiev.unix.nt 103 romchiko@obukhov.unix.nt |
#asterisk -rv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= Connected to Asterisk 1.4.21.2~dfsg-3 currently running on poltava (pid = 2204) Verbosity is at least 1 poltava*CLI> extensions reload Dialplan reloaded. poltava*CLI> exit Executing last minute cleanups |
#/usr/local/bin/maillog 102
ashdfbgasldjif . gbhsd . |
#/usr/local/bin/maillog 101
asg;km asfg;, dfgm, |
#cd /etc/asterisk/
|
#vi mailtable
--- /tmp/l3-saved-8425.2875.26278 2009-12-10 04:43:20.000000000 -1000 +++ mailtable 2009-12-10 04:43:26.000000000 -1000 @@ -1,3 +1,3 @@ 101 gib@poltava.unix.nt -102 igor@kiev.unix.nt +102 root@kiev.unix.nt 103 romchiko@obukhov.unix.nt |
#vi mailtable
--- /tmp/l3-saved-8425.10541.14210 2009-12-10 04:44:06.000000000 -1000 +++ mailtable 2009-12-10 04:44:13.000000000 -1000 @@ -1,3 +1,3 @@ 101 gib@poltava.unix.nt 102 root@kiev.unix.nt -103 romchiko@obukhov.unix.nt +103 root@obukhov.unix.nt |
#asterisk -rv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= Connected to Asterisk 1.4.21.2~dfsg-3 currently running on poltava (pid = 2204) Verbosity is at least 1 poltava*CLI> extensions reload Dialplan reloaded. poltava*CLI> |
#asterisk -rvvv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': Found == Parsing '/etc/asterisk/extconfig.conf': Found Connected to Asterisk 1.4.21.2~dfsg-3 currently running on poltava (pid = 2204) Verbosity was 1 and is now 3 == Spawn extension (white, 103, 2) exited non-zero on 'SIP/101-08976528' -- Executing [103@white:1] Set("SIP/101-08976528", "CALLERID(number)=4101") in new stack -- Executing [103@white:2] Dial("SIP/101-08976528", "SIP/103") in new stack -- Called 103 -- SIP/103-0897be48 is ringing == Spawn extension (white, 103, 2) exited non-zero on 'SIP/101-08976528' poltava*CLI> |
#vi mailtable
|
#~
Subject: test test . Cc: |
#vi mailtable
|
#~
test etstst |
#/usr/local/bin/maillog 101
asfkl;g asdfgsdlkgsd fgsd;klgfmsd fgsdmklfgsdfgsdfg |
#/usr/local/bin/maillog 102
No message, no subject; hope that's ok |
#vi mailtable
|
#~
#!/bin/sh ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ E433: No tags file E426: tag not found: bin |
#MAILTABLE=/etc/asterisk/mailtable
( ) [internal] [ ] } - ${CALLERID(all)} - (rondo)EL} " | sendxmpp -f /var/lib/asterisk/.sendxmpprc gib@poltava.unix.nt) exten => s,n,Backgro(1)(rondo) exten => 102,n,Background(rondo) exten => 102,1,Answer gxten => 102,n,Hangup ;exten => 102,n,Wait(1) (rondo) exten => 102,n,System(echo incoming: " ${STRFTIME(${EPOCH},,%d/\%m/\%Y-%H:%M:%S)) exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)}) (SIP/${EXTEN}) exten => _1XX,n,Dial((IP/${EXTEN}) ) ;exten => _1XX,n,Dial(SIP/${EXTEN})EN}) 18,1 Top "extensions.conf" 75L, 2202C written |
#asterisk -rvvv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... [Dec 10 04:57:39] NOTICE[2250]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103 [Dec 10 05:00:39] NOTICE[2250]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103 [Dec 10 05:03:39] NOTICE[2250]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103 [Dec 10 05:06:39] NOTICE[2250]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103 [Dec 10 05:09:40] NOTICE[2250]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103 [Dec 10 05:12:40] NOTICE[2250]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103 [Dec 10 05:15:40] NOTICE[2250]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103 [Dec 10 05:18:40] NOTICE[2250]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103 [Dec 10 05:21:40] NOTICE[2250]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103 poltava*CLI> |
#vim extensions.conf
--- /tmp/l3-saved-8425.7426.30316 2009-12-10 05:24:22.000000000 -1000 +++ extensions.conf 2009-12-10 05:24:56.000000000 -1000 @@ -14,6 +14,8 @@ exten => 102,n,Background(rondo) exten => 102,n,Hangup +exten => 300,1,MeetMe() + exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)}) ;exten => _1XX,n,Dial(SIP/${EXTEN}) exten => _1XX,n,Macro(maillog,${EXTEN}) |
#asterisk -rvvv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... -- Including context 'internal' in context 'black' -- Registered extension context 'inbound' -- Including context 'internal' in context 'inbound' == Parsing '/etc/asterisk/users.conf': Found -- Executing [300@white:1] MeetMe("SIP/101-08976df8", "") in new stack -- <SIP/101-08976df8> Playing 'conf-getconfno' (language 'en') -- <SIP/101-08976df8> Playing 'conf-getconfno' (language 'en') -- <SIP/101-08976df8> Playing 'conf-getconfno' (language 'en') == Spawn extension (white, 300, 1) exited non-zero on 'SIP/101-08976df8' poltava*CLI> |
#vim extensions.conf
--- /tmp/l3-saved-8425.12511.26398 2009-12-10 05:25:53.000000000 -1000 +++ extensions.conf 2009-12-10 05:26:07.000000000 -1000 @@ -14,7 +14,7 @@ exten => 102,n,Background(rondo) exten => 102,n,Hangup -exten => 300,1,MeetMe() +exten => 300,1,MeetMe(1) exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)}) ;exten => _1XX,n,Dial(SIP/${EXTEN}) |
#asterisk -rvvv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... -- Registered extension context 'black' -- Including context 'internal' in context 'black' -- Registered extension context 'inbound' -- Including context 'internal' in context 'inbound' == Parsing '/etc/asterisk/users.conf': Found -- Executing [300@white:1] MeetMe("SIP/101-08979460", "1") in new stack == Parsing '/etc/asterisk/meetme.conf': Found -- <SIP/101-08979460> Playing 'conf-invalid' (language 'en') == Spawn extension (white, 300, 1) exited non-zero on 'SIP/101-08979460' poltava*CLI> |
#vim extensions.conf
--- /tmp/l3-saved-8425.5679.4395 2009-12-10 05:26:23.000000000 -1000 +++ extensions.conf 2009-12-10 05:28:02.000000000 -1000 @@ -14,7 +14,7 @@ exten => 102,n,Background(rondo) exten => 102,n,Hangup -exten => 300,1,MeetMe(1) +exten => 300,1,MeetMe(1,d) exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)}) ;exten => _1XX,n,Dial(SIP/${EXTEN}) |
#asterisk -rvvv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... == Spawn extension (white, 300, 1) exited non-zero on 'SIP/101-08976920' -- Executing [300@white:1] MeetMe("SIP/101-08976920", "1|d") in new stack -- Created MeetMe conference 1023 for conference '1' -- <SIP/101-08976920> Playing 'conf-onlyperson' (language 'en') -- Executing [300@black:1] MeetMe("SIP/103-0898ff68", "1|d") in new stack == Spawn extension (white, 300, 1) exited non-zero on 'SIP/101-08976920' -- Hungup 'Zap/pseudo-1553460237' == Spawn extension (black, 300, 1) exited non-zero on 'SIP/103-0898ff68' [Dec 10 05:30:41] NOTICE[2250]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103 poltava*CLI> |
#vim extensions.conf
--- /tmp/l3-saved-8425.31003.14665 2009-12-10 05:32:03.000000000 -1000 +++ extensions.conf 2009-12-10 05:32:15.000000000 -1000 @@ -14,7 +14,7 @@ exten => 102,n,Background(rondo) exten => 102,n,Hangup -exten => 300,1,MeetMe(1,d) +exten => 300,1,MeetMe(1,d,1234) exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)}) ;exten => _1XX,n,Dial(SIP/${EXTEN}) |
#asterisk -rvvv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... -- <SIP/101-08977468> Playing 'conf-onlyperson' (language 'en') -- Hungup 'Zap/pseudo-136298848' == Spawn extension (white, 300, 1) exited non-zero on 'SIP/101-08977468' -- Executing [300@white:1] MeetMe("SIP/101-0898da10", "1|d|1234") in new stack -- Created MeetMe conference 1023 for conference '1' -- <SIP/101-0898da10> Playing 'conf-onlyperson' (language 'en') -- Executing [300@black:1] MeetMe("SIP/103-08989b10", "1|d|1234") in new stack == Spawn extension (black, 300, 1) exited non-zero on 'SIP/103-08989b10' -- Hungup 'Zap/pseudo-203007723' == Spawn extension (white, 300, 1) exited non-zero on 'SIP/101-0898da10' |
#vim extensions.conf
--- /tmp/l3-saved-8425.11354.6579 2009-12-10 05:33:35.000000000 -1000 +++ extensions.conf 2009-12-10 05:33:47.000000000 -1000 @@ -14,7 +14,7 @@ exten => 102,n,Background(rondo) exten => 102,n,Hangup -exten => 300,1,MeetMe(1,d,1234) +exten => 300,1,MeetMe(1,dP,1234) exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)}) ;exten => _1XX,n,Dial(SIP/${EXTEN}) |
#asterisk -rvvv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... -- <SIP/101-08979460> Playing 'conf-getpin' (language 'en') -- <SIP/101-08979460> Playing 'conf-onlyperson' (language 'en') -- Hungup 'Zap/pseudo-1255965699' == Spawn extension (white, 300, 1) exited non-zero on 'SIP/101-08979460' -- Executing [300@white:1] MeetMe("SIP/101-08986e40", "1|dP|1234") in new stack -- Created MeetMe conference 1023 for conference '1' -- <SIP/101-08986e40> Playing 'conf-getpin' (language 'en') -- <SIP/101-08986e40> Playing 'conf-onlyperson' (language 'en') -- Hungup 'Zap/pseudo-2143146879' == Spawn extension (white, 300, 1) exited non-zero on 'SIP/101-08986e40' |
#vim extensions.conf
--- /tmp/l3-saved-8425.5893.22215 2009-12-10 05:35:18.000000000 -1000 +++ extensions.conf 2009-12-10 05:35:28.000000000 -1000 @@ -14,7 +14,7 @@ exten => 102,n,Background(rondo) exten => 102,n,Hangup -exten => 300,1,MeetMe(1,dP,1234) +exten => 300,1,MeetMe(1,dPc,1234) exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)}) ;exten => _1XX,n,Dial(SIP/${EXTEN}) |
#asterisk -rvvv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... -- <SIP/101-08979460> Playing 'conf-getpin' (language 'en') -- <SIP/101-08979460> Playing 'conf-onlyperson' (language 'en') -- Hungup 'Zap/pseudo-646670256' == Spawn extension (white, 300, 1) exited non-zero on 'SIP/101-08979460' -- Executing [300@white:1] MeetMe("SIP/101-08979460", "1|dPc|1234") in new stack -- Created MeetMe conference 1023 for conference '1' -- <SIP/101-08979460> Playing 'conf-getpin' (language 'en') -- <SIP/101-08979460> Playing 'conf-onlyperson' (language 'en') -- Hungup 'Zap/pseudo-1598918534' == Spawn extension (white, 300, 1) exited non-zero on 'SIP/101-08979460' |
#vim extensions.conf
--- /tmp/l3-saved-8425.16485.9441 2009-12-10 05:36:27.000000000 -1000 +++ extensions.conf 2009-12-10 05:37:07.000000000 -1000 @@ -15,6 +15,7 @@ exten => 102,n,Hangup exten => 300,1,MeetMe(1,dPc,1234) +exten => 301,1,MeetMe(1,dPcm,1234) exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)}) ;exten => _1XX,n,Dial(SIP/${EXTEN}) |
#asterisk -rvvv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 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. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... -- Executing [300@white:1] MeetMe("SIP/101-08979460", "1|dPc|1234") in new stack -- Created MeetMe conference 1023 for conference '1' -- <SIP/101-08979460> Playing 'conf-getpin' (language 'en') -- <SIP/101-08979460> Playing 'conf-onlyperson' (language 'en') -- Executing [301@black:1] MeetMe("SIP/103-0898acd8", "1|dPcm|1234") in new stack -- <SIP/103-0898acd8> Playing 'conf-getpin' (language 'en') -- <SIP/103-0898acd8> Playing 'conf-onlyone' (language 'en') == Spawn extension (white, 300, 1) exited non-zero on 'SIP/101-08979460' -- Hungup 'Zap/pseudo-555429951' == Spawn extension (black, 301, 1) exited non-zero on 'SIP/103-0898acd8' |
#vim musiconhold.conf
|
#[ ]
aspell/ asterisk/ |
#vim musiconhold.conf
![]() |
#cd /var/lib/asterisk/moh
|
#ls -l
total 228 -rw-r--r-- 1 root root 229119 2009-12-10 05:43 rondo.gsm |
#vim musiconhold.conf
![]() |
#vim musiconhold.conf
![]() |
#~
![]() bash: /etc/asterisk/: is a directory |
#cd /etc/asterisk/
|
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#;random=yes ; Play the files in a random order
rondo.gsm |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#ping ukr.net
PING ukr.net (195.214.195.105) 56(84) bytes of data. 64 bytes from 195.214.195.105: icmp_seq=1 ttl=57 time=8.67 ms 64 bytes from 195.214.195.105: icmp_seq=2 ttl=57 time=4.06 ms 64 bytes from 195.214.195.105: icmp_seq=3 ttl=57 time=4.64 ms ^C --- ukr.net ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2009ms rtt min/avg/max/mdev = 4.064/5.792/8.670/2.048 ms |
#ls -l
total 448 -rw-r----- 1 asterisk asterisk 140 2009-01-04 09:26 adsi.conf -rw-r----- 1 asterisk asterisk 840 2009-01-04 09:26 adtranvofr.conf -rw-r----- 1 asterisk asterisk 2724 2009-01-04 09:26 agents.conf -rw-r----- 1 asterisk asterisk 2227 2009-01-04 09:26 alarmreceiver.conf -rw-r----- 1 asterisk asterisk 2675 2009-01-04 09:26 alsa.conf -rw-r----- 1 asterisk asterisk 767 2009-01-04 09:26 amd.conf -rw-r----- 1 asterisk asterisk 3260 2009-01-04 09:26 asterisk.adsi -rw-r----- 1 asterisk asterisk 247 2009-01-04 09:17 asterisk.conf -rw-r----- 1 asterisk asterisk 7324 2009-01-04 09:26 cdr.conf ... -rw-r----- 1 asterisk asterisk 4044 2009-01-04 09:26 skinny.conf -rw-r----- 1 asterisk asterisk 6691 2009-01-04 09:26 sla.conf -rw-r----- 1 asterisk asterisk 2665 2009-01-04 09:26 smdi.conf -rw-r----- 1 asterisk asterisk 1384 2009-01-04 09:26 telcordia-1.adsi -rw-r----- 1 asterisk asterisk 598 2009-01-04 09:26 udptl.conf -rw-r----- 1 asterisk asterisk 1804 2009-01-04 09:26 users.conf -rw-r----- 1 asterisk asterisk 11723 2009-01-04 09:26 voicemail.conf -rw-r----- 1 asterisk asterisk 2772 2009-01-04 09:26 vpb.conf -rw-r----- 1 asterisk asterisk 393 2009-01-04 09:26 watchdog.conf -rw-r----- 1 asterisk asterisk 24201 2009-12-09 03:28 zapata.conf |
#ssh root@192.168.102.1
root@192.168.102.1's password: Linux debian4 2.6.26-2-686 #1 SMP Wed Aug 19 06:06:52 UTC 2009 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Thu Dec 10 21:56:42 2009 from 192.168.102.110 l3-agent is already running: pid=2751; pidfile=/root/.lilalo/l3-agent.pid |
#!/bin/sh MAILTABLE=/etc/asterisk/mailtable mail="`grep "$1" $MAILTABLE | awk '{print $2}'`" [ -z "$mail" ] || sendxmpp -f /var/lib/asterisk/.sendxmpprc "$mail"
101 gib@poltava.unix.nt 102 igor@kiev.unix.nt 103 romchik@obukhov.unix.nt
Время первой команды журнала | 14:24:49 2009-12-10 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 08:58:49 2009-12-11 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 24.75 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.99 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.31 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.29 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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