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

Содержание

Журнал

Пятница (11/28/14)

/dev/pts/1
14:24:50
#vim /etc/asterisk/cdr.conf
/dev/pts/0
14:24:50
#vim /etc/asterisk/cdr.conf
/dev/pts/1
14:26:19
#mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
/dev/pts/0
14:26:19
#mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
/dev/pts/1
14:26:26
#mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 62
Server version: 5.5.40-0+wheezy1 (Debian)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use asterisk;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> select * from cdr;
Empty set (0.00 sec)
mysql> ^CCtrl-C -- exit!
Aborted
/dev/pts/0
14:26:26
#mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 62
Server version: 5.5.40-0+wheezy1 (Debian)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use asterisk;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> select * from cdr;
Empty set (0.00 sec)
mysql> ^CCtrl-C -- exit!
Aborted
/dev/pts/1
14:29:52
#ps -ax | grep aster
warning: bad ps syntax, perhaps a bogus '-'?
See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ
 9266 ?        S      0:00 astcanary /var/run/asterisk/alt.asterisk.canary.tweet.tweet.tweet 9265
 9324 pts/2    S+     0:00 grep aster
/dev/pts/0
14:29:52
#ps -ax | grep aster
warning: bad ps syntax, perhaps a bogus '-'?
See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ
 9266 ?        S      0:00 astcanary /var/run/asterisk/alt.asterisk.canary.tweet.tweet.tweet 9265
 9324 pts/2    S+     0:00 grep aster
/dev/pts/1
14:29:53
#ps -ax | grep aster
warning: bad ps syntax, perhaps a bogus '-'?
See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ
 9266 ?        S      0:00 astcanary /var/run/asterisk/alt.asterisk.canary.tweet.tweet.tweet 9265
 9333 pts/2    S+     0:00 grep aster
14:29:53
#ps -ax | grep aster
warning: bad ps syntax, perhaps a bogus '-'?
See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ
 9342 pts/2    S+     0:00 grep aster
/dev/pts/0
14:29:53
#ps -ax | grep aster
warning: bad ps syntax, perhaps a bogus '-'?
See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ
 9266 ?        S      0:00 astcanary /var/run/asterisk/alt.asterisk.canary.tweet.tweet.tweet 9265
 9333 pts/2    S+     0:00 grep aster
14:29:53
#ps -ax | grep aster
warning: bad ps syntax, perhaps a bogus '-'?
See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ
 9342 pts/2    S+     0:00 grep aster
/dev/pts/1
14:29:54
#ps -ax | grep aster
warning: bad ps syntax, perhaps a bogus '-'?
See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ
 9351 pts/2    S+     0:00 grep aster
/dev/pts/0
14:29:54
#ps -ax | grep aster
warning: bad ps syntax, perhaps a bogus '-'?
See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ
 9351 pts/2    S+     0:00 grep aster
/dev/pts/1
14:29:55
#ps -ax | grep aster
warning: bad ps syntax, perhaps a bogus '-'?
See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ
 9360 pts/2    S+     0:00 grep aster
/dev/pts/0
14:29:55
#ps -ax | grep aster
warning: bad ps syntax, perhaps a bogus '-'?
See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ
 9360 pts/2    S+     0:00 grep aster
/dev/pts/1
14:29:56
#ps -ax | grep aster
warning: bad ps syntax, perhaps a bogus '-'?
See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ
 9369 pts/2    S+     0:00 grep aster
/dev/pts/0
14:29:56
#ps -ax | grep aster
warning: bad ps syntax, perhaps a bogus '-'?
See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ
 9369 pts/2    S+     0:00 grep aster
/dev/pts/1
14:29:57
#ps -ax | grep aster
warning: bad ps syntax, perhaps a bogus '-'?
See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ
 9378 pts/2    S+     0:00 grep aster
/dev/pts/0
14:29:57
#ps -ax | grep aster
warning: bad ps syntax, perhaps a bogus '-'?
See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ
 9378 pts/2    S+     0:00 grep aster
/dev/pts/1
14:29:58
#ps -ax | grep aster
warning: bad ps syntax, perhaps a bogus '-'?
See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ
 9387 pts/2    S+     0:00 grep aster
