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

Содержание

Журнал

Понедельник (04/08/13)

/dev/pts/3
14:49:13
#vim /etc/dhcp/dhcpd.conf
--- /tmp/l3-saved-2923.27425.29191	2013-04-08 15:49:24.000000000 +0300
+++ /etc/dhcp/dhcpd.conf	2013-04-08 15:50:28.000000000 +0300
@@ -10,8 +10,8 @@
 ddns-update-style none;
 
 # option definitions common to all supported networks...
-option domain-name "example.org";
-option domain-name-servers ns1.example.org, ns2.example.org;
+option domain-name "linux2.unix.nt";
+option domain-name-servers 192.168.15.253;
 
 default-lease-time 600;
 max-lease-time 7200;
@@ -32,10 +32,10 @@
 
 # This is a very basic subnet declaration.
 
-#subnet 10.254.239.0 netmask 255.255.255.224 {
-#  range 10.254.239.10 10.254.239.20;
-#  option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
-#}
+subnet 192.168.20.0 netmask 255.255.255.0 {
+  range 192.168.20.100 192.168.20.200;
+  option routers 192.168.20.254;
+}
 
 # This declaration allows BOOTP clients to get dynamic addresses,
 # which we don't really recommend.
14:50:28
#vim /etc/default/isc-dhcp-server
--- /tmp/l3-saved-2923.11677.17215	2013-04-08 15:50:44.000000000 +0300
+++ /etc/default/isc-dhcp-server	2013-04-08 15:50:50.000000000 +0300
@@ -8,4 +8,5 @@
 
 # On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
 #	Separate multiple interfaces with spaces, e.g. "eth0 eth1".
