Журнал лабораторных работ

Содержание

Журнал

Суббота (04/26/14)

/dev/pts/2
09:18:48
#[ ]
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)
прошло 111 минут
/dev/pts/0
11:10:38
#ps aux|grep l3*
root        22  0.0  0.0      0     0 ?        S<   12:08   0:00 [khelper]
root        26  0.0  0.0      0     0 ?        S    12:08   0:00 [bdi-default]
root        28  0.0  0.0      0     0 ?        S<   12:08   0:00 [kblockd]
root       555  0.0  0.0      0     0 ?        S    12:08   0:00 [flush-8:0]
root      2190  0.0  0.0 118580  1792 ?        Sl   12:08   0:00 /usr/sbin/rsyslogd -c5
asterisk  2635  0.4  0.1 753724 30380 ?        Ssl  12:08   0:00 /usr/sbin/asterisk -p -U asterisk
asterisk  2636  0.0  0.0  13912   772 ?        S    12:08   0:00 astcanary /var/run/asterisk/alt.asterisk.canary.tweet.tweet.tweet 2635
avahi     2737  0.0  0.0  34164  1756 ?        S    12:09   0:00 avahi-daemon: running [debian8.local]
avahi     2738  0.0  0.0  34036   468 ?        S    12:09   0:00 avahi-daemon: chroot helper
root      2792  0.0  0.0  21004  1688 ?        Ss   12:09   0:00 /usr/sbin/bluetoothd
...
user      3507  0.0  0.0 180144  5668 ?        Sl   12:09   0:00 /usr/lib/telepathy/mission-control-5
user      3511  0.0  0.0 353224 14456 ?        Sl   12:09   0:00 /usr/lib/gnome-online-accounts/goa-daemon
user      3522  0.0  0.0  10768  1200 ?        S    12:10   0:00 /bin/bash /usr/lib/gnome-documents/gnome-documents-search-provider
user      3523  0.1  0.1 323476 18496 ?        Sl   12:10   0:00 /usr/bin/gjs-console -I /usr/share/gnome-documents/js -c const SearchProvider = imports.shellSearchProvider; SearchProvider.start();
user      3539  0.4  0.0 377848 15920 ?        Rl   12:10   0:00 gnome-terminal
user      3545  0.0  0.0  14552   792 ?        S    12:10   0:00 gnome-pty-helper
root      3605  0.0  0.0  16052   864 pts/0    S+   12:10   0:00 script -f -c l3script -q /root/.lilalo//294330426715419527-1398503438.script
root      3636  0.0  0.0  16056   488 pts/0    S+   12:10   0:00 script -f -c l3script -q /root/.lilalo//294330426715419527-1398503438.script
root      3637  0.0  0.0  19560  2292 pts/1    Ss   12:10   0:00 l3script
root      3659  0.0  0.0   7836   880 pts/1    R+   12:10   0:00 grep l3*
11:10:50
#ps aux|grep l3*
root        22  0.0  0.0      0     0 ?        S<   12:08   0:00 [khelper]
root        26  0.0  0.0      0     0 ?        S    12:08   0:00 [bdi-default]
root        28  0.0  0.0      0     0 ?        S<   12:08   0:00 [kblockd]
root       555  0.0  0.0      0     0 ?        S    12:08   0:00 [flush-8:0]
root      2190  0.0  0.0 118580  1792 ?        Sl   12:08   0:00 /usr/sbin/rsyslogd -c5
asterisk  2635  0.4  0.1 753724 30380 ?        Ssl  12:08   0:00 /usr/sbin/asterisk -p -U asterisk
asterisk  2636  0.0  0.0  13912   772 ?        S    12:08   0:00 astcanary /var/run/asterisk/alt.asterisk.canary.tweet.tweet.tweet 2635
avahi     2737  0.0  0.0  34164  1756 ?        S    12:09   0:00 avahi-daemon: running [debian8.local]
avahi     2738  0.0  0.0  34036   468 ?        S    12:09   0:00 avahi-daemon: chroot helper
root      2792  0.0  0.0  21004  1688 ?        Ss   12:09   0:00 /usr/sbin/bluetoothd
...
user      3507  0.0  0.0 180144  5668 ?        Sl   12:09   0:00 /usr/lib/telepathy/mission-control-5
user      3511  0.0  0.0 353224 14456 ?        Sl   12:09   0:00 /usr/lib/gnome-online-accounts/goa-daemon
user      3522  0.0  0.0  10768  1200 ?        S    12:10   0:00 /bin/bash /usr/lib/gnome-documents/gnome-documents-search-provider
user      3523  0.1  0.1 323476 18496 ?        Sl   12:10   0:00 /usr/bin/gjs-console -I /usr/share/gnome-documents/js -c const SearchProvider = imports.shellSearchProvider; SearchProvider.start();
user      3539  0.4  0.0 378072 16008 ?        Sl   12:10   0:00 gnome-terminal
user      3545  0.0  0.0  14552   792 ?        S    12:10   0:00 gnome-pty-helper
root      3605  0.0  0.0  16052   864 pts/0    S+   12:10   0:00 script -f -c l3script -q /root/.lilalo//294330426715419527-1398503438.script
root      3636  0.0  0.0  16056   488 pts/0    S+   12:10   0:00 script -f -c l3script -q /root/.lilalo//294330426715419527-1398503438.script
root      3637  0.0  0.0  19560  2292 pts/1    Ss   12:10   0:00 l3script
root      3668  0.0  0.0   7836   876 pts/1    R+   12:10   0:00 grep l3*
11:10:56
#ps aux|grep l3ag*
root      3677  0.0  0.0   7832   876 pts/1    S+   12:11   0:00 grep l3ag*
11:11:04
#ps aux|grep l3-age*
root      3686  0.0  0.0   7832   880 pts/1    S+   12:11   0:00 grep l3-age*
11:11:13
#l3-agent
Removing stale pidfile
11:11:20
#l3-agent
l3-agent is already running: pid=3695; pidfile=/root/.lilalo/l3-agent.pid
11:11:22
#ps aux|grep l3-age*
root      3695  9.0  0.0  47168  9880 ?        Ss   12:11   0:00 l3-agent
root      3715  0.0  0.0   7832   880 pts/1    S+   12:11   0:00 grep l3-age*
11:11:25
#screen -x
11:11:35
#screen
/dev/pts/1
11:11:59
#l3-agent
l3-agent is already running: pid=3695; pidfile=/root/.lilalo/l3-agent.pid
11:12:05
#ps aux|grep l3-age*
root      3695  2.3  0.0  47164  9988 ?        Ss   12:11   0:01 l3-agent
root      3813  0.0  0.0   7836   880 pts/2    S+   12:12   0:00 grep l3-age*
/dev/pts/4
11:13:57
#l3 -agent
l3 [command]:
    cd new_context   - change current lilalo context
    pwd              - show current lilalo context
    on               - switch writing on (NOT IMPLEMENTED YET)
    off              - switch writing off (NOT IMPLEMENTED YET)