/dev/pts/0
14:29:58
#ps -ax | grep aster
warning: bad ps syntax, perhaps a bogus '-'?
See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ
 9387 pts/2    S+     0:00 grep aster
/dev/pts/1
14:29:59
#more /var/lo
/dev/pts/0
14:29:59
#more /var/lo
/dev/pts/1
14:29:59
#more /var/log/asterisk/
/dev/pts/0
14:29:59
#more /var/log/asterisk/
/dev/pts/1
14:30:25
#ls -l /var/log/asterisk/
total 988
drwxr-xr-x 2 asterisk asterisk   4096 Nov 24 18:07 cdr-csv
drwxr-xr-x 2 asterisk asterisk   4096 Jan  4  2014 cdr-custom
-rw-rw---- 1 asterisk asterisk 993949 Nov 28 15:29 messages
-rw-rw---- 1 asterisk asterisk   1379 Nov 27 16:07 queue_log
/dev/pts/0
14:30:25
#ls -l /var/log/asterisk/
total 988
drwxr-xr-x 2 asterisk asterisk   4096 Nov 24 18:07 cdr-csv
drwxr-xr-x 2 asterisk asterisk   4096 Jan  4  2014 cdr-custom
-rw-rw---- 1 asterisk asterisk 993949 Nov 28 15:29 messages
-rw-rw---- 1 asterisk asterisk   1379 Nov 27 16:07 queue_log
/dev/pts/1
14:33:16
#ps -ax | grep aster
warning: bad ps syntax, perhaps a bogus '-'?
See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ
 9579 ?        Ssl    0:00 /usr/sbin/asterisk -p -U asterisk
 9580 ?        S      0:00 astcanary /var/run/asterisk/alt.asterisk.canary.tweet.tweet.tweet 9579
 9641 pts/2    S+     0:00 grep aster
/dev/pts/0
14:33:16
#ps -ax | grep aster
warning: bad ps syntax, perhaps a bogus '-'?
See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ
 9579 ?        Ssl    0:00 /usr/sbin/asterisk -p -U asterisk
 9580 ?        S      0:00 astcanary /var/run/asterisk/alt.asterisk.canary.tweet.tweet.tweet 9579
 9641 pts/2    S+     0:00 grep aster
/dev/pts/1
14:33:17
#ps -ax | grep aster
warning: bad ps syntax, perhaps a bogus '-'?
See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ
 9579 ?        Ssl    0:00 /usr/sbin/asterisk -p -U asterisk
 9580 ?        S      0:00 astcanary /var/run/asterisk/alt.asterisk.canary.tweet.tweet.tweet 9579
 9650 pts/2    S+     0:00 grep aster
/dev/pts/0
14:33:17
#ps -ax | grep aster
warning: bad ps syntax, perhaps a bogus '-'?
See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ
 9579 ?        Ssl    0:00 /usr/sbin/asterisk -p -U asterisk
 9580 ?        S      0:00 astcanary /var/run/asterisk/alt.asterisk.canary.tweet.tweet.tweet 9579
 9650 pts/2    S+     0:00 grep aster
/dev/pts/1
14:34:21
#mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 65
Server version: 5.5.40-0+wheezy1 (Debian)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use asterisk;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> select * from cdr;
Empty set (0.00 sec)
mysql> ^CCtrl-C -- exit!
Aborted
/dev/pts/0
14:34:21
#mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 65
Server version: 5.5.40-0+wheezy1 (Debian)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use asterisk;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> select * from cdr;
Empty set (0.00 sec)
mysql> ^CCtrl-C -- exit!
Aborted
/dev/pts/1
14:36:24
#[ ]

/dev/pts/0
14:36:24
#[ ]

/dev/pts/1
14:36:47
#mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 67
Server version: 5.5.40-0+wheezy1 (Debian)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use asterisk;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> select * from cdr;
Empty set (0.00 sec)
mysql> select * from cdr;
Empty set (0.00 sec)
mysql> ^CCtrl-C -- exit!
Aborted
/dev/pts/0
14:36:47
#mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 67
Server version: 5.5.40-0+wheezy1 (Debian)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use asterisk;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> select * from cdr;
Empty set (0.00 sec)
mysql> select * from cdr;
Empty set (0.00 sec)
mysql> ^CCtrl-C -- exit!
Aborted
/dev/pts/1
14:38:28
#; asterisk server, you can achieve a local Unix socket connection by