-INTERFACES=""
+INTERFACES="eth0"
+
14:50:50
#/etc/init.d/isc-dhcp-server restart
Stopping ISC DHCP server: dhcpd failed!
Starting ISC DHCP server: dhcpd.
прошло 37 минут
/dev/pts/6
15:28:03
#ls - /usr/lib/asterisk/modules/chan *
ls: cannot access -: No such file or directory
ls: cannot access /usr/lib/asterisk/modules/chan: No such file or directory
install  install.1  install.2  lilalo  lilalo.1
/dev/pts/5
15:28:03
#ls - /usr/lib/asterisk/modules/chan *
ls: cannot access -: No such file or directory
ls: cannot access /usr/lib/asterisk/modules/chan: No such file or directory
install  install.1  install.2  lilalo  lilalo.1
/dev/pts/6
15:28:20
#kill -kill asterisk
bash: kill: asterisk: arguments must be process or job IDs
/dev/pts/5
15:28:20
#kill -kill asterisk
bash: kill: asterisk: arguments must be process or job IDs
/dev/pts/6
15:31:45
#mcsdf
bash: mcsdf: command not found
/dev/pts/5
15:31:45
#mcsdf
bash: mcsdf: command not found
/dev/pts/6
15:31:50
#ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0   2084   692 ?        Ss   14:55   0:00 init [2]
root         2  0.0  0.0      0     0 ?        S    14:55   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    14:55   0:00 [ksoftirqd/0]
root         5  0.0  0.0      0     0 ?        S    14:55   0:00 [kworker/u:0]
root         6  0.0  0.0      0     0 ?        S    14:55   0:00 [migration/0]
root         7  0.0  0.0      0     0 ?        S    14:55   0:00 [watchdog/0]
root         8  0.0  0.0      0     0 ?        S    14:55   0:00 [migration/1]
root        10  0.0  0.0      0     0 ?        S    14:55   0:00 [ksoftirqd/1]
root        12  0.0  0.0      0     0 ?        S    14:55   0:00 [watchdog/1]
...
root      4453  0.0  0.0   4432  1340 pts/5    S+   16:27   0:00 su -
root      4462  0.0  0.0   3444   752 pts/5    S+   16:27   0:00 script -f -c su -q /root/.lilalo//32275898
root      4511  0.0  0.0   3448   428 pts/5    S+   16:27   0:00 script -f -c su -q /root/.lilalo//32275898
root      4512  0.0  0.0   4432  1304 pts/6    Ss+  16:27   0:00 su
root      4520  0.0  0.0   3444   752 pts/6    S+   16:27   0:00 script -f -c bash -q /root/.lilalo//109441
root      4551  0.0  0.0   3448   428 pts/6    S+   16:27   0:00 script -f -c bash -q /root/.lilalo//109441
root      4552  0.0  0.0   4648  1952 pts/7    Ss   16:27   0:00 bash
root      4655  0.0  0.0      0     0 ?        S    16:31   0:00 [kworker/1:2]
root      4672  0.0  0.0      0     0 ?        S    16:31   0:00 [kworker/0:1]
root      4673  0.0  0.0   3924  1056 pts/7    R+   16:33   0:00 ps aux
/dev/pts/5
15:31:50
#ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0   2084   692 ?        Ss   14:55   0:00 init [2]
root         2  0.0  0.0      0     0 ?        S    14:55   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    14:55   0:00 [ksoftirqd/0]
root         5  0.0  0.0      0     0 ?        S    14:55   0:00 [kworker/u:0]
root         6  0.0  0.0      0     0 ?        S    14:55   0:00 [migration/0]
root         7  0.0  0.0      0     0 ?        S    14:55   0:00 [watchdog/0]
root         8  0.0  0.0      0     0 ?        S    14:55   0:00 [migration/1]
root        10  0.0  0.0      0     0 ?        S    14:55   0:00 [ksoftirqd/1]
root        12  0.0  0.0      0     0 ?        S    14:55   0:00 [watchdog/1]
...
root      4453  0.0  0.0   4432  1340 pts/5    S+   16:27   0:00 su -
root      4462  0.0  0.0   3444   752 pts/5    S+   16:27   0:00 script -f -c su -q /root/.lilalo//32275898
root      4511  0.0  0.0   3448   428 pts/5    S+   16:27   0:00 script -f -c su -q /root/.lilalo//32275898
root      4512  0.0  0.0   4432  1304 pts/6    Ss+  16:27   0:00 su
root      4520  0.0  0.0   3444   752 pts/6    S+   16:27   0:00 script -f -c bash -q /root/.lilalo//109441
root      4551  0.0  0.0   3448   428 pts/6    S+   16:27   0:00 script -f -c bash -q /root/.lilalo//109441
root      4552  0.0  0.0   4648  1952 pts/7    Ss   16:27   0:00 bash
root      4655  0.0  0.0      0     0 ?        S    16:31   0:00 [kworker/1:2]
root      4672  0.0  0.0      0     0 ?        S    16:31   0:00 [kworker/0:1]
root      4673  0.0  0.0   3924  1056 pts/7    R+   16:33   0:00 ps aux
/dev/pts/6
15:34:53
#apt-get
.aptitude/     .bashrc        install.2      .lilalo/       .profile
.bash_history  install        .l3rc          lilalo.1       .ssh/
.bash_profile  install.1      lilalo         .mc/           .viminfo
15:34:53
#apt-get
.aptitude/     .bashrc        install.2      .lilalo/       .profile
.bash_history  install        .l3rc          lilalo.1       .ssh/
.bash_profile  install.1      lilalo         .mc/           .viminfo
15:34:53
#apt-get
apt 0.8.10.3 for i386 compiled on Apr 15 2011 21:02:20
Usage: apt-get [options] command
       apt-get [options] install|remove pkg1 [pkg2 ...]
       apt-get [options] source pkg1 [pkg2 ...]
apt-get is a simple command line interface for downloading and
installing packages. The most frequently used commands are update
and install.
Commands:
   update - Retrieve new lists of packages
   upgrade - Perform an upgrade
...
  -f  Attempt to correct a system with broken dependencies in place
  -m  Attempt to continue if archives are unlocatable
  -u  Show a list of upgraded packages as well
  -b  Build the source package after fetching it
  -V  Show verbose version numbers
  -c=? Read this configuration file
  -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp
See the apt-get(8), sources.list(5) and apt.conf(5) manual
pages for more information and options.
                       This APT has Super Cow Powers.
/dev/pts/5
15:34:53
#apt-get
.aptitude/     .bashrc        install.2      .lilalo/       .profile
.bash_history  install        .l3rc          lilalo.1       .ssh/
.bash_profile  install.1      lilalo         .mc/           .viminfo
15:34:53
#apt-get
.aptitude/     .bashrc        install.2      .lilalo/       .profile
.bash_history  install        .l3rc          lilalo.1       .ssh/
.bash_profile  install.1      lilalo         .mc/           .viminfo
15:34:53
#apt-get
apt 0.8.10.3 for i386 compiled on Apr 15 2011 21:02:20
Usage: apt-get [options] command
       apt-get [options] install|remove pkg1 [pkg2 ...]
       apt-get [options] source pkg1 [pkg2 ...]