11:14:01
#l3-agent
l3-agent is already running: pid=3695; pidfile=/root/.lilalo/l3-agent.pid
11:14:04
#screen -x
11:14:35
#ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.3  0.0  10648   816 ?        Ss   12:08   0:01 init [2]
root         2  0.0  0.0      0     0 ?        S    12:08   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    12:08   0:00 [ksoftirqd/0]
root         4  0.2  0.0      0     0 ?        S    12:08   0:00 [kworker/0:0]
root         6  0.0  0.0      0     0 ?        S    12:08   0:00 [migration/0]
root         7  0.0  0.0      0     0 ?        S    12:08   0:00 [watchdog/0]
root         8  0.0  0.0      0     0 ?        S    12:08   0:00 [migration/1]
root         9  1.3  0.0      0     0 ?        S    12:08   0:04 [kworker/1:0]
root        10  0.0  0.0      0     0 ?        S    12:08   0:00 [ksoftirqd/1]
...
root      3882  0.0  0.0  56120  1648 pts/0    S    12:12   0:00 su
root      3890  0.0  0.0  19464  2036 pts/0    S    12:12   0:00 bash
root      3891  0.0  0.0  23100  1124 pts/0    S+   12:12   0:00 screen
root      3892  0.0  0.0  23564  1724 ?        Rs   12:12   0:00 SCREEN
root      3893  0.0  0.0  19504  2192 pts/3    Ss+  12:12   0:00 /bin/bash
root      3895  0.0  0.0  19500  2192 pts/4    Ss   12:13   0:00 /bin/bash
root      3899  0.0  0.0  16052   864 pts/4    S+   12:13   0:00 script -f -c l3script -q /root/.lilalo//254432329142413
root      3930  0.0  0.0  16056   488 pts/4    S+   12:13   0:00 script -f -c l3script -q /root/.lilalo//254432329142413
root      3931  0.0  0.0  19596  2332 pts/5    Ss   12:13   0:00 l3script
root      3979  0.0  0.0  16836  1268 pts/5    R+   12:14   0:00 ps aux
11:14:45
#ps aux |grep screen
user      3470  0.0  0.0 251608  9760 ?        Sl   12:09   0:00 gnome-screensaver
root      3821  0.0  0.0  23100  1128 pts/2    S+   12:12   0:00 screen -x
root      3891  0.0  0.0  23100  1124 pts/0    S+   12:12   0:00 screen
root      3991  0.0  0.0   7836   876 pts/5    S+   12:14   0:00 grep screen
11:14:59
#screen -x
11:15:34
#pwd
/home/user
11:15:48
#ps aux |grep l3-ag*
root      3695 79.2  0.0  47612 10440 ?        Rs   12:11   3:48 l3-agent
root      4034  0.0  0.0   7832   880 pts/5    R+   12:16   0:00 grep l3-ag*
11:16:08
#ps aux |grep l3-ag*
root      3695 86.4  0.0  47988 10616 ?        Rs   12:11   6:24 l3-agent
root      4169  0.0  0.0   7836   880 pts/5    S+   12:18   0:00 grep l3-ag*
11:18:45
#ps aux |grep l3-ag
root      3695 86.4  0.0  47988 10616 ?        Rs   12:11   6:26 l3-agent
root      4178  0.0  0.0   7836   876 pts/5    S+   12:18   0:00 grep l3-ag
11:18:46
#ls -lS ~/.lilalo/ | head
total 2360508
-rw-r--r-- 1 root root 2396135399 Apr 26 12:18 681474251465731744-1398503519.script
-rw-r--r-- 1 root root    6008040 Apr 24 09:29 26111302884814912-1398164954.script
-rw-r--r-- 1 root root    5328462 Apr 26 11:57 9394154212502525510-1398328841.script
-rw-r--r-- 1 root root    5023031 Apr 26 11:57 3114483781784829130-1398333731.script
-rw-r--r-- 1 root root    1459082 Apr 24 11:36 630222380126576051-1398321317.script
-rw-r--r-- 1 root root    1238283 Apr 24 09:29 26974142282560225357-1398235588.script
-rw-r--r-- 1 root root     382738 Apr 22 17:49 15090308971828126260-1398165085.script
-rw-r--r-- 1 root root     315617 Apr 24 11:36 31320213511176926648-1398321595.script
-rw-r--r-- 1 root root      45748 Apr 26 10:43 3114483781784829130-1398333731.info
11:18:55
#rm ~/.lilalo/681474251465731744-1398503519.script