/dev/pts/0
14:38:28
#; asterisk server, you can achieve a local Unix socket connection by

/dev/pts/1
14:41:58
#ьщwho
user     tty7         2014-11-28 10:45 (:0)
user     pts/0        2014-11-28 10:45 (:0)
user     pts/3        2014-11-28 10:46 (:0)
/dev/pts/0
14:41:58
#ьщwho
user     tty7         2014-11-28 10:45 (:0)
user     pts/0        2014-11-28 10:45 (:0)
user     pts/3        2014-11-28 10:46 (:0)
/dev/pts/1
14:43:05
#more /var/log/asterisk/
/dev/pts/0
14:43:05
#more /var/log/asterisk/
/dev/pts/1
14:43:34
#ls /var/log/asterisk/
cdr-csv  cdr-custom  messages  queue_log
/dev/pts/0
14:43:34
#ls /var/log/asterisk/
cdr-csv  cdr-custom  messages  queue_log
/dev/pts/1
14:47:44
#[global]
user=asterisk
"/etc/asterisk/cdr_mysql.conf" 60L, 2183C
port=3306
sock=/var/run/mysqld/mysql.sock
timezone=UTC
;
; If your system's locale differs from mysql database character set,
; cdr_mysql can damage non-latin characters in CDR variables. Use this
; option to protect your data.
;charset=koi8r
;
; Older versions of cdr_mysql set the calldate field to whenever the
; record was posted, rather than the start date of the call.  This flag
; reverts to the old (incorrect) behavior.  Note that you'll also need
; to comment out the "start=calldate" alias, below, to use this.
;compat=no
;
; ssl connections (optional)
/dev/pts/0
14:47:44
#[global]
;
; Note - if the database server is hosted on the same machine as the
; asterisk server, you can achieve a local Unix socket connection by
; setting hostname=localhost
;
; port and sock are both optional parameters.  If hostname is specified
; and is not "localhost" (you can use address 127.0.0.1 instead), then
; cdr_mysql will attempt to connect to the port specified or use the
; default port.  If hostname is not specified or if hostname is
; "localhost", then cdr_mysql will attempt to connect to the socket file
...
; option to protect your data.
;charset=koi8r
;
; Older versions of cdr_mysql set the calldate field to whenever the
; record was posted, rather than the start date of the call.  This flag
; reverts to the old (incorrect) behavior.  Note that you'll also need
; to comment out the "start=calldate" alias, below, to use this.
;compat=no
;
; ssl connections (optional)
/dev/pts/1
14:49:26
#;ssl_ca=<path to CA cert>

/dev/pts/0
14:49:26
#;ssl_ca=<path to CA cert>