apt-get is a simple command line interface for downloading and
installing packages. The most frequently used commands are update
and install.
Commands:
   update - Retrieve new lists of packages
   upgrade - Perform an upgrade
...
  -f  Attempt to correct a system with broken dependencies in place
  -m  Attempt to continue if archives are unlocatable
  -u  Show a list of upgraded packages as well
  -b  Build the source package after fetching it
  -V  Show verbose version numbers
  -c=? Read this configuration file
  -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp
See the apt-get(8), sources.list(5) and apt.conf(5) manual
pages for more information and options.
                       This APT has Super Cow Powers.
/dev/pts/6
15:35:22
#apt-get
apt 0.8.10.3 for i386 compiled on Apr 15 2011 21:02:20
Usage: apt-get [options] command
       apt-get [options] install|remove pkg1 [pkg2 ...]
       apt-get [options] source pkg1 [pkg2 ...]
apt-get is a simple command line interface for downloading and
installing packages. The most frequently used commands are update
and install.
Commands:
   update - Retrieve new lists of packages
   upgrade - Perform an upgrade
...
  -f  Attempt to correct a system with broken dependencies in place
  -m  Attempt to continue if archives are unlocatable
  -u  Show a list of upgraded packages as well
  -b  Build the source package after fetching it
  -V  Show verbose version numbers
  -c=? Read this configuration file
  -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp
See the apt-get(8), sources.list(5) and apt.conf(5) manual
pages for more information and options.
                       This APT has Super Cow Powers.
/dev/pts/5
15:35:22
#apt-get
apt 0.8.10.3 for i386 compiled on Apr 15 2011 21:02:20
Usage: apt-get [options] command
       apt-get [options] install|remove pkg1 [pkg2 ...]
       apt-get [options] source pkg1 [pkg2 ...]
apt-get is a simple command line interface for downloading and
installing packages. The most frequently used commands are update
and install.
Commands:
   update - Retrieve new lists of packages
   upgrade - Perform an upgrade
...
  -f  Attempt to correct a system with broken dependencies in place
  -m  Attempt to continue if archives are unlocatable
  -u  Show a list of upgraded packages as well
  -b  Build the source package after fetching it
  -V  Show verbose version numbers
  -c=? Read this configuration file
  -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp
See the apt-get(8), sources.list(5) and apt.conf(5) manual
pages for more information and options.
                       This APT has Super Cow Powers.
/dev/pts/10
15:36:39
#ls - /etc/asterisk/
ls: cannot access -: No such file or directory
/etc/asterisk/:
adsi.conf                enum.conf               muted.conf
adtranvofr.conf          extconfig.conf          osp.conf
agents.conf              extensions.ael          oss.conf
ais.conf                 extensions.conf         phone.conf
alarmreceiver.conf       extensions.lua          phoneprov.conf
alsa.conf                extensions_minivm.conf  queuerules.conf
amd.conf                 features.conf           queues.conf
asterisk.adsi            festival.conf           res_config_sqlite.conf
...
chan_dahdi.conf          jingle.conf             skinny.conf
cli_aliases.conf         logger.conf             sla.conf
cli.conf                 manager.conf            smdi.conf
cli_permissions.conf     manager.d               telcordia-1.adsi
codecs.conf              meetme.conf             udptl.conf
console.conf             mgcp.conf               unistim.conf
dbsep.conf               minivm.conf             usbradio.conf
dnsmgr.conf              misdn.conf              users.conf
dsp.conf                 modules.conf            voicemail.conf
dundi.conf               musiconhold.conf        vpb.conf
/dev/pts/11
15:36:39
#ls - /etc/asterisk/
ls: cannot access -: No such file or directory
/etc/asterisk/:
adsi.conf                enum.conf               muted.conf
adtranvofr.conf          extconfig.conf          osp.conf
agents.conf              extensions.ael          oss.conf
ais.conf                 extensions.conf         phone.conf
alarmreceiver.conf       extensions.lua          phoneprov.conf
alsa.conf                extensions_minivm.conf  queuerules.conf
amd.conf                 features.conf           queues.conf
asterisk.adsi            festival.conf           res_config_sqlite.conf
...
chan_dahdi.conf          jingle.conf             skinny.conf
cli_aliases.conf         logger.conf             sla.conf
cli.conf                 manager.conf            smdi.conf
cli_permissions.conf     manager.d               telcordia-1.adsi
codecs.conf              meetme.conf             udptl.conf
console.conf             mgcp.conf               unistim.conf
dbsep.conf               minivm.conf             usbradio.conf
dnsmgr.conf              misdn.conf              users.conf
dsp.conf                 modules.conf            voicemail.conf
dundi.conf               musiconhold.conf        vpb.conf
/dev/pts/10
15:37:34
#ls -l /etc/asterisk/sip8
ls: cannot access /etc/asterisk/sip8: No such file or directory
/dev/pts/11
15:37:34
#ls -l /etc/asterisk/sip8
ls: cannot access /etc/asterisk/sip8: No such file or directory
/dev/pts/10
15:38:02
#ls -l /etc/asterisk/sip*
-rw-r----- 1 asterisk asterisk 63882 Jan 14 20:36 /etc/asterisk/sip.conf
-rw-r----- 1 asterisk asterisk   675 Jan 14 20:35 /etc/asterisk/sip_notify.conf
/dev/pts/11
15:38:02
#ls -l /etc/asterisk/sip*
-rw-r----- 1 asterisk asterisk 63882 Jan 14 20:36 /etc/asterisk/sip.conf
-rw-r----- 1 asterisk asterisk   675 Jan 14 20:35 /etc/asterisk/sip_notify.conf
/dev/pts/20
15:41:07
#cp /etc/asterisk/sip.conf /etc/asterisk/sip.comfig.ori