11:19:04
#pkill -9 l3-agent

11:19:09
#l3-agent
Removing stale pidfile
11:19:13
## должно работать

11:20:10
#â„# обновится скоро

11:20:15
#pwd
/home/user
11:20:46
#time
real    0m0.000s
user    0m0.000s
sys     0m0.000s
11:21:04
#date
Sat Apr 26 12:21:07 EEST 2014
/dev/pts/2
11:23:35
#lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 003: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem
11:23:38
#apt-get install subversion
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  asterisk-core-sounds-ru-gsm
Use 'apt-get autoremove' to remove it.
The following extra packages will be installed:
  libsvn1
Suggested packages:
  subversion-tools
...
Get:2 http://192.168.12.254/debian/ wheezy/main subversion amd64 1.6.17dfsg-4+deb7u4 [1,320 kB]
Fetched 2,253 kB in 1s (1,587 kB/s)
Selecting previously unselected package libsvn1:amd64.
(Reading database ... 139319 files and directories currently installed.)
Unpacking libsvn1:amd64 (from .../libsvn1_1.6.17dfsg-4+deb7u4_amd64.deb) ...
Selecting previously unselected package subversion.
Unpacking subversion (from .../subversion_1.6.17dfsg-4+deb7u4_amd64.deb) ...
Processing triggers for man-db ...
Setting up libsvn1:amd64 (1.6.17dfsg-4+deb7u4) ...
Setting up subversion (1.6.17dfsg-4+deb7u4) ...
11:25:22
#св cd /usr/src/

11:26:10
#route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.12.254  0.0.0.0         UG    0      0        0 eth0
192.168.12.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
11:26:15
#ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_req=1 ttl=51 time=34.2 ms
^C
--- 8.8.8.8 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 34.292/34.292/34.292/0.000 ms
11:26:19
#ping chan-datacard.googlecode.com
PING googlecode.l.googleusercontent.com (173.194.70.82) 56(84) bytes of data.
64 bytes from fa-in-f82.1e100.net (173.194.70.82): icmp_req=1 ttl=51 time=31.8 ms
64 bytes from fa-in-f82.1e100.net (173.194.70.82): icmp_req=2 ttl=51 time=31.9 ms
^C
--- googlecode.l.googleusercontent.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 31.883/31.916/31.949/0.033 ms
11:26:55
#cd chan-datacard-read-only/

11:26:58
#apt-get install asterisk-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  asterisk-core-sounds-ru-gsm
Use 'apt-get autoremove' to remove it.
The following NEW packages will be installed:
  asterisk-dev
0 upgraded, 1 newly installed, 0 to remove and 6 not upgraded.
Need to get 959 kB of archives.
After this operation, 2,131 kB of additional disk space will be used.
Get:1 http://192.168.12.254/debian/ wheezy/main asterisk-dev all 1:1.8.13.1~dfsg1-3+deb7u3 [959 kB]
Fetched 959 kB in 0s (2,343 kB/s)
Selecting previously unselected package asterisk-dev.
(Reading database ... 139407 files and directories currently installed.)
Unpacking asterisk-dev (from .../asterisk-dev_1%3a1.8.13.1~dfsg1-3+deb7u3_all.deb) ...
Setting up asterisk-dev (1:1.8.13.1~dfsg1-3+deb7u3) ...
11:27:25
#./configure
configure complete, now type 'make'
11:27:34
#make
gcc -Wextra -fPIC -DAST_MODULE=\"chan_datacard\" -D_THREAD_SAFE -I. -I/usr/include -O2 -DICONV_CONST="" -D__DEBUG__ -D__MANAGER__ -D__APP__ -c chan_datacard.c
gcc  -shared -Xlinker -x chan_datacard.o  -o chan_datacard.so
chmod 755 chan_datacard.so
11:27:39
#make install
gcc -Wextra -fPIC -DAST_MODULE=\"chan_datacard\" -D_THREAD_SAFE -I. -I/usr/include -O2 -DICONV_CONST="" -D__DEBUG__ -D__MANAGER__ -D__APP__ -c chan_datacard.c
gcc  -shared -Xlinker -x chan_datacard.o  -o chan_datacard.so
chmod 755 chan_datacard.so
install -d                /usr/lib/asterisk/modules/
install -m 755 chan_datacard.so /usr/lib/asterisk/modules/
11:27:43
#ping chan-datacard.googlecode.com