/dev/pts/1
14:49:27
#more /etc/host
/dev/pts/0
14:49:27
#more /etc/host
/dev/pts/1
14:49:35
#more /etc/hosts
/dev/pts/0
14:49:35
#more /etc/hosts
14:49:37
#ping localhost
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_req=1 ttl=64 time=0.024 ms
^C
--- localhost ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.024/0.024/0.024/0.000 ms
/dev/pts/1
14:49:37
#ping localhost
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_req=1 ttl=64 time=0.024 ms
^C
--- localhost ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.024/0.024/0.024/0.000 ms
прошло 11 минут
/dev/pts/4
15:01:04
#less /etc/asterisk/cdr_mysql.conf
15:01:19
#cat /etc/hosts
127.0.0.1       localhost
127.0.1.1       debian6 debian6.unix.nt
# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
15:01:21
#vim /etc/hosts
15:01:30
#~
[Nov 28 15:46:39] ERROR[10068] codec_dahdi.c: Failed to open /dev/dahdi/transcode: No such file or directory
[Nov 28 15:46:39] ERROR[10068] ais/clm.c: Could not initialize cluster membership service: Try Again
[Nov 28 15:46:39] NOTICE[10068] chan_dongle.c: [dongle0] Loaded device
[Nov 28 15:46:39] WARNING[10119] chan_dongle.c: unable to open /dev/ttyUSB2: No such file or directory
[Nov 28 15:46:39] WARNING[10068] pbx.c: Unable to register extension '_23XX', priority 1 in 'local', already in u
se
[Nov 28 15:46:39] NOTICE[10068] pbx_ael.c: Starting AEL load process.
[Nov 28 15:46:39] NOTICE[10068] pbx_ael.c: AEL load process: parsed config file name '/etc/asterisk/extensions.ae
l'.
[Nov 28 15:46:39] NOTICE[10068] pbx_ael.c: AEL load process: checked config file name '/etc/asterisk/extensions.a
...
[Nov 28 15:40:58] NOTICE[9923] chan_sip.c: Peer 'minsk' is now Reachable. (4ms / 2000ms)
[Nov 28 15:40:58] ERROR[9900] ais/clm.c: Could not initialize cluster membership service: Try Again
[Nov 28 15:40:59] NOTICE[9900] chan_dongle.c: [dongle0] Loaded device
[Nov 28 15:40:59] WARNING[9950] chan_dongle.c: unable to open /dev/ttyUSB2: No such file or directory
[Nov 28 15:40:59] WARNING[9900] pbx.c: Unable to register extension '_23XX', priority 1 in 'local', already in use
[Nov 28 15:40:59] NOTICE[9900] pbx_ael.c: Starting AEL load process.
[Nov 28 15:40:59] NOTICE[9900] pbx_ael.c: AEL load process: parsed config file name '/etc/asterisk/extensions.ael'.
[Nov 28 15:40:59] NOTICE[9900] pbx_ael.c: AEL load process: checked config file name '/etc/asterisk/extensions.ael'.
[Nov 28 15:40:59] NOTICE[9900] pbx_ael.c: AEL load process: compiled config file name '/etc/asterisk/extensions.ael'.
[Nov 28 15:40:59] NOTICE[9900] pbx_ael.c: AEL load process: merged config file name '/etc/asterisk/extensions.ael'.
15:02:09
#vim /etc/asterisk/cdr_mysql.conf
--- /tmp/l3-saved-10343.21985.24171	2014-11-28 16:02:17.598667317 +0200
+++ /etc/asterisk/cdr_mysql.conf	2014-11-28 16:02:26.866667311 +0200
@@ -11,7 +11,7 @@
 ; specified by sock or otherwise use the default socket file.
 ;
 [global]
-hostname=127.0.0.1
+hostname=localhost
 dbname=asterisk
 table=cdr
 password=password 
15:02:26
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
15:02:40
#less /var/log/asterisk/messages
15:02:59
#mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 76
Server version: 5.5.40-0+wheezy1 (Debian)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP  on asterisk.*  to 'asterisk'@'localhost';
Query OK, 0 rows affected (0.00 sec)
mysql> SET PASSWORD FOR 'asterisk'@'localhost' = PASSWORD('password');
Query OK, 0 rows affected (0.00 sec)
mysql> Bye
15:03:57
#mysql -u asterisk -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 77
Server version: 5.5.40-0+wheezy1 (Debian)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
mysql>
mysql> quid
    ->
    -> ^CCtrl-C -- exit!
Aborted
15:04:28
#mysql -u asterisk -h localhost -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 78
Server version: 5.5.40-0+wheezy1 (Debian)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
mysql>
mysql> quit
Bye
15:04:39
#vim /etc/asterisk/cdr_mysql.conf
--- /tmp/l3-saved-10343.28513.25700	2014-11-28 16:04:49.606667219 +0200
+++ /etc/asterisk/cdr_mysql.conf	2014-11-28 16:05:16.714667197 +0200
@@ -18,7 +18,7 @@
 user=asterisk
 port=3306
 sock=/var/run/mysqld/mysql.sock
-timezone=UTC 
+timezone=UTC
 ;
 ; If your system's locale differs from mysql database character set,
 ; cdr_mysql can damage non-latin characters in CDR variables. Use this