/dev/pts/21
15:41:07
#cp /etc/asterisk/sip.conf /etc/asterisk/sip.comfig.ori

/dev/pts/20
15:43:47
#ls /etc/asterisk/sip *
ls: cannot access /etc/asterisk/sip: No such file or directory
install  install.1  install.2  lilalo  lilalo.1
/dev/pts/21
15:43:47
#ls /etc/asterisk/sip *
ls: cannot access /etc/asterisk/sip: No such file or directory
install  install.1  install.2  lilalo  lilalo.1
/dev/pts/20
15:44:05
#ls /etc/asterisk/sip*
/etc/asterisk/sip.comfig.ori  /etc/asterisk/sip_notify.conf
/etc/asterisk/sip.conf
/dev/pts/21
15:44:05
#ls /etc/asterisk/sip*
/etc/asterisk/sip.comfig.ori  /etc/asterisk/sip_notify.conf
/etc/asterisk/sip.conf
/dev/pts/20
15:44:11
#ls /etc/asterisk/sip.*
/etc/asterisk/sip.comfig.ori  /etc/asterisk/sip.conf
/dev/pts/21
15:44:11
#ls /etc/asterisk/sip.*
/etc/asterisk/sip.comfig.ori  /etc/asterisk/sip.conf
/dev/pts/20
15:44:22
#ls /etc/asterisk/sip.*.*
/etc/asterisk/sip.comfig.ori
/dev/pts/21
15:44:22
#ls /etc/asterisk/sip.*.*
/etc/asterisk/sip.comfig.ori
/dev/pts/20
15:44:32
#rm /etc/asterisk/sip.config
rm: cannot remove `/etc/asterisk/sip.config': No such file or directory
/dev/pts/21
15:44:32
#rm /etc/asterisk/sip.config
rm: cannot remove `/etc/asterisk/sip.config': No such file or directory
/dev/pts/20
15:47:18
#cat /etc/asterisk/sip.conf
cat: /etc/asterisk/sip.conf: No such file or directory
/dev/pts/21
15:47:18
#cat /etc/asterisk/sip.conf
cat: /etc/asterisk/sip.conf: No such file or directory
/dev/pts/20
15:47:51
#sip reload
bash: sip: command not found
/dev/pts/21
15:47:51
#sip reload
bash: sip: command not found
/dev/pts/20
15:48:16
#asterisk -r
Asterisk 1.6.2.9-2+squeeze10, Copyright (C) 1999 - 2010 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on Linux2 (pid = 4328)
Linux2*CLI>
Linux2*CLI>
Linux2*CLI>
[1]+  Stopped                 asterisk -r
/dev/pts/21
15:48:16
#asterisk -r
Asterisk 1.6.2.9-2+squeeze10, Copyright (C) 1999 - 2010 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on Linux2 (pid = 4328)
Linux2*CLI>
Linux2*CLI>
Linux2*CLI>
[1]+  Stopped                 asterisk -r
/dev/pts/20
15:49:20
#asterisk -rwww
asterisk: invalid option -- 'w'
/dev/pts/21
15:49:20
#asterisk -rwww
asterisk: invalid option -- 'w'
/dev/pts/20
15:49:23
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze10, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze10 currently running on Linux2 (pid = 4328)
Verbosity was 0 and is now 3
Linux2*CLI>
[2]+  Stopped                 asterisk -rvvv
/dev/pts/21
15:49:23
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze10, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze10 currently running on Linux2 (pid = 4328)
Verbosity was 0 and is now 3
Linux2*CLI>
[2]+  Stopped                 asterisk -rvvv
/dev/pts/20
15:49:37
#asterisk -r
Asterisk 1.6.2.9-2+squeeze10, Copyright (C) 1999 - 2010 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on Linux2 (pid = 4328)
Verbosity is at least 3
Linux2*CLI> sip reload
 Reloading SIP