11:27:43
#cd /usr/src/
                                        #apt-get install subversion
11:28:19
#apt-get install subversion

11:28:19
#cd chan-datacard-read-only/
                                        #apt-get install asterisk-dev
11:28:27
#apt-get install subversion
                                        #cd chan-datacard-read-only/
11:28:32
#apt-get install subversion
                                        #./configure
11:28:43
#apt-get install subversion
                                        make install^C
11:28:45
## make

11:28:49
## make install

11:31:36
#^C

11:31:55
#ls
__app.c            __at_send.c       __channel.c    etc          __manager.c
__at_fifo_queue.c  chan_datacard.c   __char_conv.c  __helpers.c  __memmem.c
__at_parse.c       chan_datacard.h   __cli.c        LICENSE.txt  README.txt
__at_read.c        chan_datacard.o   configure      Makefile     __ringbuffer.c
__at_response.c    chan_datacard.so  COPYRIGHT.txt  Makefile.in  __ringbuffer.h
прошло 36 минут
12:08:44
#ls etc/
datacard.conf
12:08:54
#cp etc/datacard.conf /etc/asterisk/

12:09:29
#мÑless /var/log/messages
Apr 26 12:23:34 debian8 kernel: [  894.131187] usb 1-1.5: GSM modem (1-port) converter now attached to ttyUSB2
Apr 26 12:23:34 debian8 kernel: [  894.131206] usbcore: registered new interface driver option
Apr 26 12:23:34 debian8 kernel: [  894.131207] option: v0.7.2:USB Driver for GSM modems
Apr 26 12:48:49 debian8 kernel: [ 2408.420426] usb 1-1.5: USB disconnect, device number 3
Apr 26 12:48:49 debian8 kernel: [ 2408.420699] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
Apr 26 12:48:49 debian8 kernel: [ 2408.420721] option 1-1.5:1.0: device disconnected
Apr 26 12:48:49 debian8 kernel: [ 2408.422222] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
Apr 26 12:48:49 debian8 kernel: [ 2408.422243] option 1-1.5:1.1: device disconnected
Apr 26 12:48:49 debian8 kernel: [ 2408.422384] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
Apr 26 12:48:49 debian8 kernel: [ 2408.422400] option 1-1.5:1.2: device disconnected
...
~
~
~
~
~
~
~
~
~
~
12:10:46
## cp etc/datacard.conf /etc/asterisk/

12:10:58
#pwd
/usr/src/chan-datacard-read-only
12:11:12
#q
l3script: q: command not found
12:11:22
#vim /etc/asterisk/datacard.conf
12:12:30
#tail /var/log/messages
Apr 26 12:49:14 debian8 kernel: [ 2433.054162] usb 1-1.5: Product: HUAWEI Mobile
Apr 26 12:49:14 debian8 kernel: [ 2433.054164] usb 1-1.5: Manufacturer: HUAWEI Technology
Apr 26 12:49:14 debian8 kernel: [ 2433.057334] option 1-1.5:1.0: GSM modem (1-port) converter detected
Apr 26 12:49:14 debian8 kernel: [ 2433.057509] usb 1-1.5: GSM modem (1-port) converter now attached to ttyUSB0
Apr 26 12:49:14 debian8 kernel: [ 2433.057681] option 1-1.5:1.1: GSM modem (1-port) converter detected
Apr 26 12:49:14 debian8 kernel: [ 2433.057800] usb 1-1.5: GSM modem (1-port) converter now attached to ttyUSB1
Apr 26 12:49:14 debian8 kernel: [ 2433.057944] option 1-1.5:1.2: GSM modem (1-port) converter detected
Apr 26 12:49:14 debian8 kernel: [ 2433.058060] usb 1-1.5: GSM modem (1-port) converter now attached to ttyUSB2
Apr 26 12:49:14 debian8 mtp-probe: checking bus 1, device 4: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5"
Apr 26 12:49:14 debian8 mtp-probe: bus: 1, device: 4 was not an MTP device
12:12:40
#nano /var/log/messages
12:15:06
#;
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
12:15:15
#asterisk -rvvv
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 = 5517)
...
debian8*CLI> datacard ussd datacard0 *101#
'[datacard0] Got USSD response: '31.00 UAH, dejstvitelen do 18.04.2015, tarif 'Super MTS 3D Nol 25'. * Super Internet vsego za 1,06 grn v den! *101*223#
  == Starting Local/ussd@incoming-datacard-8fb2;1 at incoming-datacard,ussd,1 failed so falling back to exten 's'
  == Starting Local/ussd@incoming-datacard-8fb2;1 at incoming-datacard,s,1 still failed so falling back to context 'default'
[Apr 26 13:17:50] WARNING[5590]: pbx.c:5367 __ast_pbx_run: Channel 'Local/ussd@incoming-datacard-8fb2;1' sent into invalid extension 's' in context 'default', but no invalid handler
debian8*CLI>
debian8*CLI>
debian8*CLI>
debian8*CLI> quit
Executing last minute cleanups
12:18:47
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4423.27987.13314	2014-04-26 13:19:02.725416025 +0300
+++ /etc/asterisk/extensions.conf	2014-04-26 13:19:23.197415755 +0300
@@ -314,3 +314,6 @@
 
 ;[context3]
 