15:05:16
#netstat -lnp | grep mysql
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      7543/mysqld
unix  2      [ ACC ]     STREAM     LISTENING     38867    7543/mysqld         /var/run/mysqld/mysqld.sock
15:05:36
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
15:05:41
#less /var/log/asterisk/messages
/dev/pts/0
15:08:36
#screen
/dev/pts/1
15:08:36
#screen
прошло 16 минут
/dev/pts/3
15:24:38
#history | grep scp
  293  scp 192.168.20.1:/usr/local/bin/call-call
  294  scp user@192.168.20.1:/usr/local/bin/call-call
  295  scp user@192.168.20.1:/usr/local/bin/call-call  /usr/local/bin/call-call
  296  scp user@192.168.20.1:/usr/local/bin/call-call  call-call
  394  scp root@192.168.50.1://etc/asterisk/extensions.conf extensions.conf.pri
  399  scp root@192.168.50.1://etc/asterisk/extensions.conf /etc/asterisk/extensions.conf.pri
  498  history | grep scp
прошло 18 минут
15:42:50
#wget http://192.168.12.254/asterisk-13-current.tar.gz
--2014-11-28 16:43:57--  http://192.168.12.254/asterisk-13-current.tar.gz
Connecting to 192.168.12.254:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 31832204 (30M) [application/octet-stream]
Saving to: `asterisk-13-current.tar.gz'
100%[==================================================================>] 31,832,204  99.1M/s   in 0.3s
2014-11-28 16:43:57 (99.1 MB/s) - `asterisk-13-current.tar.gz' saved [31832204/31832204]
15:43:57
#ls
1                                           extensions.conf.bak   sent
asterisk-13-current.tar.gz                  extensions.conf.bak2  sip.conf.back
asterisk-core-sounds-ru-gsm-current.tar.gz  extensions.conf.pri   voicemail.conf.bak
15:44:01
#cd ..

15:44:04
#mkdir aster

15:44:10
#ls
aster  boot  etc   initrd.img  lib64       media  opt   root  sbin     srv  tmp  var
bin    dev   home  lib         lost+found  mnt    proc  run   selinux  sys  usr  vmlinuz
15:44:11
#cd aster/

15:44:14
#ls

15:44:16
#wget http://192.168.12.254/asterisk-13-current.tar.gz
--2014-11-28 16:44:20--  http://192.168.12.254/asterisk-13-current.tar.gz
Connecting to 192.168.12.254:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 31832204 (30M) [application/octet-stream]
Saving to: `asterisk-13-current.tar.gz'
100%[==================================================================>] 31,832,204   112M/s   in 0.3s
2014-11-28 16:44:21 (112 MB/s) - `asterisk-13-current.tar.gz' saved [31832204/31832204]
15:44:50
#cd asterisk-13-current.tar.gz
bash: cd: asterisk-13-current.tar.gz: Not a directory
15:44:57
#cd asterisk-13-current
bash: cd: asterisk-13-current: No such file or directory
15:45:00
#cd asterisk-13
asterisk-13.0.1/            asterisk-13-current.tar.gz
15:45:00
#cd asterisk-13
asterisk-13.0.1/            asterisk-13-current.tar.gz
15:45:00
#cd asterisk-13.0.1/