[Apr  8 16:50:38] NOTICE[4344]: chan_sip.c:24578 reload_config: Unable to load config sip.conf
Linux2*CLI>
[3]+  Stopped                 asterisk -r
/dev/pts/21
15:49:37
#asterisk -r
Asterisk 1.6.2.9-2+squeeze10, Copyright (C) 1999 - 2010 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on Linux2 (pid = 4328)
Verbosity is at least 3
Linux2*CLI> sip reload
 Reloading SIP
[Apr  8 16:50:38] NOTICE[4344]: chan_sip.c:24578 reload_config: Unable to load config sip.conf
Linux2*CLI>
[3]+  Stopped                 asterisk -r
/dev/pts/20
15:50:57
#asterisk -r
Asterisk 1.6.2.9-2+squeeze10, Copyright (C) 1999 - 2010 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on Linux2 (pid = 4328)
Verbosity is at least 3
Linux2*CLI> module load
...
No such command 'sio show pirs' (type 'core show help sio show' for other possible commands)
Linux2*CLI> sio show peers
No such command 'sio show peers' (type 'core show help sio show' for other possible commands)
Linux2*CLI> sip show peers
Name/username              Host            Dyn Nat ACL Port     Status
0 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 0 offline]
Linux2*CLI> eeee
No such command 'eeee' (type 'core show help eeee' for other possible commands)
Linux2*CLI>
[4]+  Stopped                 asterisk -r
/dev/pts/21
15:50:57
#asterisk -r
Asterisk 1.6.2.9-2+squeeze10, Copyright (C) 1999 - 2010 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on Linux2 (pid = 4328)
Verbosity is at least 3
Linux2*CLI> module load
...
No such command 'sio show pirs' (type 'core show help sio show' for other possible commands)
Linux2*CLI> sio show peers
No such command 'sio show peers' (type 'core show help sio show' for other possible commands)
Linux2*CLI> sip show peers
Name/username              Host            Dyn Nat ACL Port     Status
0 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 0 offline]
Linux2*CLI> eeee
No such command 'eeee' (type 'core show help eeee' for other possible commands)
Linux2*CLI>
[4]+  Stopped                 asterisk -r
/dev/pts/20
16:00:38
#nano
/dev/pts/21
16:00:38
#nano
/dev/pts/20
16:02:41
#[general]
[3553]
type=friend
secret=12345
host=dynamic
                                         [ Read 10 lines ]
^G Get Help     ^O WriteOut     ^R Read File    ^Y Prev Page    ^K Cut Text     ^C Cur Pos
Use "fg" to return to nano.     ^W Where Is     ^V Next Page    ^U UnCut Text   ^T To Spell
[5]+  Stopped                 /usr/bin/nano "$@"
/dev/pts/21
16:02:41
#[general]
[3553]
type=friend
secret=12345
host=dynamic
                                         [ Read 10 lines ]