+[incoming-datacard]
+
+exten => s,1,Goto(menu,s,1)
12:19:23
#asterisk -rvvv
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 = 5517)
...
data      database  datacard
debian8*CLI> datacard show
devices  device
debian8*CLI> datacard show devices
ID           Group State      RSSI Mode Submode Provider Name  Model      Firmware          IMEI             IMSI             Number
datacard0    1     Free       28   3    3       MTS UKR        E1550      11.608.12.00.143  358705031098900  255013960054689  +380506592257
[Apr 26 13:19:46] NOTICE[5555]: chan_sip.c:13189 sip_reg_timeout:    -- Registration for 'santiago@192.168.12.7' timed out, trying again (Attempt #4)
[Apr 26 13:20:06] NOTICE[5555]: chan_sip.c:13189 sip_reg_timeout:    -- Registration for 'santiago@192.168.12.7' timed out, trying again (Attempt #5)
debian8*CLI> quit
Executing last minute cleanups
12:20:17
#vim /etc/asterisk/extensions.conf
12:20:53
#include=>national
                                ; increasing this value may help if your network normally has low jittt
er,
                                ; but occasionally has spikes.
;jblog = no                     ; Enables jitterbuffer frame logging. Defaults to "no".
;-----------------------------------------------------------------------------------
[         ]
[       ](!)
[       ]
data=/dev/ttyUSB2               ; tty for AT commands
group=1                         ; calling group
...
; ;language=de                  ; Use German as default language
; audio=/dev/ttyUSB4            ; tty port for audio connection
; data=/dev/ttyUSB5             ; tty port for AT commands
; group=2                               ; calling group
; rxgain=10                     ; increase the incoming volume
; autodeletesms=yes             ; auto delete incoming sms
; u2diag=0                      ; set U2DIAG parameter (0 = disable everything except modem function)
; callingpres=allowed_passed_screen ; set caller ID presentation
@
; disablesms=yes=yesacard       ; use t ; chan_datacard has currently a bug with SMS49,0-1        89%
/dev/pts/4
12:22:29
#exten => s,1,Goto(menu,s,1)
E325: ATTENTION
Found a swap file by the name "/etc/asterisk/.datacard.conf.swp"
          owned by: root   dated: Sat Apr 26 13:21:11 2014
         file name: /etc/asterisk/datacard.conf
          modified: no
         user name: root   host name: debian8
        process ID: 5662 (still running)
While opening file "/etc/asterisk/datacard.conf"
             dated: Sat Apr 26 13:10:46 2014
;jbtargetextra = 40             ; This option only affects the jb when 'jbimpl = adaptive' is set.
...
audio=/dev/ttyUSB1              ; tty for audio connection
data=/dev/ttyUSB2               ; tty for AT commands
group=1                         ; calling group
; [datacard1]
; context=incoming-datacard     ; context for incoming calls
; ;language=de                  ; Use German as default language
; audio=/dev/ttyUSB4            ; tty port for audio connection
; data=/dev/ttyUSB5             ; tty port for AT commands
; group=2                               ; calling group
; rxgain=10                     ; increase the incoming volume
12:23:56
#[ ]
resetdatacard=yes               ; reset datacard during initialization
u2diag=0                        ; set U2DIAG parameter (0 = disable everything except modem function)
[datacard0](E1550_t)
audio=/dev/ttyUSB1              ; tty for audio connection
data=/dev/ttyUSB2               ; tty for AT commands
group=1                         ; calling group
; [datacard1]
; context=incoming-datacard     ; context for incoming calls
; ;language=de                  ; Use German as default language
; audio=/dev/ttyUSB4            ; tty port for audio connection
; data=/dev/ttyUSB5             ; tty port for AT commands
; group=2                               ; calling group
/dev/pts/2
12:24:37
#[ ]
include=>local
include=>fallback
;[context2]
;[context3]
[incoming-datacard]
exten => s,1,Goto(menu,s,1)
12:24:43
#дыlsmod | less
12:25:50
##modprobe -r option

12:26:01
#vim /etc/asterisk/datacard.conf
12:26:21
#less /etc/asterisk/datacard.conf
12:28:36
# ; will pad its size. the default is 40, so without modification, the nn
exten => _2[123]XX,1,Macro(outgoingcall,SIP/havana/${EXTEN},tTkK)
exten => _33XX,1,Macro(outgoingcall,SIP/havana/${EXTEN},tTkK)
[fallback]
[xten => ].,1,Playback(/var/tmp/asterisk/message)
[ukraine-gateway]
[               ]
exten => _380XXXXXXXXX,1,Dial(datacard0/g1/+${EXTEN})
; exten => _380      XXX,1,Dial(SIP/kiev/${EXTEN))
[gr_relay]
include=>internal
include=>local
include=>national
include=>international
include=>ukraine-gateway
include=>fallback
        >ukraine-gateway
[gr1]
include=>fallback
[gr3]
[gr3]
"/etc/asterisk/extensions.conf" 329L, 8702C written
12:33:07
#asterisk -rvvv
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 = 5517)
...
    -- Auto fallthrough, channel 'SIP/3201-00000004' status is 'CHANUNAVAIL'
    -- Executing [h@gr1:1] Playback("SIP/3201-00000004", "/var/tmp/asterisk/message") in new stack
  == Spawn extension (gr1, h, 1) exited non-zero on 'SIP/3201-00000004'
debian8*CLI>
debian8*CLI>
    -- Registered SIP '3203' at 192.168.12.221:63682
    -- Unregistered SIP '3203'
    -- Registered SIP '3203' at 192.168.12.221:63682
debian8*CLI> quit
Executing last minute cleanups
12:35:01
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4423.4947.19659	2014-04-26 13:35:03.337403155 +0300
+++ /etc/asterisk/extensions.conf	2014-04-26 13:35:09.345403075 +0300
@@ -283,7 +283,7 @@
 
 [ukraine-gateway]
 
-exten => _380XXXXXXXXX,1,Dial(datacard0/g1/+${EXTEN})
+exten => _380XXXXXXXXX,1,Dial(datacard/g1/+${EXTEN})
 
 ; exten => _380XXXXXXXXX,1,Dial(SIP/kiev/${EXTEN))
 
12:35:09
#asterisk -rvvv
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 = 5517)
...
    -- Datacard/datacard0-dc22 is making progress passing it to SIP/3201-00000005
    -- Datacard/datacard0-dc22 answered SIP/3201-00000005
    -- Executing [h@gr1:1] Playback("SIP/3201-00000005", "/var/tmp/asterisk/message") in new stack