15:45:11
#ls
addons                        codecs           keys                                rest-api
agi                           config.guess     LICENSE                             rest-api-templates
apps                          configs          main                                sample.call
asterisk-13.0.1-summary.html  config.sub       Makefile                            sounds
asterisk-13.0.1-summary.txt   configure        Makefile.moddir_rules               static-http
autoconf                      configure.ac     Makefile.rules                      tests
bootstrap.sh                  contrib          makeopts.in                         UPGRADE-10.txt
bridges                       COPYING          menuselect                          UPGRADE-11.txt
BSDmakefile                   CREDITS          missing                             UPGRADE-1.2.txt
BUGS                          default.exports  mkinstalldirs                       UPGRADE-12.txt
build_tools                   doc              pbx                                 UPGRADE-1.4.txt
cdr                           formats          phoneprov                           UPGRADE-1.6.txt
cel                           funcs            README                              UPGRADE-1.8.txt
ChangeLog                     images           README-addons.txt                   UPGRADE.txt
CHANGES                       include          README-SERIOUSLY.bestpractices.txt  utils
channels                      install-sh       res                                 Zaptel-to-DAHDI.txt
15:45:13
#l./configure
bash: l./configure: No such file or directory
15:45:35
#./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)
15:45:48
#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
15:46:01
#apt-get install libncurses5-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libgadu3 libmozjs24d xulrunner-24.0
Use 'apt-get autoremove' to remove them.
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 (16.4 MB/s)
Selecting previously unselected package libtinfo-dev:amd64.
(Reading database ... 148068 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) ...
15:46:52
#./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 uuid_generate_random in -luuid... no
checking for uuid_generate_random in -le2fs-uuid... no
checking for uuid_generate_random... no
configure: error: *** uuid support not found (this typically means the uuid development package is missing)
15:47:00
#apt-get install uuid-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libgadu3 libmozjs24d xulrunner-24.0
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
  uuid-dev
0 upgraded, 1 newly installed, 0 to remove and 16 not upgraded.
Need to get 72.4 kB of archives.
After this operation, 98.3 kB of additional disk space will be used.
Get:1 http://192.168.12.254/debian/ wheezy/main uuid-dev amd64 2.20.1-5.3 [72.4 kB]
Fetched 72.4 kB in 0s (4,159 kB/s)
Selecting previously unselected package uuid-dev.
(Reading database ... 148116 files and directories currently installed.)
Unpacking uuid-dev (from .../uuid-dev_2.20.1-5.3_amd64.deb) ...
Processing triggers for man-db ...
Setting up uuid-dev (2.20.1-5.3) ...
15:48:00
#./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 -lncurses... yes
checking for curses.h... (cached) yes
checking for uuid_generate_random in -luuid... yes
checking uuid/uuid.h usability... yes
checking uuid/uuid.h presence... yes
checking for uuid/uuid.h... yes
checking for uuid_generate_random in -le2fs-uuid... no
checking for uuid_generate_random... no
checking for json_dumps in -ljansson... no
configure: error: *** JSON support not found (this typically means the libjansson development package is missing)
15:48:04
#apt-cache search JSON
libatdgen-ocaml - code generator for biniou and JSON serialization in OCaml
libatdgen-ocaml-dev - code generator for biniou and JSON serialization in OCaml
libjs-backbone - some Backbone for JS Apps with Models, Views, Collections, and Events
libbiniou-ocaml - flexible binary data format in OCaml
libbiniou-ocaml-dev - flexible binary data format in OCaml
python-bjsonrpc - asynchronous bidirectional JSON-RPC protocol over TCP/IP
python-cfflib - Multi-modal connectome and metadata management and integration
clojure-contrib - user contributed set of libraries for clojure
coderay - Helper programs for CodeRay Ruby lib for syntax highlighting
ruby-coderay - Ruby library for syntax highlighting
...
vim-syntax-gtk - Syntax files to highlight GTK+ keywords in vim
libyajl-dev - Yet Another JSON Library - development files
libyajl-doc - Yet Another JSON Library - library documentation
libyajl2 - Yet Another JSON Library
libyajl2-dbg - Yet Another JSON Library - debugging symbols
yajl-tools - Yet Another JSON Library - tools
libyojson-ocaml - JSON library for OCaml
libyojson-ocaml-dev - JSON library for OCaml
libjs-yui - Yahoo User Interface Library
libjs-yui3-common - Yahoo User Interface Library v3 (common files)
15:48:48
#apt-cache search JSON | libja
bash: libja: command not found
15:49:02
#apt-cache search JSON | grep libja
libjansson-dbg - C library for encoding, decoding and manipulating JSON data (debug)
libjansson-dev - C library for encoding, decoding and manipulating JSON data (dev)
libjansson-doc - C library for encoding, decoding and manipulating JSON data (doc)
libjansson4 - C library for encoding, decoding and manipulating JSON data
libjaula-dev - JSON parser/writer library for C++ (development files)
libjaula-doc - JSON parser/writer library for C++ (documentation)
libjaula1 - JSON parser/writer library for C++
libjackson-json-java - streaming fast powerful standard conformant json processor in java
libjackson-json-java-doc - standard conformant json processor in java - API documentation
15:49:06
#apt-get install ´ÑˆÐ¸Ð¾Ñ„тыыщт-вум
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package ´ÑˆÐ¸Ð¾Ñ„тыыщт-вум
15:51:19
#apt-get install ´ÑˆÐ¸Ð¾Ñ„Ñ‚Ñlibjansson-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libgadu3 libmozjs24d xulrunner-24.0
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libjansson4
The following NEW packages will be installed:
  libjansson-dev libjansson4