^G Get Help     ^O WriteOut     ^R Read File    ^Y Prev Page    ^K Cut Text     ^C Cur Pos
Use "fg" to return to nano.     ^W Where Is     ^V Next Page    ^U UnCut Text   ^T To Spell
[5]+  Stopped                 /usr/bin/nano "$@"
/dev/pts/20
16:04:32
#ls /etc/asterisk/modules/sip.*
ls: cannot access /etc/asterisk/modules/sip.*: No such file or directory
/dev/pts/21
16:04:32
#ls /etc/asterisk/modules/sip.*
ls: cannot access /etc/asterisk/modules/sip.*: No such file or directory
/dev/pts/20
16:11:46
#nano
/dev/pts/21
16:11:46
#nano
/dev/pts/20
16:12:00
#nano /etc/asterisk/extentions.conf
/dev/pts/21
16:12:00
#nano /etc/asterisk/extentions.conf
/dev/pts/20
16:12:50
#ls -l /etc/asterisk/ext*.*
-rw-r----- 1 asterisk asterisk  2462 Jan 14 20:35 /etc/asterisk/extconfig.conf
-rw-r----- 1 asterisk asterisk 12801 Jan 14 20:35 /etc/asterisk/extensions.ael
-rw-r----- 1 asterisk asterisk 31344 Jan 14 20:35 /etc/asterisk/extensions.conf
-rw-r----- 1 asterisk asterisk  5408 Jan 14 20:35 /etc/asterisk/extensions.lua
-rw-r----- 1 asterisk asterisk  7481 Jan 14 20:35 /etc/asterisk/extensions_minivm.conf
/dev/pts/21
16:12:50
#ls -l /etc/asterisk/ext*.*
-rw-r----- 1 asterisk asterisk  2462 Jan 14 20:35 /etc/asterisk/extconfig.conf
-rw-r----- 1 asterisk asterisk 12801 Jan 14 20:35 /etc/asterisk/extensions.ael
-rw-r----- 1 asterisk asterisk 31344 Jan 14 20:35 /etc/asterisk/extensions.conf
-rw-r----- 1 asterisk asterisk  5408 Jan 14 20:35 /etc/asterisk/extensions.lua
-rw-r----- 1 asterisk asterisk  7481 Jan 14 20:35 /etc/asterisk/extensions_minivm.conf
/dev/pts/20
16:14:20
#mv /etc/asterisk/extconfig.conf /etc/asterisk/extconfig.conf.ori

/dev/pts/21
16:14:20
#mv /etc/asterisk/extconfig.conf /etc/asterisk/extconfig.conf.ori

/dev/pts/20
16:16:40
#mv /etc/asterisk/extensions.conf /etc/asterisk/extensions.conf.ori

/dev/pts/21
16:16:40
#mv /etc/asterisk/extensions.conf /etc/asterisk/extensions.conf.ori

/dev/pts/20
16:18:03
#nano /etc/asterisk/extensions.conf
/dev/pts/21
16:18:03
#nano /etc/asterisk/extensions.conf
--- /dev/null	2013-04-08 17:55:30.708527071 +0300
+++ /etc/asterisk/extensions.conf	2013-04-08 17:19:36.000000000 +0300
@@ -0,0 +1,6 @@
+[default]
+
+exten => 8000,1,Answer
+exten => 8000,n,Wait(2)
+exten => 8000,n,Playback(welcome)
+
/dev/pts/20
16:19:39
#nano /etc/asterisk/extensions.conf
/dev/pts/21
16:19:39
#nano /etc/asterisk/extensions.conf
/dev/pts/20
16:22:10
#nano /etc/asterisk/sip.conf
/dev/pts/21
16:22:10
#nano /etc/asterisk/sip.conf
--- /tmp/l3-saved-5333.7727.20919	2013-04-08 17:22:23.000000000 +0300
+++ /etc/asterisk/sip.conf	2013-04-08 17:23:02.000000000 +0300
@@ -7,15 +7,3 @@
 secret=12345
 host=dynamic
 
-; SIP-peer
-[1202]
-type=friend
-secret=12345
-host=dynamic
-
-; SIP-peer
-[1203]
-type=friend
-secret=12345
-host=dynamic
-
/dev/pts/20
16:23:03
#nano /etc/asterisk/sip.conf
/dev/pts/21
16:23:03
#nano /etc/asterisk/sip.conf
/dev/pts/20
16:32:26
#asterisk -r
Asterisk 1.6.2.9-2+squeeze10, Copyright (C) 1999 - 2010 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on Linux2 (pid = 4328)
Verbosity is at least 3
Linux2*CLI> sip show peers
Name/username              Host            Dyn Nat ACL Port     Status
1201                       (Unspecified)    D   N      5060     Unmonitored
1 sip peers [Monitored: 0 online, 0 offline Unmonitored: 1 online, 0 offline]
Linux2*CLI>
[24]+  Stopped                 asterisk -r
/dev/pts/21
16:32:26
#asterisk -r
Asterisk 1.6.2.9-2+squeeze10, Copyright (C) 1999 - 2010 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on Linux2 (pid = 4328)
Verbosity is at least 3
Linux2*CLI> sip show peers
Name/username              Host            Dyn Nat ACL Port     Status
1201                       (Unspecified)    D   N      5060     Unmonitored
1 sip peers [Monitored: 0 online, 0 offline Unmonitored: 1 online, 0 offline]
Linux2*CLI>
[24]+  Stopped                 asterisk -r
/dev/pts/20
16:33:28
#nano /etc/asterisk/sip.conf
/dev/pts/21
16:33:28
#nano /etc/asterisk/sip.conf
--- /tmp/l3-saved-5333.6345.20340	2013-04-08 17:33:31.000000000 +0300
+++ /etc/asterisk/sip.conf	2013-04-08 17:33:55.000000000 +0300
@@ -7,3 +7,9 @@
 secret=12345
 host=dynamic
 