[Apr 26 13:35:47] WARNING[5870]: file.c:766 ast_readaudio_callback: Failed to write frame
    -- <SIP/3201-00000005> Playing '/var/tmp/asterisk/message.gsm' (language 'ru')
[Apr 26 13:35:47] WARNING[5870]: app_playback.c:475 playback_exec: ast_streamfile failed on SIP/3201-00000005 for /var/tmp/asterisk/message
  == Spawn extension (gr1, 380503579111, 1) exited non-zero on 'SIP/3201-00000005'
       > Saved useragent "Z 3.2.21357 r21367" for peer 3202
debian8*CLI> quit
Executing last minute cleanups
12:36:06
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4423.21225.25467	2014-04-26 13:36:09.417402269 +0300
+++ /etc/asterisk/extensions.conf	2014-04-26 13:38:12.577400620 +0300
@@ -283,9 +283,9 @@
 
 [ukraine-gateway]
 
-exten => _380XXXXXXXXX,1,Dial(datacard/g1/+${EXTEN})
+exten => _380XXXXXXXXX,1,Dial(DATACARD/g1/+${EXTEN})
 
-; exten => _380XXXXXXXXX,1,Dial(SIP/kiev/${EXTEN))
+; exten => _380XXXXXXXXX,1,Dial(SIP/kiev/${EXTEN})
 
 [gr_relay]
 include=>internal
12:39:06
#[ ]
group=1                         ; calling group
; group=2                               ; calling group
12:39:14
#grep group -B5 /etc/asterisk/datacard.conf
[datacard0](E1550_t)
audio=/dev/ttyUSB1              ; tty for audio connection
data=/dev/ttyUSB2               ; tty for AT commands
group=1                         ; calling group
--
; [datacard1]
; context=incoming-datacard     ; context for incoming calls
; ;language=de                  ; Use German as default language
; audio=/dev/ttyUSB4            ; tty port for audio connection
; data=/dev/ttyUSB5             ; tty port for AT commands
; group=2                               ; calling group
12:39:21
#asterisk -rvvv
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 = 5517)
Verbosity is at least 4
debian8*CLI> datacard show devices
ID           Group State      RSSI Mode Submode Provider Name  Model      Firmware          IMEI             IMSI             Number
datacard0    1     Free       27   3    3       MTS UKR        E1550      11.608.12.00.143  358705031098900  255013960054689  +380506592257
debian8*CLI> quit
Executing last minute cleanups
12:40:31
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4423.24293.21944	2014-04-26 13:40:34.557398719 +0300
+++ /etc/asterisk/extensions.conf	2014-04-26 13:41:03.149398336 +0300
@@ -283,7 +283,8 @@
 
 [ukraine-gateway]
 
-exten => _380XXXXXXXXX,1,Dial(DATACARD/g1/+${EXTEN})
+;exten => _380XXXXXXXXX,1,Dial(DATACARD/g1/+${EXTEN})
+exten => _380XXXXXXXXX,1,Dial(DATACARD/p:MTS UKR/+${EXTEN})
 
 ; exten => _380XXXXXXXXX,1,Dial(SIP/kiev/${EXTEN})
 
12:41:03
#asterisk -rvvv
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 = 5517)
...
    -- 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
    -- Registered extension context 'app_queue_gosub_virtual_context'; registrar: app_queue
    -- merging incls/swits/igpats from old(app_queue_gosub_virtual_context) to new(app_queue_gosub_virtual_context) context, registrar = pbx_config
    -- Added extension 's' priority 1 to app_queue_gosub_virtual_context
    -- Time to scan old dialplan and merge leftovers back into the new: 0.000416 sec