...
Get:1 http://192.168.12.254/debian/ wheezy/main libjansson4 amd64 2.3.1-2 [31.6 kB]
Get:2 http://192.168.12.254/debian/ wheezy/main libjansson-dev amd64 2.3.1-2 [34.6 kB]
Fetched 66.2 kB in 0s (3,935 kB/s)
Selecting previously unselected package libjansson4:amd64.
(Reading database ... 148138 files and directories currently installed.)
Unpacking libjansson4:amd64 (from .../libjansson4_2.3.1-2_amd64.deb) ...
Selecting previously unselected package libjansson-dev:amd64.
Unpacking libjansson-dev:amd64 (from .../libjansson-dev_2.3.1-2_amd64.deb) ...
Setting up libjansson4:amd64 (2.3.1-2) ...
Setting up libjansson-dev:amd64 (2.3.1-2) ...
15:51:47
#apt-get install libsqlite3-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libgadu3 libmozjs24d xulrunner-24.0
Use 'apt-get autoremove' to remove them.
Suggested packages:
  sqlite3-doc
The following NEW packages will be installed:
  libsqlite3-dev
0 upgraded, 1 newly installed, 0 to remove and 16 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 (27.0 MB/s)
Selecting previously unselected package libsqlite3-dev.
(Reading database ... 148156 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) ...
15:52:07
#apt-get inst./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 uuid/uuid.h... yes
checking for uuid_generate_random in -le2fs-uuid... no
checking for uuid_generate_random... no
checking for json_dumps in -ljansson... yes
checking jansson.h usability... yes
checking jansson.h presence... yes
checking for jansson.h... yes
checking for xml2-config... no
configure: *** The Asterisk menuselect tool requires the 'libxml2' development package.
configure: *** Please install the 'libxml2' development package.

Файлы

  • /etc/hosts
  • /etc/hosts
    >
    127.0.0.1       localhost
    127.0.1.1       debian6 debian6.unix.nt
    # The following lines are desirable for IPv6 capable hosts
    ::1     localhost ip6-localhost ip6-loopback
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    

    Статистика

    Время первой команды журнала14:24:50 2014-11-28
    Время последней команды журнала15:52:07 2014-11-28
    Количество командных строк в журнале101
    Процент команд с ненулевым кодом завершения, %11.88
    Процент синтаксически неверно набранных команд, % 1.98
    Суммарное время работы с терминалом *, час 1.45
    Количество командных строк в единицу времени, команда/мин 1.16
    Частота использования команд
    grep23|==================| 18.11%
    ps20|===============| 15.75%
    mysql11|========| 8.66%
    more10|=======| 7.87%
    ls8|======| 6.30%
    cd7|=====| 5.51%
    apt-get6|====| 4.72%
    vim5|===| 3.94%
    configure4|===| 3.15%
    apt-cache4|===| 3.15%
    less3|==| 2.36%
    asterisk2|=| 1.57%
    [global]2|=| 1.57%
    screen2|=| 1.57%
    wget2|=| 1.57%
    ping2|=| 1.57%
    /etc/init.d/asterisk2|=| 1.57%
    path2|=| 1.57%
    ssl_ca=<2|=| 1.57%
    ьщwho2|=| 1.57%
    [2|=| 1.57%
    mkdir1|| 0.79%
    history1|| 0.79%
    netstat1|| 0.79%
    cat1|| 0.79%
    ~1|| 0.79%
    libja1|| 0.79%
    ____
    *) Интервалы неактивности длительностью 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$