/l3/users/Sergey-Ma/nt-voip-2014-apr/debian8/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 |
|
#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 |
#cat /usr/local/bin/send-sms
FILENAME="$1" shift for P in `< $FILENAME` do asterisk -rx "datacard sms datacard0 $P $*" echo SMS was sent to $P sleep 2; done |
#less /var/log/asterisk/messages
|
#ls /var/log/asterisk/
cdr-csv/ cdr-custom/ messages queue_log sms.txt |
#less /var/log/asterisk/sms.txt
|
#tail -f /var/log/asterisk/sms.txt
‘2014-04-26 13:50:39 – datacard0 – +380660288333: Hi,aster!’ ^C |
#less /var/log/asterisk/messages
|
#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) ... Reset datacard <device> debian8*CLI> datacard reset datacard0 [Apr 26 14:15:53] ERROR[5563]: __at_response.c:1268 at_response_sms_prompt: [datacard0] Received sms prompt when expecting 'OK' response to 'AT+CMGS', ignoring debian8*CLI> debian8*CLI> datacard reset datacard0 [Apr 26 14:15:55] ERROR[5563]: __at_response.c:1268 at_response_sms_prompt: [datacard0] Received sms prompt when expecting 'OK' response to 'AT+CMGS', ignoring debian8*CLI> debian8*CLI> debian8*CLI> quit Executing last minute cleanups |
#/etc/init.d/asterisk stop
Stopping Asterisk PBX: asterisk. |
#lsmod
Module Size Used by option 37168 0 usb_wwan 17278 1 option usbserial 32061 2 usb_wwan,option usb_storage 43870 0 bnep 17567 2 rfcomm 33700 0 bluetooth 119455 10 rfcomm,bnep binfmt_misc 12957 1 nfsd 216170 2 ... sd_mod 36136 3 crc_t10dif 12348 1 sd_mod ehci_hcd 40215 0 e1000e 120822 0 ahci 24997 2 libahci 22941 1 ahci usbcore 128741 6 ehci_hcd,usb_storage,usbserial,usb_wwan,option usb_common 12354 1 usbcore libata 140630 2 libahci,ahci scsi_mod 162269 5 libata,sd_mod,sg,sr_mod,usb_storage |
#lsmod | head
Module Size Used by option 37168 0 usb_wwan 17278 1 option usbserial 32061 2 usb_wwan,option usb_storage 43870 0 bnep 17567 2 rfcomm 33700 0 bluetooth 119455 10 rfcomm,bnep binfmt_misc 12957 1 nfsd 216170 2 |
#modprobe -r option
|
#modprobe option
|
#tail /var/log/messages
Apr 26 14:16:19 debian8 kernel: [ 7657.456279] usbserial: USB Serial Driver core Apr 26 14:16:19 debian8 kernel: [ 7657.457880] USB Serial support registered for GSM modem (1-port) Apr 26 14:16:19 debian8 kernel: [ 7657.457936] option 1-1.5:1.0: GSM modem (1-port) converter detected Apr 26 14:16:19 debian8 kernel: [ 7657.458063] usb 1-1.5: GSM modem (1-port) converter now attached to ttyUSB0 Apr 26 14:16:19 debian8 kernel: [ 7657.458077] option 1-1.5:1.1: GSM modem (1-port) converter detected Apr 26 14:16:19 debian8 kernel: [ 7657.458496] usb 1-1.5: GSM modem (1-port) converter now attached to ttyUSB1 Apr 26 14:16:19 debian8 kernel: [ 7657.458511] option 1-1.5:1.2: GSM modem (1-port) converter detected Apr 26 14:16:19 debian8 kernel: [ 7657.458803] usb 1-1.5: GSM modem (1-port) converter now attached to ttyUSB2 Apr 26 14:16:19 debian8 kernel: [ 7657.458822] usbcore: registered new interface driver option Apr 26 14:16:19 debian8 kernel: [ 7657.458824] option: v0.7.2:USB Driver for GSM modems |
#date
Sat Apr 26 14:16:27 EEST 2014 |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-6267.14652.19284 2014-04-26 14:17:20.781369159 +0300 +++ /etc/asterisk/extensions.conf 2014-04-26 14:17:35.565368963 +0300 @@ -330,3 +330,5 @@ 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) + +exten => ussd,1,System(echo ‘${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)} – ${DATACARD} – ${CALLERID(num)}: ${SMS}’ >> /var/log/asterisk/ussd.txt) |
#cat /var/log/asterisk/ussd.txt
‘2014-04-26 14:18:00 – datacard0 – ussd: ’ ‘2014-04-26 14:18:42 – datacard0 – ussd: 27.07 UAH, dejstvitelen do 18.04.2015, tarif Super MTS 3D Nol 25. bin boot dev etc home initrd.img lib lib64 lost+found media mnt opt proc root run sbin selinux srv sys tmp usr var vmlinuz Super Internet vsego za 1,06 grn v den! *101*223#’ |
#l3pwd
/users/Sergey-Ma/nt-voip-2014-apr/debian8/root |
#св .гcd .гcd /usr/src/
|
#ls
chan-datacard-read-only vpb-driver.tar.bz2 |
#wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11-current.tar.gz
--2014-04-26 14:27:58-- http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11-current.tar.gz Resolving downloads.asterisk.org (downloads.asterisk.org)... 76.164.171.238, 2001:470:e0d4::ee Connecting to downloads.asterisk.org (downloads.asterisk.org)|76.164.171.238|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 34844777 (33M) [application/x-gzip] Saving to: `asterisk-11-current.tar.gz' 100%[==============================================================================>] 34,844,777 1.63M/s in 37s 2014-04-26 14:28:35 (908 KB/s) - `asterisk-11-current.tar.gz' saved [34844777/34844777] |
#pwd
/usr/src |
#ls
asterisk-11-current.tar.gz chan-datacard-read-only vpb-driver.tar.bz2 |
#tar xf asterisk-11-current.tar.gz
|
#cd asterisk-11
asterisk-11.9.0/ asterisk-11-current.tar.gz |
#cd asterisk-11
asterisk-11.9.0/ asterisk-11-current.tar.gz |
#cd asterisk-11.9.0/
|
#ls
addons cel CREDITS Makefile.moddir_rules sample.call agi ChangeLog default.exports Makefile.rules sounds apps CHANGES doc makeopts.in static-http asterisk-11.9.0-summary.html channels formats menuselect tests asterisk-11.9.0-summary.txt codecs funcs missing UPGRADE-10.txt autoconf config.guess images mkinstalldirs UPGRADE-1.2.txt bootstrap.sh configs include pbx UPGRADE-1.4.txt bridges config.sub install-sh phoneprov UPGRADE-1.6.txt BSDmakefile configure keys README UPGRADE-1.8.txt BUGS configure.ac LICENSE README-addons.txt UPGRADE.txt build_tools contrib main README-SERIOUSLY.bestpractices.txt utils cdr COPYING Makefile res Zaptel-to-DAHDI.txt |
#./configure -- help
configure: WARNING: you should use --build, --host, --target checking build system type... Invalid configuration `help': machine `help' not recognized configure: error: /bin/bash ./config.sub help failed |
#./configure --help
`configure' configures asterisk trunk to adapt to many kinds of systems. Usage: ./configure [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit ... LIBEDIT_LIBS linker flags for LIBEDIT, overriding pkg-config GMIME_CFLAGS C compiler flags for GMIME, overriding pkg-config GMIME_LIBS linker flags for GMIME, overriding pkg-config GTK2_CFLAGS C compiler flags for GTK2, overriding pkg-config GTK2_LIBS linker flags for GTK2, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to <https://issues.asterisk.org>. |
#./configure
checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes ... checking arpa/nameser.h presence... yes checking for arpa/nameser.h... yes checking sys/io.h usability... yes checking sys/io.h presence... yes checking for sys/io.h... yes checking for tgetent in -ltermcap... no checking for tgetent in -ltinfo... no checking for initscr in -lcurses... no checking for initscr in -lncurses... no configure: error: *** termcap support not found (on modern systems, this typically means the ncurses development package is missing) |
#apt-cache search asterisk termcap
|
#apt-cache search termcap
cmucl-source - CMUCL lisp sources colortest - utilities to test color capabilities of terminal ircii - Internet Relay Chat client joe - user friendly full screen text editor jupp - user friendly full screen text editor |
#apt-get install libncurses5
Reading package lists... Done Building dependency tree Reading state information... Done libncurses5 is already the newest version. The following package was automatically installed and is no longer required: asterisk-core-sounds-ru-gsm Use 'apt-get autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded. |
#apt-get install libncurses5-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 extra packages will be installed: libtinfo-dev Suggested packages: ncurses-doc ... Get:1 http://192.168.12.254/debian/ wheezy/main libtinfo-dev amd64 5.9-10 [105 kB] Get:2 http://192.168.12.254/debian/ wheezy/main libncurses5-dev amd64 5.9-10 [223 kB] Fetched 328 kB in 0s (19.8 MB/s) Selecting previously unselected package libtinfo-dev:amd64. (Reading database ... 139553 files and directories currently installed.) Unpacking libtinfo-dev:amd64 (from .../libtinfo-dev_5.9-10_amd64.deb) ... Selecting previously unselected package libncurses5-dev. Unpacking libncurses5-dev (from .../libncurses5-dev_5.9-10_amd64.deb) ... Setting up libtinfo-dev:amd64 (5.9-10) ... Setting up libncurses5-dev (5.9-10) ... |
#./configure
checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes ... checking for initscr in -lcurses... yes checking curses.h usability... yes checking curses.h presence... yes checking for curses.h... yes checking for initscr in -lncurses... yes checking for curses.h... (cached) yes checking for xml2-config... no configure: *** XML documentation will not be available because the 'libxml2' development package is missing. configure: *** Please run the 'configure' script with the '--disable-xmldoc' parameter option configure: *** or install the 'libxml2' development package. |
#./configure -desablexmdoc
configure: error: unrecognized option: `-desablexmdoc' Try `./configure --help' for more information |
#./configure -disablexmdoc
configure: error: unrecognized option: `-disablexmdoc' Try `./configure --help' for more information |
#./configure -- help
configure: WARNING: you should use --build, --host, --target checking build system type... Invalid configuration `help': machine `help' not recognized configure: error: /bin/bash ./config.sub help failed |
#./configure --help
`configure' configures asterisk trunk to adapt to many kinds of systems. Usage: ./configure [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit ... LIBEDIT_LIBS linker flags for LIBEDIT, overriding pkg-config GMIME_CFLAGS C compiler flags for GMIME, overriding pkg-config GMIME_LIBS linker flags for GMIME, overriding pkg-config GTK2_CFLAGS C compiler flags for GTK2, overriding pkg-config GTK2_LIBS linker flags for GTK2, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to <https://issues.asterisk.org>. |
#./configure --help
`configure' configures asterisk trunk to adapt to many kinds of systems. Usage: ./configure [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit ... LIBEDIT_LIBS linker flags for LIBEDIT, overriding pkg-config GMIME_CFLAGS C compiler flags for GMIME, overriding pkg-config GMIME_LIBS linker flags for GMIME, overriding pkg-config GTK2_CFLAGS C compiler flags for GTK2, overriding pkg-config GTK2_LIBS linker flags for GTK2, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to <https://issues.asterisk.org>. |
#./configure --disable-xmldoc
checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes ... checking for rc_read_config in -lradiusclient-ng... no checking for cpg_join in -lcpg... no checking for corosync_cfg_state_track in -lcfg... no checking for speex_encode in -lspeex... no checking for speex_preprocess_ctl in -lspeex... no checking for speex_preprocess_ctl in -lspeexdsp... no checking for sqlite_exec in -lsqlite... no checking for sqlite3_open in -lsqlite3... no configure: WARNING: *** Asterisk now uses SQLite3 for the internal Asterisk database. configure: WARNING: *** Please install the SQLite3 development package. |
#apt-get install libsqllite3-dev
Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package libsqllite3-dev |
#apt-get install libsqlite3-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. Suggested packages: sqlite3-doc The following NEW packages will be installed: libsqlite3-dev 0 upgraded, 1 newly installed, 0 to remove and 6 not upgraded. Need to get 578 kB of archives. After this operation, 1,382 kB of additional disk space will be used. Get:1 http://192.168.12.254/debian/ wheezy/main libsqlite3-dev amd64 3.7.13-1+deb7u1 [578 kB] Fetched 578 kB in 0s (23.7 MB/s) Selecting previously unselected package libsqlite3-dev. (Reading database ... 139601 files and directories currently installed.) Unpacking libsqlite3-dev (from .../libsqlite3-dev_3.7.13-1+deb7u1_amd64.deb) ... Setting up libsqlite3-dev (3.7.13-1+deb7u1) ... |
#./configure --disable-xmldoc
checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes ... $$$$$ $$$ $$$$7. $$ (TM) $$$$$$$. .7$$$$$$ $$ $$$$$$$$$$$$7$$$$$$$$$.$$$$$$ $$$$$$$$$$$$$$$$. configure: Package configured for: configure: OS type : linux-gnu configure: Host CPU : x86_64 configure: build-cpu:vendor:os: x86_64 : unknown : linux-gnu : configure: host-cpu:vendor:os: x86_64 : unknown : linux-gnu : |
#make menuconfig
************************************************** Asterisk Module and Build Option Selection ************************************************** Press 'h' for help. --- core --- [*] app_authenticate [*] app_cdr [*] app_celgenuserevent [*] app_channelredirect [*] app_chanspy ... Compiler Flags Voicemail Build Options Utilities AGI Samples Module Embedding Core Sound Packages Music On Hold File Packages Extras Sound Packages menuselect changes NOT saved! make[1]: Leaving directory `/usr/src/asterisk-11.9.0' |
#apt-cache search libopenssl-dev
|
#apt-cache search libopenssl
libruby - Libraries necessary to run Ruby libruby1.8 - Libraries necessary to run Ruby 1.8 libruby1.9.1 - Libraries necessary to run Ruby 1.9.1 |
#apt-get install libssl-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 extra packages will be installed: libssl-doc zlib1g-dev The following NEW packages will be installed: libssl-dev libssl-doc zlib1g-dev ... (Reading database ... 139612 files and directories currently installed.) Unpacking zlib1g-dev:amd64 (from .../zlib1g-dev_1%3a1.2.7.dfsg-13_amd64.deb) ... Selecting previously unselected package libssl-dev. Unpacking libssl-dev (from .../libssl-dev_1.0.1e-2+deb7u7_amd64.deb) ... Selecting previously unselected package libssl-doc. Unpacking libssl-doc (from .../libssl-doc_1.0.1e-2+deb7u7_all.deb) ... Processing triggers for man-db ... Setting up zlib1g-dev:amd64 (1:1.2.7.dfsg-13) ... Setting up libssl-dev (1.0.1e-2+deb7u7) ... Setting up libssl-doc (1.0.1e-2+deb7u7) ... |
#apt-get install libsrtp0-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: libsrtp0-dev 0 upgraded, 1 newly installed, 0 to remove and 6 not upgraded. Need to get 117 kB of archives. After this operation, 390 kB of additional disk space will be used. Get:1 http://192.168.12.254/debian/ wheezy/main libsrtp0-dev amd64 1.4.4+20100615~dfsg-2+deb7u1 [117 kB] Fetched 117 kB in 0s (1,061 kB/s) Selecting previously unselected package libsrtp0-dev. (Reading database ... 141050 files and directories currently installed.) Unpacking libsrtp0-dev (from .../libsrtp0-dev_1.4.4+20100615~dfsg-2+deb7u1_amd64.deb) ... Setting up libsrtp0-dev (1.4.4+20100615~dfsg-2+deb7u1) ... |
#./configure --disable-xmldoc
checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes ... $$$$$ $$$ $$$$7. $$ (TM) $$$$$$$. .7$$$$$$ $$ $$$$$$$$$$$$7$$$$$$$$$.$$$$$$ $$$$$$$$$$$$$$$$. configure: Package configured for: configure: OS type : linux-gnu configure: Host CPU : x86_64 configure: build-cpu:vendor:os: x86_64 : unknown : linux-gnu : configure: host-cpu:vendor:os: x86_64 : unknown : linux-gnu : |
#make menuconfig
************************************************** Asterisk Module and Build Option Selection ************************************************** Press 'h' for help. --- core --- [*] res_adsi [*] res_agi [*] res_calendar XXX res_calendar_caldav XXX res_calendar_ews ... XXX res_config_odbc [*] res_config_sqlite3 [*] res_convert [*] res_crypto XXX res_curl [*] res_fax ... More ... Generic FAX Applications Depends on: curl(E) Support Level: core |
#apt-cache search dahdi
asterisk-dahdi - DAHDI devices support for the Asterisk PBX dahdi-linux - DAHDI telephony interface - Linux userspace parts dahdi-source - DAHDI telephony interface - source code for kernel driver dahdi - utilities for using the DAHDI kernel modules libtonezone-dev - tonezone library (development) libtonezone2.0 - tonezone library (runtime) libopenr2-3 - MFC/R2 (telephony) call setup library libopenr2-bin - MFC/R2 (telephony) call setup library - test programs libopenr2-dev - MFC/R2 (telephony) call setup library - development headers yate-dahdi - Dahdi support for YATE |
#apt-get install dahdi-linux
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: fxload The following NEW packages will be installed: dahdi-linux fxload ... Get:2 http://192.168.12.254/debian/ wheezy/main dahdi-linux all 1:2.6.1+dfsg2-1 [91.3 kB] Fetched 108 kB in 0s (7,049 kB/s) Selecting previously unselected package fxload. (Reading database ... 141096 files and directories currently installed.) Unpacking fxload (from .../fxload_0.0.20081013-1_amd64.deb) ... Selecting previously unselected package dahdi-linux. Unpacking dahdi-linux (from .../dahdi-linux_1%3a2.6.1+dfsg2-1_all.deb) ... Processing triggers for man-db ... Setting up fxload (0.0.20081013-1) ... Setting up dahdi-linux (1:2.6.1+dfsg2-1) ... |
#apt-cache search dahdi
asterisk-dahdi - DAHDI devices support for the Asterisk PBX dahdi-linux - DAHDI telephony interface - Linux userspace parts dahdi-source - DAHDI telephony interface - source code for kernel driver dahdi - utilities for using the DAHDI kernel modules libtonezone-dev - tonezone library (development) libtonezone2.0 - tonezone library (runtime) libopenr2-3 - MFC/R2 (telephony) call setup library libopenr2-bin - MFC/R2 (telephony) call setup library - test programs libopenr2-dev - MFC/R2 (telephony) call setup library - development headers yate-dahdi - Dahdi support for YATE |
#find /usr -name \*dahdi\*.h
^C |
#find /usr/include -name \*dahdi\*.h
|
#^C
|
#find /usr/src -name \*dahdi\*.h
|
#^C
|
#find /usr/src/ -name \*dahdi\*.h
|
#find /usr -name \*dahdi\*.h
|
#cd /usr/src/
|
#apt-get install libtimezon-dev
Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package libtimezon-dev |
#make
make: *** No targets specified and no makefile found. Stop. |
#make
make: *** No targets specified and no makefile found. Stop. |
#cd asterisk-11.9.0/
|
#make menuconfig
Press 'h' for help. ---> Add-ons (See README-addons.txt) Applications Bridging Modules Call Detail Recording Channel Event Logging Channel Drivers Codec Translators Format Interpreters Dialplan Functions ... Compiler Flags Voicemail Build Options Utilities AGI Samples Module Embedding Core Sound Packages Music On Hold File Packages Extras Sound Packages menuselect changes NOT saved! make[1]: Leaving directory `/usr/src/asterisk-11.9.0' |
#apt-get install libportaudio-0dev
Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package libportaudio-0dev |
#apt-get install libportaudio-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 extra packages will be installed: libportaudio0 Suggested packages: libportaudio-doc ... Get:1 http://192.168.12.254/debian/ wheezy/main libportaudio0 amd64 18.1-7.1 [17.4 kB] Get:2 http://192.168.12.254/debian/ wheezy/main libportaudio-dev amd64 18.1-7.1 [22.9 kB] Fetched 40.2 kB in 0s (3,180 kB/s) Selecting previously unselected package libportaudio0. (Reading database ... 141129 files and directories currently installed.) Unpacking libportaudio0 (from .../libportaudio0_18.1-7.1_amd64.deb) ... Selecting previously unselected package libportaudio-dev. Unpacking libportaudio-dev (from .../libportaudio-dev_18.1-7.1_amd64.deb) ... Setting up libportaudio0 (18.1-7.1) ... Setting up libportaudio-dev (18.1-7.1) ... |
#make
CC="cc" CXX="" LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts make[1]: Entering directory `/usr/src/asterisk-11.9.0/menuselect' make[1]: `makeopts' is up to date. make[1]: Leaving directory `/usr/src/asterisk-11.9.0/menuselect' menuselect/menuselect --check-deps menuselect.makeopts menuselect/menuselect --check-deps menuselect.makeopts Generating embedded module rules ... [CC] astcanary.c -> astcanary.o [LD] astcanary.o -> astcanary [CC] astdb2sqlite3.c -> astdb2sqlite3.o ... creating makelist creating config.h [LD] abstract_jb.o acl.o adsi.o alaw.o aoc.o app.o ast_expr2.o ast_expr2f.o asterisk.o astfd.o astmm.o astobj2.o audiohook.o autochan.o autoservice.o bridging.o callerid.o ccss.o cdr.o cel.o channel.o channel_internal_api.o chanvars.o cli.o config.o config_options.o data.o datastore.o db.o devicestate.o dial.o dns.o dnsmgr.o dsp.o enum.o event.o features.o file.o fixedjitterbuf.o format.o forma Building Documentation For: channels pbx apps codecs formats cdr cel bridges funcs tests main res addons +--------- Asterisk Build Complete ---------+ + Asterisk has successfully been built, and + + can be installed by running: + + + + make install + +-------------------------------------------+ |
#make menuconfig
CC="cc" CXX="" LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts make[1]: Entering directory `/usr/src/asterisk-11.9.0/menuselect' make[1]: `makeopts' is up to date. make[1]: Leaving directory `/usr/src/asterisk-11.9.0/menuselect' CC="cc" CXX="" LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" nmenuselect make[1]: Entering directory `/usr/src/asterisk-11.9.0/menuselect' make[1]: Nothing to be done for `nmenuselect'. make[1]: Leaving directory `/usr/src/asterisk-11.9.0/menuselect' CC="cc" CXX="" LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" gmenuselect make[1]: Entering directory `/usr/src/asterisk-11.9.0/menuselect' make[1]: Nothing to be done for `gmenuselect'. make[1]: Leaving directory `/usr/src/asterisk-11.9.0/menuselect' make[1]: Entering directory `/usr/src/asterisk-11.9.0' CC="cc" CXX="" LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts make[2]: Entering directory `/usr/src/asterisk-11.9.0/menuselect' make[2]: `makeopts' is up to date. make[2]: Leaving directory `/usr/src/asterisk-11.9.0/menuselect' |
#apt-get install libtonezone-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 extra packages will be installed: libtonezone2.0 The following NEW packages will be installed: libtonezone-dev libtonezone2.0 ... Get:1 http://192.168.12.254/debian/ wheezy/main libtonezone2.0 amd64 1:2.5.0.1-2 [49.8 kB] Get:2 http://192.168.12.254/debian/ wheezy/main libtonezone-dev amd64 1:2.5.0.1-2 [50.2 kB] Fetched 100 kB in 0s (780 kB/s) Selecting previously unselected package libtonezone2.0. (Reading database ... 141141 files and directories currently installed.) Unpacking libtonezone2.0 (from .../libtonezone2.0_1%3a2.5.0.1-2_amd64.deb) ... Selecting previously unselected package libtonezone-dev. Unpacking libtonezone-dev (from .../libtonezone-dev_1%3a2.5.0.1-2_amd64.deb) ... Setting up libtonezone2.0 (1:2.5.0.1-2) ... Setting up libtonezone-dev (1:2.5.0.1-2) ... |
#apt-get install dahdi-source
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: dahdi-source 0 upgraded, 1 newly installed, 0 to remove and 6 not upgraded. Need to get 906 kB of archives. After this operation, 1,020 kB of additional disk space will be used. Get:1 http://192.168.12.254/debian/ wheezy/main dahdi-source all 1:2.6.1+dfsg2-1 [906 kB] Fetched 906 kB in 0s (27.6 MB/s) Selecting previously unselected package dahdi-source. (Reading database ... 141156 files and directories currently installed.) Unpacking dahdi-source (from .../dahdi-source_1%3a2.6.1+dfsg2-1_all.deb) ... Setting up dahdi-source (1:2.6.1+dfsg2-1) ... |
#make
CC="cc" CXX="" LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts make[1]: Entering directory `/usr/src/asterisk-11.9.0/menuselect' make[1]: `makeopts' is up to date. make[1]: Leaving directory `/usr/src/asterisk-11.9.0/menuselect' +--------- Asterisk Build Complete ---------+ + Asterisk has successfully been built, and + + can be installed by running: + + + + make install + +-------------------------------------------+ |
#./configure --disable-xmldoc
checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes ... $$$$$ $$$ $$$$7. $$ (TM) $$$$$$$. .7$$$$$$ $$ $$$$$$$$$$$$7$$$$$$$$$.$$$$$$ $$$$$$$$$$$$$$$$. configure: Package configured for: configure: OS type : linux-gnu configure: Host CPU : x86_64 configure: build-cpu:vendor:os: x86_64 : unknown : linux-gnu : configure: host-cpu:vendor:os: x86_64 : unknown : linux-gnu : |
#make
CC="cc" CXX="" LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts make[1]: Entering directory `/usr/src/asterisk-11.9.0/menuselect' make[1]: `makeopts' is up to date. make[1]: Leaving directory `/usr/src/asterisk-11.9.0/menuselect' Generating input for menuselect ... menuselect/menuselect --check-deps menuselect.makeopts menuselect/menuselect --check-deps menuselect.makeopts Generating embedded module rules ... [CC] astdb2sqlite3.c -> astdb2sqlite3.o [LD] astdb2sqlite3.o db1-ast/libdb1.a -> astdb2sqlite3 ... [LD] res_timing_timerfd.o -> res_timing_timerfd.so [CC] res_timing_dahdi.c -> res_timing_dahdi.o [LD] res_timing_dahdi.o -> res_timing_dahdi.so Building Documentation For: channels pbx apps codecs formats cdr cel bridges funcs tests main res addons +--------- Asterisk Build Complete ---------+ + Asterisk has successfully been built, and + + can be installed by running: + + + + make install + +-------------------------------------------+ |
#apt-get install libspeexdsp-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 extra packages will be installed: libspeex-dev Suggested packages: pkg-config ... Get:1 http://192.168.12.254/debian/ wheezy/main libspeex-dev amd64 1.2~rc1-7 [82.0 kB] Get:2 http://192.168.12.254/debian/ wheezy/main libspeexdsp-dev amd64 1.2~rc1-7 [60.0 kB] Fetched 142 kB in 0s (1,713 kB/s) Selecting previously unselected package libspeex-dev:amd64. (Reading database ... 141166 files and directories currently installed.) Unpacking libspeex-dev:amd64 (from .../libspeex-dev_1.2~rc1-7_amd64.deb) ... Selecting previously unselected package libspeexdsp-dev:amd64. Unpacking libspeexdsp-dev:amd64 (from .../libspeexdsp-dev_1.2~rc1-7_amd64.deb) ... Setting up libspeex-dev:amd64 (1.2~rc1-7) ... Setting up libspeexdsp-dev:amd64 (1.2~rc1-7) ... |
#make
CC="cc" CXX="" LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts make[1]: Entering directory `/usr/src/asterisk-11.9.0/menuselect' make[1]: `makeopts' is up to date. make[1]: Leaving directory `/usr/src/asterisk-11.9.0/menuselect' +--------- Asterisk Build Complete ---------+ + Asterisk has successfully been built, and + + can be installed by running: + + + + make install + +-------------------------------------------+ |
#./configure --disable-xmldoc
checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes ... $$$$$ $$$ $$$$7. $$ (TM) $$$$$$$. .7$$$$$$ $$ $$$$$$$$$$$$7$$$$$$$$$.$$$$$$ $$$$$$$$$$$$$$$$. configure: Package configured for: configure: OS type : linux-gnu configure: Host CPU : x86_64 configure: build-cpu:vendor:os: x86_64 : unknown : linux-gnu : configure: host-cpu:vendor:os: x86_64 : unknown : linux-gnu : |
#m-a ai dahdi
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ 100% │ │ │ └─────────────────────────────────────────────────────────────────────────┘ Done with /usr/src/dahdi-modules-3.2.0-4-amd64_2.6.1+dfsg2-1+3.2.54-2_amd64.deb . dpkg -Ei /usr/src/dahdi-modules-3.2.0-4-amd64_2.6.1+dfsg2-1+3.2.54-2_amd64.deb Selecting previously unselected package dahdi-modules-3.2.0-4-amd64. (Reading database ... 150241 files and directories currently installed.) Unpacking dahdi-modules-3.2.0-4-amd64 (from .../dahdi-modules-3.2.0-4-amd64_2.6.1+dfsg2-1+3.2.54-2_amd64.deb) ... Setting up dahdi-modules-3.2.0-4-amd64 (1:2.6.1+dfsg2-1+3.2.54-2) ... |
#./configure --disable-xmldoc
checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes ... $$$$$ $$$ $$$$7. $$ (TM) $$$$$$$. .7$$$$$$ $$ $$$$$$$$$$$$7$$$$$$$$$.$$$$$$ $$$$$$$$$$$$$$$$. configure: Package configured for: configure: OS type : linux-gnu configure: Host CPU : x86_64 configure: build-cpu:vendor:os: x86_64 : unknown : linux-gnu : configure: host-cpu:vendor:os: x86_64 : unknown : linux-gnu : |
#make menuconfig
Press 'h' for help. Add-ons (See README-addons.txt) Applications Bridging Modules Call Detail Recording Channel Event Logging Channel Drivers Codec Translators ---> Format Interpreters Dialplan Functions ... Compiler Flags Voicemail Build Options Utilities AGI Samples Module Embedding Core Sound Packages Music On Hold File Packages Extras Sound Packages menuselect changes NOT saved! make[1]: Leaving directory `/usr/src/asterisk-11.9.0' |
#/etc/init.d/asterisk
Usage: /etc/init.d/asterisk {start|stop|restart|reload|status|debug|logger-reload|extensions-reload|restart-convenient|force-reload} |
#/etc/init.d/asterisk stop
Stopping Asterisk PBX: asterisk. |
#mkdir /usr/src/conf
|
#cp /etc/asterisk/*.conf /usr/src/conf/
|
#apt-get remove asterisk
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 packages will be REMOVED: asterisk asterisk-prompt-de asterisk-voicemail 0 upgraded, 0 newly installed, 3 to remove and 6 not upgraded. After this operation, 6,174 kB disk space will be freed. Do you want to continue [Y/n]? y (Reading database ... 150295 files and directories currently installed.) Removing asterisk-prompt-de ... Removing asterisk-voicemail ... Removing asterisk ... Stopping Asterisk PBX: asterisk. Processing triggers for man-db ... |
#apt-get autoremove
Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: asterisk-config asterisk-core-sounds-en asterisk-core-sounds-en-gsm asterisk-core-sounds-ru-gsm asterisk-modules asterisk-moh-opsound-gsm freetds-common libcurl3 libiksemel3 libodbc1 libpq5 libradiusclient-ng2 libresample1 libsaclm3 libsaevt3 libsensors4 libsnmp-base libsnmp15 libsqlite0 libsybdb5 libvpb0 sox vpb-driver-source 0 upgraded, 0 newly installed, 23 to remove and 6 not upgraded. After this operation, 25.1 MB disk space will be freed. Do you want to continue [Y/n]? y ... Removing libsaevt3 ... Removing libsnmp15 ... Removing libsensors4:amd64 ... Removing libsnmp-base ... Removing libsqlite0 ... Removing libvpb0 ... Removing sox ... Removing vpb-driver-source ... Processing triggers for man-db ... Processing triggers for mime-support ... |
#ls -la /etc/asterisk/
total 824 drwxr-xr-x 3 asterisk asterisk 4096 Apr 26 14:19 . drwxr-xr-x 136 root root 12288 Apr 26 15:22 .. -rw-r----- 1 asterisk asterisk 140 Jan 4 03:07 adsi.conf -rw-r----- 1 asterisk asterisk 2788 Apr 26 09:06 agents.conf -rw-r----- 1 asterisk asterisk 2904 Jan 4 03:07 ais.conf -rw-r----- 1 asterisk asterisk 2084 Jan 4 03:07 alarmreceiver.conf -rw-r----- 1 asterisk asterisk 3498 Jan 4 03:07 alsa.conf -rw-r----- 1 asterisk asterisk 767 Jan 4 03:07 amd.conf -rw-r----- 1 asterisk asterisk 1044 Jan 4 03:07 app_mysql.conf ... -rw-r----- 1 asterisk asterisk 742 Jan 4 03:07 sip_notify.conf -rw-r----- 1 asterisk asterisk 9185 Jan 4 03:07 skinny.conf -rw-r----- 1 asterisk asterisk 6774 Jan 4 03:07 sla.conf -rw-r----- 1 asterisk asterisk 2669 Jan 4 03:07 smdi.conf -rw-r----- 1 asterisk asterisk 1384 Jan 4 03:07 telcordia-1.adsi -rw-r----- 1 asterisk asterisk 656 Jan 4 03:07 udptl.conf -rw-r----- 1 asterisk asterisk 5096 Jan 4 03:07 unistim.conf -rw-r----- 1 asterisk asterisk 2423 Jan 4 03:07 users.conf -rw-r----- 1 asterisk asterisk 21331 Apr 24 13:24 voicemail.conf -rw-r----- 1 asterisk asterisk 5939 Jan 4 03:07 vpb.conf |
#./configure --disable-xmldoc --prefix=/usr/lib/asterisk
checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes ... $$$$$ $$$ $$$$7. $$ (TM) $$$$$$$. .7$$$$$$ $$ $$$$$$$$$$$$7$$$$$$$$$.$$$$$$ $$$$$$$$$$$$$$$$. configure: Package configured for: configure: OS type : linux-gnu configure: Host CPU : x86_64 configure: build-cpu:vendor:os: x86_64 : unknown : linux-gnu : configure: host-cpu:vendor:os: x86_64 : unknown : linux-gnu : |
#/etc/init.d/asterisk start
|
#asterisk -rvvvvv
l3script: /usr/sbin/asterisk: No such file or directory |
#make
CC="cc" CXX="" LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts make[1]: Entering directory `/usr/src/asterisk-11.9.0/menuselect' make[1]: `makeopts' is up to date. make[1]: Leaving directory `/usr/src/asterisk-11.9.0/menuselect' Generating input for menuselect ... menuselect/menuselect --check-deps menuselect.makeopts menuselect/menuselect --check-deps menuselect.makeopts Generating embedded module rules ... [CC] astdb2sqlite3.c -> astdb2sqlite3.o [LD] astdb2sqlite3.o db1-ast/libdb1.a -> astdb2sqlite3 ... [LD] res_timing_pthread.o -> res_timing_pthread.so [CC] res_timing_timerfd.c -> res_timing_timerfd.o [LD] res_timing_timerfd.o -> res_timing_timerfd.so Building Documentation For: channels pbx apps codecs formats cdr cel bridges funcs tests main res addons +--------- Asterisk Build Complete ---------+ + Asterisk has successfully been built, and + + can be installed by running: + + + + make install + +-------------------------------------------+ |
#make install
CC="cc" CXX="" LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts make[1]: Entering directory `/usr/src/asterisk-11.9.0/menuselect' make[1]: `makeopts' is up to date. make[1]: Leaving directory `/usr/src/asterisk-11.9.0/menuselect' Installing modules from channels... Installing modules from pbx... Installing modules from apps... Installing modules from codecs... Installing modules from formats... Installing modules from cdr... ... +----------------- or ---------------------+ + + + You can go ahead and install the asterisk + + program documentation now or later run: + + + + make progdocs + + + + **Note** This requires that you have + + doxygen installed on your local system + +-------------------------------------------+ |
#/etc/init.d/asterisk start
|
#ps aux | grep asterisk
root 24260 0.0 0.0 7832 880 pts/5 S+ 15:30 0:00 grep asterisk |
#ps aux | grep [a]sterisk
|
#ls -la /etc/init.d/
total 368 drwxr-xr-x 2 root root 4096 Apr 26 15:16 . drwxr-xr-x 136 root root 12288 Apr 26 15:22 .. -rwxr-xr-x 1 root root 2227 Apr 15 2013 acpid -rwxr-xr-x 1 root root 5195 Sep 6 2011 alsa-utils -rwxr-xr-x 1 root root 2014 May 21 2012 anacron -rwxr-xr-x 1 root root 5391 Jan 4 02:22 asterisk -rwxr-xr-x 1 root root 1071 Jun 25 2011 atd -rwxr-xr-x 1 root root 2253 Mar 7 2013 avahi-daemon -rwxr-xr-x 1 root root 1175 Nov 22 2010 binfmt-support ... -rwxr-xr-x 1 root root 3881 Apr 3 01:45 ssh -rwxr-xr-x 1 root root 714 Jun 28 2012 sudo -rwxr-xr-x 1 root root 8827 Nov 9 2012 udev -rwxr-xr-x 1 root root 1179 Aug 20 2012 udev-mtab -rwxr-xr-x 1 root root 2721 Apr 10 2013 umountfs -rwxr-xr-x 1 root root 2195 Apr 10 2013 umountnfs.sh -rwxr-xr-x 1 root root 1122 Oct 15 2012 umountroot -rwxr-xr-x 1 root root 1281 Jan 21 2013 unattended-upgrades -rwxr-xr-x 1 root root 3111 Oct 15 2012 urandom -rwxr-xr-x 1 root root 2666 Mar 2 2012 x11-common |
#ls -la /etc/init.d/as*
-rwxr-xr-x 1 root root 5391 Jan 4 02:22 /etc/init.d/asterisk |
FILENAME="$1" shift for P in `< $FILENAME` do asterisk -rx "datacard sms datacard0 $P $*" echo SMS was sent to $P sleep 2; done
‘2014-04-26 14:18:00 – datacard0 – ussd: ’ ‘2014-04-26 14:18:42 – datacard0 – ussd: 27.07 UAH, dejstvitelen do 18.04.2015, tarif Super MTS 3D Nol 25. bin boot dev etc home initrd.img lib lib64 lost+found media mnt opt proc root run sbin selinux srv sys tmp usr var vmlinuz Super Internet vsego za 1,06 grn v den! *101*223#’
Время первой команды журнала | 13:02:48 2014- 4-26 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 14:30:58 2014- 4-26 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 13.86 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.99 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.47 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.15 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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