debian8*CLI> quit
Executing last minute cleanups
12:42:07
#grep MTS /etc/asterisk/extensions.conf
exten => _380XXXXXXXXX,1,Dial(DATACARD/p:MTS UKR/+${EXTEN})
12:42:12
#^C

12:42:41
#asterisk -rvvv
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 = 5517)
Verbosity is at least 4
debian8*CLI> datacard show devices
ID           Group State      RSSI Mode Submode Provider Name  Model      Firmware          IMEI             IMSI             Number
datacard0    1     Free       27   3    3       MTS UKR        E1550      11.608.12.00.143  358705031098900  255013960054689  +380506592257
debian8*CLI> # i:358705031098900
No such command '# i:358705031098900' (type 'core show help # i:358705031098900' for other possible commands)
debian8*CLI> quit
Executing last minute cleanups
12:48:43
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4423.32490.28471	2014-04-26 13:48:50.113392081 +0300
+++ /etc/asterisk/extensions.conf	2014-04-26 13:49:20.797391670 +0300
@@ -328,3 +328,5 @@
 [incoming-datacard]
 
 exten => s,1,Goto(menu,s,1)
+
+exten => sms,1,System(echo ‘${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)} – ${DATACARD} – ${CALLERID(num)}: ${SMS}’ >> /var/log/asterisk/sms.txt)
12:49:20
#asterisk -rvvv
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 = 5517)
...
    -- Added extension '72' priority 1 to parkedcalls
    -- Registered extension context 'demo'; registrar: pbx_lua
    -- merging incls/swits/igpats from old(demo) to new(demo) context, registrar = pbx_config
    -- Including switch 'Lua/' in context 'demo'
debian8*CLI>
debian8*CLI>
debian8*CLI>
debian8*CLI>
debian8*CLI> quit
Executing last minute cleanups
12:49:42
#asterisk -rvvv
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 = 5517)
...
debian8*CLI>
    -- Unregistered SIP '3203'
    -- Registered SIP '3203' at 192.168.12.221:63682
    -- Remote UNIX connection disconnected
    -- Remote UNIX connection
 [datacard0] Got SMS from +380660288333: 'Hi,aster!'
    -- Executing [sms@incoming-datacard:1] System("Local/sms@incoming-datacard-90bc;1", "echo ‘2014-04-26 13:50:39 – datacard0 – +380660288333: Hi,aster!’ >> /var/log/asterisk/sms.txt") in new stack
    -- Auto fallthrough, channel 'Local/sms@incoming-datacard-90bc;1' status is 'UNKNOWN'
debian8*CLI> quit
Executing last minute cleanups
/dev/pts/4
12:49:59
#asterisk -rvvvv
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 = 5517)
Verbosity is at least 4
 [datacard0] Got SMS from +380660288333: 'Hi,aster!'
    -- Executing [sms@incoming-datacard:1] System("Local/sms@incoming-datacard-90bc;1", "echo ‘2014-04-26 13:50:39 – datacard0 – +380660288333: Hi,aster!’ >> /var/log/asterisk/sms.txt") in new stack
    -- Auto fallthrough, channel 'Local/sms@incoming-datacard-90bc;1' status is 'UNKNOWN'
    -- Remote UNIX connection disconnected
    -- Registered SIP '3203' at 192.168.12.221:63682
debian8*CLI> quit
Executing last minute cleanups
/dev/pts/2
12:50:59
#cat /var/log/asterisk/sms.txt
‘2014-04-26 13:50:39 – datacard0 – +380660288333: Hi,aster!’
12:51:07
#grep incoming.datacard /etc/asterisk/extensions.conf -A5
[incoming-datacard]
exten => s,1,Goto(menu,s,1)
exten => sms,1,System(echo ‘${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)} – ${DATACARD} – ${CALLERID(num)}: ${SMS}’ >> /var/log/asterisk/sms.txt)
12:53:00
#grep incoming.datacard /etc/asterisk/extensions.conf -A5
[incoming-datacard]
exten => s,1,Goto(menu,s,1)
exten => sms,1,System(echo ‘${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)} – ${DATACARD} – ${CALLERID(num)}: ${SMS}’ >> /var/log/asterisk/sms.txt)
/dev/pts/4
12:55:02
#vim /etc/asterisk/extensions.conf
/dev/pts/2
13:00:47
#+380503579111
+380672437070
+380672197895
+380503579111
+380957370481
+380660288333
13:00:53
#vim /usr^C
13:01:01
#vim /usr/local/bin/send-sma^C
13:01:12
#vim /usr/local/bin/send-sms
--- /dev/null	2014-04-26 12:08:44.821179216 +0300
+++ /usr/local/bin/send-sms	2014-04-26 14:02:48.305380849 +0300
@@ -0,0 +1,10 @@
+
+FILENAME="$1"
+shift
+
+for P in `< $FILENAME`
+do
+asterisk -rx "datacard sms datacard0 $P $*"
+echo SMS was sent to $P
+sleep 2;
+done
13:02:48
#bash /usr/local/bin/send-sms phone-list.txt Hello from Asterisk
[datacard0] SMS send successful
SMS was sent to +380672437070
[datacard0] SMS send successful
SMS was sent to +380672197895
[datacard0] SMS send successful
SMS was sent to +380503579111
[datacard0] SMS send successful
SMS was sent to +380957370481
[datacard0] SMS send successful
SMS was sent to +380660288333