+; SIP-peer
+[1202]
+type=friend
+secret=12345
+host=dynamic
+
/dev/pts/20
16:39:45
#nano /etc/asterisk/extensions.conf
/dev/pts/21
16:39:45
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-5333.5890.12574	2013-04-08 17:39:47.000000000 +0300
+++ /etc/asterisk/extensions.conf	2013-04-08 17:40:05.000000000 +0300
@@ -4,5 +4,5 @@
 exten => 8000,n,Wait(2)
 exten => 8000,n,Playback(welcome)
 
-exten => 2301,1,Dial (Sip/2301)
-exten => 2301,1,Dial (Sip/2301)
+exten => 1201,1,Dial (Sip/1201)
+exten => 1202,1,Dial (Sip/1202)
/dev/pts/20
16:40:06
#nano /etc/asterisk/extensions.conf
/dev/pts/21
16:40:06
#nano /etc/asterisk/extensions.conf
/dev/pts/20
16:49:02
#nano /etc/asterisk/extensions.conf
/dev/pts/21
16:49:02
#nano /etc/asterisk/extensions.conf
/dev/pts/20
16:50:51
#[default]
exten => 8000,n,Playback(welcome)
exten => 1201,1,Dial(Sip/1201)
exten => 1202,1,Dial(Sip/1202)
                                         [ Wrote 8 lines ]
^G Get Help     ^O WriteOut     ^R Read File    ^Y Prev Page    ^K Cut Text     ^C Cur Pos
Use "fg" to return to nano.     ^W Where Is     ^V Next Page    ^U UnCut Text   ^T To Spell
[32]+  Stopped                 /usr/bin/nano "$@"
/dev/pts/21
16:50:51
#[default]
exten => 8000,n,Playback(welcome)
exten => 1201,1,Dial(Sip/1201)
exten => 1202,1,Dial(Sip/1202)
                                         [ Wrote 8 lines ]
^G Get Help     ^O WriteOut     ^R Read File    ^Y Prev Page    ^K Cut Text     ^C Cur Pos
Use "fg" to return to nano.     ^W Where Is     ^V Next Page    ^U UnCut Text   ^T To Spell
[32]+  Stopped                 /usr/bin/nano "$@"

Вторник (04/09/13)