Файлы

  • /var/log/asterisk/sms.txt
  • /var/log/asterisk/sms.txt
    >
    ‘2014-04-26 13:50:39 – datacard0 – +380660288333: Hi,aster!’
    

    Статистика

    Время первой команды журнала09:18:48 2014- 4-26
    Время последней команды журнала13:02:48 2014- 4-26
    Количество командных строк в журнале101
    Процент команд с ненулевым кодом завершения, % 9.90
    Процент синтаксически неверно набранных команд, % 0.99
    Суммарное время работы с терминалом *, час 1.26
    Количество командных строк в единицу времени, команда/мин 1.34
    Частота использования команд
    grep14|============| 12.28%
    vim12|==========| 10.53%
    ps11|=========| 9.65%
    asterisk10|========| 8.77%
    apt-get6|=====| 5.26%
    l3-agent5|====| 4.39%
    screen4|===| 3.51%
    #4|===| 3.51%
    [4|===| 3.51%
    cd3|==| 2.63%
    ls3|==| 2.63%
    ping3|==| 2.63%
    pwd3|==| 2.63%
    make2|=| 1.75%
    less2|=| 1.75%
    ^C2|=| 1.75%
    configure1|| 0.88%
    св1|| 0.88%
    +3805035791111|| 0.88%
    lsusb1|| 0.88%
    cp1|| 0.88%
    pkill1|| 0.88%
    rm1|| 0.88%
    nano1|| 0.88%
    will1|| 0.88%
    cat1|| 0.88%
    time1|| 0.88%
    q1|| 0.88%
    l31|| 0.88%
    route1|| 0.88%
    head1|| 0.88%
    s,1,Goto(menu,s,1)1|| 0.88%
    tail1|| 0.88%
    дыlsmod1|| 0.88%
    bash1|| 0.88%
    â„#1|| 0.88%
    include=>1|| 0.88%
    national1|| 0.88%
    мÑless1|| 0.88%
    exten1|| 0.88%
    #modprobe1|| 0.88%
    date1|| 0.88%
    ____
    *) Интервалы неактивности длительностью 30 минут и более не учитываются

    Справка

    Для того чтобы использовать LiLaLo, не нужно знать ничего особенного: всё происходит само собой. Однако, чтобы ведение и последующее использование журналов было как можно более эффективным, желательно иметь в виду следующее:
    1. В журнал автоматически попадают все команды, данные в любом терминале системы.

    2. Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.

    3. Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
      $ l s-l
      bash: l: command not found
      

    4. Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
      $ test 5 -lt 4
      Обратите внимание на то, что код завершения команды может быть отличен от нуля не только в тех случаях, когда команда была выполнена с ошибкой. Многие команды используют код завершения, например, для того чтобы показать результаты проверки

    5. Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
      $ 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
      

    6. Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
      # id
      uid=0(root) gid=0(root) Gruppen=0(root)
      

    7. Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
      $ vi ~/.bashrc
      2a3,5
      >    if [ -f /usr/local/etc/bash_completion ]; then
      >         . /usr/local/etc/bash_completion
      >        fi
      

    8. Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
      $ patch ~/.bashrc
      В данном случае изменения применяются к файлу ~/.bashrc

    9. Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.

      Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.

    10. Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.

    11. Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора

    12. Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.

    13. Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.

    14. Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:

      $ whoami
      
      user
      
      $ #^ Интересно, кто я?
      
      в журнале это будет выглядеть так:
      $ whoami
      
      user
      
      Интересно, кто я?

    15. Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:

      $ whoami
      
      user
      
      $ cat > /dev/null #^ Интересно, кто я?
      
      Программа whoami выводит имя пользователя, под которым 
      мы зарегистрировались в системе.
      -
      Она не может ответить на вопрос о нашем назначении 
      в этом мире.
      
      В журнале это будет выглядеть так:
      $ whoami
      user
      
      Интересно, кто я?
      Программа whoami выводит имя пользователя, под которым
      мы зарегистрировались в системе.

      Она не может ответить на вопрос о нашем назначении
      в этом мире.
      Для разделения нескольких абзацев между собой используйте символ "-", один в строке.

    16. Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=

    17. Содержимое файла может быть показано в журнале. Для этого его нужно вывести с помощью программы cat. Если вывод команды отметить симоволами #!, содержимое файла будет показано в журнале в специально отведённой для этого секции.
    18. Для того чтобы вставить скриншот интересующего вас окна в журнал, нужно воспользоваться командой l3shot. После того как команда вызвана, нужно с помощью мыши выбрать окно, которое должно быть в журнале.
    19. Команды в журнале расположены в хронологическом порядке. Если две команды давались одна за другой, но на разных терминалах, в журнале они будут рядом, даже если они не имеют друг к другу никакого отношения.
      1
          2
      3   
          4
      
      Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.

    О программе

    LiLaLo (L3) расшифровывается как Live Lab Log.
    Программа разработана для повышения эффективности обучения Unix/Linux-системам.
    (c) Игорь Чубин, 2004-2008

    $Id$