/dev/pts/0
08:16:47
#ls -l /etc/
total 1116
drwxr-xr-x 3 root     root      4096 Apr  8 14:48 acpi
-rw-r--r-- 1 root     root      2981 Apr  8 14:44 adduser.conf
-rw-r--r-- 1 root     root       196 Apr  8 16:27 aliases
drwxr-xr-x 2 root     root      4096 Apr  8 16:20 alternatives
-rw-r--r-- 1 root     root       395 Nov  1  2009 anacrontab
drwxr-xr-x 3 root     root      4096 Apr  8 16:53 apache2
drwxr-xr-x 6 root     root      4096 Apr  8 16:52 apm
drwxr-xr-x 6 root     root      4096 Apr  8 16:28 apt
drwxr-xr-x 3 asterisk asterisk  4096 Apr  8 18:01 asterisk
...
drwxr-xr-x 2 root     root     12288 Apr  8 16:55 usb_modeswitch.d
drwxr-xr-x 2 root     root      4096 Apr  8 16:54 vga
drwxr-xr-x 2 root     root      4096 Apr  8 14:44 vim
drwxr-xr-x 2 root     root      4096 Apr  8 16:27 w3m
-rw-r--r-- 1 root     root      4496 Sep  5  2010 wgetrc
drwxr-xr-x 2 root     root      4096 Apr  8 16:54 wildmidi
drwxr-xr-x 2 root     root      4096 Apr  8 16:54 wpa_supplicant
drwxr-xr-x 9 root     root      4096 Apr  8 16:55 X11
drwxr-xr-x 4 root     root      4096 Apr  8 16:54 xdg
drwxr-xr-x 2 root     root      4096 Apr  8 16:55 xml
/dev/pts/1
08:16:47
#ls -l /etc/
total 1116
drwxr-xr-x 3 root     root      4096 Apr  8 14:48 acpi
-rw-r--r-- 1 root     root      2981 Apr  8 14:44 adduser.conf
-rw-r--r-- 1 root     root       196 Apr  8 16:27 aliases
drwxr-xr-x 2 root     root      4096 Apr  8 16:20 alternatives
-rw-r--r-- 1 root     root       395 Nov  1  2009 anacrontab
drwxr-xr-x 3 root     root      4096 Apr  8 16:53 apache2
drwxr-xr-x 6 root     root      4096 Apr  8 16:52 apm
drwxr-xr-x 6 root     root      4096 Apr  8 16:28 apt
drwxr-xr-x 3 asterisk asterisk  4096 Apr  8 18:01 asterisk
...
drwxr-xr-x 2 root     root     12288 Apr  8 16:55 usb_modeswitch.d
drwxr-xr-x 2 root     root      4096 Apr  8 16:54 vga
drwxr-xr-x 2 root     root      4096 Apr  8 14:44 vim
drwxr-xr-x 2 root     root      4096 Apr  8 16:27 w3m
-rw-r--r-- 1 root     root      4496 Sep  5  2010 wgetrc
drwxr-xr-x 2 root     root      4096 Apr  8 16:54 wildmidi
drwxr-xr-x 2 root     root      4096 Apr  8 16:54 wpa_supplicant
drwxr-xr-x 9 root     root      4096 Apr  8 16:55 X11
drwxr-xr-x 4 root     root      4096 Apr  8 16:54 xdg
drwxr-xr-x 2 root     root      4096 Apr  8 16:55 xml
/dev/pts/0
08:17:07
#ls -l /etc/network/interfaces
-rw-r--r-- 1 root root 521 Apr  8 18:04 /etc/network/interfaces
/dev/pts/1
08:17:07
#ls -l /etc/network/interfaces
-rw-r--r-- 1 root root 521 Apr  8 18:04 /etc/network/interfaces
/dev/pts/0
08:17:24
#nano /etc/network/interfaces
/dev/pts/1
08:17:24
#nano /etc/network/interfaces
--- /tmp/l3-saved-2190.8910.16627	2013-04-09 09:17:50.000000000 +0300
+++ /etc/network/interfaces	2013-04-09 09:18:08.000000000 +0300
@@ -8,7 +8,7 @@
 # The primary network interface
 allow-hotplug eth0
 iface eth0 inet static
-	address 192.168.20.2
+	address 192.168.20.1
 	netmask 255.255.255.0
 	network 192.168.20.0
 	broadcast 192.168.20.255
/dev/pts/0
08:18:34
#This file describes the network interfaces available on your system
bash: o: command not found
08:18:34
#nano /etc/network/interfaces
/dev/pts/1
08:18:34
#This file describes the network interfaces available on your system
bash: o: command not found
08:18:34
#nano /etc/network/interfaces
/dev/pts/0
08:18:41
#This file describes the network interfaces available on your system

/dev/pts/1
08:18:41
#This file describes the network interfaces available on your system

/dev/pts/0
08:19:19
#ifup eth0

Статистика

Время первой команды журнала14:49:13 2013- 4- 8
Время последней команды журнала08:19:19 2013- 4- 9
Количество командных строк в журнале100
Процент команд с ненулевым кодом завершения, %54.00
Процент синтаксически неверно набранных команд, % 4.00
Суммарное время работы с терминалом *, час 1.45
Количество командных строк в единицу времени, команда/мин 1.15
Частота использования команд
nano26|==========================| 26.00%
ls24|========================| 24.00%
asterisk12|============| 12.00%
apt-get8|========| 8.00%
This4|====| 4.00%
mv4|====| 4.00%
ps2|==| 2.00%
cp2|==| 2.00%
vim2|==| 2.00%
rm2|==| 2.00%
[general]2|==| 2.00%
mcsdf2|==| 2.00%
cat2|==| 2.00%
sip2|==| 2.00%
kill2|==| 2.00%
[default]2|==| 2.00%
ifup1|=| 1.00%
/etc/init.d/isc-dhcp-server1|=| 1.00%
____
*) Интервалы неактивности длительностью 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$