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

Содержание

Журнал

Понедельник (04/23/12)

/dev/pts/1
11:17:12
#ls
install
11:17:14
#dpkg-reconfigure locales
Package configuration
   ┌─────────────────────────────────────────────────────────────────────┤ Configuring locales ├─────────────────────────────────────────────────────â
   │ Locales are a framework to switch between multiple languages and allow users to use their language, country, characters, collation order, etc.                   │
   │                                                                                                                                                                  │
   │ Please choose which locales to generate. UTF-8 locales should be chosen by default, particularly for new installations. Other character sets may be useful for   │
   │ backwards compatibility with older systems and software.                                                                                                         │
   │                                                                                                                                                                  │
   │ Locales to be generated:                                                                                                                                         │
   │                                                                                                                                                                  │
   │    [ ar_SY.UTF-8 UTF-8                                                                                                                                       ↑   │
...
   │    [ ] nn_NO ISO-8859-1                                                                                                                                      ▒   │
   │    [ ] nr_ZA UTF-8                                                                                                                                           ▒   │
   │    [ ] nso_ZA UTF-8                                                                                                                                          ▒   │
   │    [ ] oc_FR ISO-8859-1                                                                                                                                      ▒   │
   │    [ ] oc_FR.UTF-8 UTF-8                                                                                                                                     ▒   │
   │    [ ] om_ET UTF-8                                                                                                                                           ▒   │
   │    [ ] om_KE ISO-8859-1                                                                                                                                      ▒   │
   │    [ ] om_KE.UTF-8 UTF-8                                                                                                                                     ▒   │
   │    [ ] or_IN UTF-8                                                                                                                                           ▒   │
            pa_IN UTF-8
11:24:21
#dpkg-reconfigure locales
Package configuration
   ┌─────────────────────────────────────────────────────────────────────┤ Configuring locales ├─────────────────────────────────────────────────────â
   │ Many packages in Debian use locales to display text in the correct language for the user. You can choose a default locale for the system from the generated      │
   │ locales.                                                                                                                                                         │
   │                                                                                                                                                                  │
   │ This will select the default language for the entire system. If this system is a multi-user system where not all users are able to speak the default language,   │
   │ they will experience difficulties.                                                                                                                               │
   │                                                                                                                                                                  │
   │ Default locale for the system environment:                                                                                                                       │
   │                                                                                                                                                                  │
...
   │                                                                                                                                                                  │
   │                                                                                                                                                                  │
   │                                                 <Ok>                                                     <Cancel>                                                │
   │                                                                                                                                                                  │
   └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Generating locales (this might take a while)...
  en_US.UTF-8... done
  ru_RU.UTF-8... done
  ru_UA.UTF-8... done
Generation complete.
11:27:45
#apt-get install asterisk-doc asterisk-config asterisk-soundsapt-cache search asterisk
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package asterisk-soundsapt-cache
E: Unable to locate package search
11:35:19
#apt-get install bash-completion
Reading package lists... Done
Building dependency tree
Reading state information... Done
bash-completion is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
11:35:38
#vi /etc/bash.bashrc
--- /tmp/l3-saved-10017.10904.29577	2012-04-23 12:35:56.528548556 +0300
+++ /etc/bash.bashrc	2012-04-23 12:36:15.640625599 +0300
@@ -29,9 +29,9 @@
 #esac
 
 # enable bash completion in interactive shells
-#if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
-#    . /etc/bash_completion
-#fi
+if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
+    . /etc/bash_completion
+fi
 
 # if the command-not-found package is installed, use it
 if [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found ]; then
11:41:21
#asterisk -gcvvvvv
Asterisk 1.6.2.9-2+squeeze4, 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
Asterisk already running on /var/run/asterisk/asterisk.ctl.  Use 'asterisk -r' to connect.
11:42:14
#asterisk -r
Asterisk 1.6.2.9-2+squeeze4, 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+squeeze4 currently running on linux4 (pid = 12900)
linux4*CLI> quit
11:42:49
#ps ax |grep aster
12900 ?        Ssl    0:00 /usr/sbin/asterisk -p -U asterisk
12901 ?        S      0:00 astcanary /var/run/asterisk/alt.asterisk.canary.tweet.tweet.tweet 12900
12965 pts/2    S+     0:00 grep aster
11:42:56
#dpkg -L asterisk | less
прошло 14 минут
11:57:10
#asterisk -r
Asterisk 1.6.2.9-2+squeeze4, 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+squeeze4 currently running on linux4 (pid = 12900)
linux4*CLI> quit
11:59:08
#asterisk -rvvvvv
Asterisk 1.6.2.9-2+squeeze4, 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+squeeze4 currently running on linux4 (pid = 12900)
...
bridge_builtin_features.so     Built in bridging features               1
bridge_softmix.so              Multi-party software based channel mixin 0
res_clioriginate.so            Call origination and redirection from th 0
codec_resample.so              SLIN Resampling Codec                    0
format_wav_gsm.so              Microsoft WAV format (Proprietary GSM)   0
format_vox.so                  Dialogic VOX (ADPCM) File Format         0
chan_gtalk.so                  Gtalk Channel Driver                     0
198 modules loaded
linux4*CLI> quit
Executing last minute cleanups
прошло 77 минут
13:16:20
#ps ax |grep dhcpd
13078 pts/2    S+     0:00 grep dhcpd
13:16:34
#dh
dh                     dhclient               dh_installchangelogs   dh_installinfo         dh_installppp          dh_movefiles           dh_suidregister
dh_auto_build          dhclient-script        dh_installcron         dh_installinit         dh_installudev         dh_perl                dh_testdir
dh_auto_clean          dh_compress            dh_installdeb          dh_installlogcheck     dh_installwm           dh_prep                dh_testroot
dh_auto_configure      dh_desktop             dh_installdebconf      dh_installlogrotate    dh_installxfonts       dh_pycentral           dh_undocumented
dh_auto_install        dh_fixperms            dh_installdefoma       dh_installman          dh_installxmlcatalogs  dh_pysupport           dh_usrlocal
dh_auto_test           dh_gconf               dh_installdirs         dh_installmanpages     dh_link                dh_python
dh_bash-completion     dh_gencontrol          dh_installdocs         dh_installmenu         dh_lintian             dh_python2
dh_bugfiles            dh_icons               dh_installemacsen      dh_installmime         dh_listpackages        dh_scrollkeeper
dh_builddeb            dh_install             dh_installexamples     dh_installmodules      dh_makeshlibs          dh_shlibdeps
dh_clean               dh_installcatalogs     dh_installifupdown     dh_installpam          dh_md5sums             dh_strip
13:16:34
#dh
dh                     dhclient               dh_installchangelogs   dh_installinfo         dh_installppp          dh_movefiles           dh_suidregister
dh_auto_build          dhclient-script        dh_installcron         dh_installinit         dh_installudev         dh_perl                dh_testdir
dh_auto_clean          dh_compress            dh_installdeb          dh_installlogcheck     dh_installwm           dh_prep                dh_testroot
dh_auto_configure      dh_desktop             dh_installdebconf      dh_installlogrotate    dh_installxfonts       dh_pycentral           dh_undocumented
dh_auto_install        dh_fixperms            dh_installdefoma       dh_installman          dh_installxmlcatalogs  dh_pysupport           dh_usrlocal
dh_auto_test           dh_gconf               dh_installdirs         dh_installmanpages     dh_link                dh_python
dh_bash-completion     dh_gencontrol          dh_installdocs         dh_installmenu         dh_lintian             dh_python2
dh_bugfiles            dh_icons               dh_installemacsen      dh_installmime         dh_listpackages        dh_scrollkeeper
dh_builddeb            dh_install             dh_installexamples     dh_installmodules      dh_makeshlibs          dh_shlibdeps
dh_clean               dh_installcatalogs     dh_installifupdown     dh_installpam          dh_md5sums             dh_strip
13:16:34
#apt-cache search dhcp
ahcpd - the Ad-Hoc Configuration Protocol
arpon - versatile anti ARP poisoning daemon
autodns-dhcp - Automatic DNS updates for DHCP
avahi-autoipd - Avahi IPv4LL network address configuration daemon
backuppc - high-performance, enterprise-grade system for backing up PCs
batctl - B.A.T.M.A.N. advanced control and management tool
batman-adv-dkms - DKMS Source for the batman-advanced kernel module
batman-adv-source - Source for the batman-advanced kernel module
bootp - server for the bootp protocol with DHCP support
udhcpc - Provides the busybox DHCP client implementation
...
pxe - free PXE daemon
python-pydhcplib - Python DHCP client/server library
resolvconf - name server information handler
totd - Small DNS proxy that supports IPv6/IPv4 record translation
whereami - Automatically reconfigure your (laptop) system for a new location
wide-dhcpv6-client - DHCPv6 client for automatic IPv6 hosts configuration
wide-dhcpv6-relay - DHCPv6 relay for automatic IPv6 hosts configuration
wide-dhcpv6-server - DHCPv6 server for automatic IPv6 hosts configuration
yersinia - Network vulnerabilities check software
busybox - Tiny utilities for small and embedded systems
13:17:06
#apt-get install dhcp3-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  isc-dhcp-server
Suggested packages:
  isc-dhcp-server-ldap
The following NEW packages will be installed:
  dhcp3-server isc-dhcp-server
0 upgraded, 2 newly installed, 0 to remove and 8 not upgraded.
...
Unpacking isc-dhcp-server (from .../isc-dhcp-server_4.1.1-P1-15+squeeze3_i386.deb) ...
Selecting previously deselected package dhcp3-server.
Unpacking dhcp3-server (from .../dhcp3-server_4.1.1-P1-15+squeeze3_all.deb) ...
Processing triggers for man-db ...
Setting up isc-dhcp-server (4.1.1-P1-15+squeeze3) ...
Generating /etc/default/isc-dhcp-server...
Starting ISC DHCP server: dhcpdcheck syslog for diagnostics. ... failed!
 failed!
invoke-rc.d: initscript isc-dhcp-server, action "start" failed.
Setting up dhcp3-server (4.1.1-P1-15+squeeze3) ...
13:18:34
#vi /etc/network/interfaces
--- /tmp/l3-saved-10017.10908.31698	2012-04-23 14:22:30.352239654 +0300
+++ /etc/network/interfaces	2012-04-23 14:23:56.320665977 +0300
@@ -8,10 +8,13 @@
 # The primary network interface
 allow-hotplug eth0
 iface eth0 inet static
-	address 192.168.15.4
+	#address 192.168.15.4
+	address 192.168.40.1
 	netmask 255.255.255.0
-	network 192.168.15.0
-	broadcast 192.168.15.255
-	gateway 192.168.15.254
+	#network 192.168.15.0
+	network 192.168.40.0
+	#broadcast 192.168.15.255
+	#gateway 192.168.15.254
+	gateway 192.168.40.254
 	# dns-* options are implemented by the resolvconf package, if installed
 	dns-search unix.nt
13:23:56
#/etc/init.d/d
dahdi  dbus
13:23:56
#dhc
dhclient         dhclient-script  dhcpd
13:23:56
#dhcpd start
Internet Systems Consortium DHCP Server 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Wrote 0 leases to leases file.
No subnet declaration for start (no IPv4 addresses).
** Ignoring requests on start.  If this is not what
   you want, please write a subnet declaration
   in your dhcpd.conf file for the network segment
   to which interface start is attached. **
Not configured to listen on any interfaces!
13:25:21
#vi /etc/dhcp/dhc
13:25:21
#/etc/init.d/networking restart
Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces ... (warning).
Reconfiguring network interfaces...SIOCDELRT: No such process
done.
13:26:36
#ping 192.168.40.254
PING 192.168.40.254 (192.168.40.254) 56(84) bytes of data.
64 bytes from 192.168.40.254: icmp_req=1 ttl=64 time=0.713 ms
64 bytes from 192.168.40.254: icmp_req=2 ttl=64 time=0.688 ms
64 bytes from 192.168.40.254: icmp_req=3 ttl=64 time=0.704 ms
64 bytes from 192.168.40.254: icmp_req=4 ttl=64 time=0.701 ms
^C
--- 192.168.40.254 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2998ms
rtt min/avg/max/mdev = 0.688/0.701/0.713/0.027 ms
13:27:01
#ping 192.168.30.1
PING 192.168.30.1 (192.168.30.1) 56(84) bytes of data.
^C
--- 192.168.30.1 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 999ms
13:27:28
#ping 192.168.20.1
PING 192.168.20.1 (192.168.20.1) 56(84) bytes of data.
^C
--- 192.168.20.1 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 1999ms
13:27:32
#ping 192.168.10.1
PING 192.168.10.1 (192.168.10.1) 56(84) bytes of data.
^C
--- 192.168.10.1 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2014ms
13:27:37
#ping 192.168.50.1
PING 192.168.50.1 (192.168.50.1) 56(84) bytes of data.
^C
--- 192.168.50.1 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2017ms
13:27:42
#vi /etc/dhcp/dhc
13:27:42
#vi /etc/dhcp/dhcpd.conf
13:30:36
#ifdown eth0
ifdown: interface eth0 not configured
13:30:44
#ifup eth0

13:30:55
#ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0f:fe:7e:b8:fb brd ff:ff:ff:ff:ff:ff
    inet 192.168.40.1/24 brd 192.168.40.255 scope global eth0
    inet6 fe80::20f:feff:fe7e:b8fb/64 scope link
       valid_lft forever preferred_lft forever
13:30:59
#ping 192.168.50.1
PING 192.168.50.1 (192.168.50.1) 56(84) bytes of data.
From 192.168.40.1 icmp_seq=1 Destination Host Unreachable
^C
--- 192.168.50.1 ping statistics ---
4 packets transmitted, 0 received, +1 errors, 100% packet loss, time 3016ms
13:31:17
#vi /etc/network/interfaces
--- /tmp/l3-saved-10017.12883.544	2012-04-23 14:31:29.398912602 +0300
+++ /etc/network/interfaces	2012-04-23 14:31:57.527052404 +0300
@@ -14,6 +14,7 @@
 	#network 192.168.15.0
 	network 192.168.40.0
 	#broadcast 192.168.15.255
+	broadcast 192.168.40.255
 	#gateway 192.168.15.254
 	gateway 192.168.40.254
 	# dns-* options are implemented by the resolvconf package, if installed
13:31:57
#/etc/init.d/networking restart
Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces ... (warning).
Reconfiguring network interfaces...done.
13:32:20
#ifdown eth0
ifdown: interface eth0 not configured
13:32:33
#ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0f:fe:7e:b8:fb brd ff:ff:ff:ff:ff:ff
    inet 192.168.40.1/24 brd 192.168.40.255 scope global eth0
    inet6 fe80::20f:feff:fe7e:b8fb/64 scope link tentative
       valid_lft forever preferred_lft forever
13:32:35
#ping 192.168.50.1
PING 192.168.50.1 (192.168.50.1) 56(84) bytes of data.
From 192.168.40.1 icmp_seq=3 Destination Host Unreachable
From 192.168.40.1 icmp_seq=4 Destination Host Unreachable
From 192.168.40.1 icmp_seq=7 Destination Host Unreachable
^C
--- 192.168.50.1 ping statistics ---
9 packets transmitted, 0 received, +3 errors, 100% packet loss, time 8026ms
pipe 2
13:32:52
#route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.40.254  0.0.0.0         UG    0      0        0 eth0
192.168.40.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
13:32:55
#^C

13:33:09
#ping 192.168.15.252
PING 192.168.15.252 (192.168.15.252) 56(84) bytes of data.
From 192.168.40.1 icmp_seq=1 Destination Host Unreachable
From 192.168.40.1 icmp_seq=3 Destination Host Unreachable
From 192.168.40.1 icmp_seq=4 Destination Host Unreachable
^C
--- 192.168.15.252 ping statistics ---
6 packets transmitted, 0 received, +3 errors, 100% packet loss, time 5022ms
pipe 2
13:34:23
#mtr 192.168.15.252
bash: mtr: command not found
13:34:37
#trace
traceproto        traceproto.db     traceroute        traceroute6       traceroute6.db    traceroute.db     traceroute-nanog
13:34:37
#m
Display all 112 possibilities? (y or n)
13:34:37
#mt
mt          mt-gnu      mtools      mtoolstest  mtrace      mtype
13:34:37
#mtrace 192.168.15.252
Cannot open mtrace data file at /usr/bin/mtrace line 148.
13:35:07
#traceroute 192.168.15.252
traceroute to 192.168.15.252 (192.168.15.252), 30 hops max, 60 byte packets
 1  192.168.40.1 (192.168.40.1)  3002.670 ms !H  3002.667 ms !H  3002.662 ms !H
13:35:47
#ping 192.168.40.254
PING 192.168.40.254 (192.168.40.254) 56(84) bytes of data.
From 192.168.40.1 icmp_seq=1 Destination Host Unreachable
From 192.168.40.1 icmp_seq=2 Destination Host Unreachable
From 192.168.40.1 icmp_seq=3 Destination Host Unreachable
64 bytes from 192.168.40.254: icmp_req=4 ttl=64 time=4.62 ms
64 bytes from 192.168.40.254: icmp_req=5 ttl=64 time=0.681 ms
64 bytes from 192.168.40.254: icmp_req=6 ttl=64 time=0.675 ms
64 bytes from 192.168.40.254: icmp_req=7 ttl=64 time=0.683 ms
64 bytes from 192.168.40.254: icmp_req=8 ttl=64 time=0.701 ms
64 bytes from 192.168.40.254: icmp_req=9 ttl=64 time=0.675 ms
^C
--- 192.168.40.254 ping statistics ---
9 packets transmitted, 6 received, +3 errors, 33% packet loss, time 8012ms
rtt min/avg/max/mdev = 0.675/1.340/4.626/1.469 ms, pipe 3
13:36:32
#ping 192.168.20.1
PING 192.168.20.1 (192.168.20.1) 56(84) bytes of data.
64 bytes from 192.168.20.1: icmp_req=1 ttl=63 time=0.590 ms
64 bytes from 192.168.20.1: icmp_req=2 ttl=63 time=0.561 ms
^C
--- 192.168.20.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.561/0.575/0.590/0.028 ms
13:36:37
#ping 192.168.10.1
PING 192.168.10.1 (192.168.10.1) 56(84) bytes of data.
64 bytes from 192.168.10.1: icmp_req=1 ttl=63 time=0.396 ms
64 bytes from 192.168.10.1: icmp_req=2 ttl=63 time=0.542 ms
64 bytes from 192.168.10.1: icmp_req=3 ttl=63 time=0.099 ms
64 bytes from 192.168.10.1: icmp_req=4 ttl=63 time=0.543 ms
^C
--- 192.168.10.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2998ms
rtt min/avg/max/mdev = 0.099/0.395/0.543/0.181 ms
13:36:42
#ping 192.168.30.1
PING 192.168.30.1 (192.168.30.1) 56(84) bytes of data.
64 bytes from 192.168.30.1: icmp_req=1 ttl=63 time=0.246 ms
64 bytes from 192.168.30.1: icmp_req=2 ttl=63 time=0.343 ms
^C
--- 192.168.30.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.246/0.294/0.343/0.051 ms
13:36:48
#ping 192.168.15.252
PING 192.168.15.252 (192.168.15.252) 56(84) bytes of data.
64 bytes from 192.168.15.252: icmp_req=1 ttl=63 time=0.544 ms
64 bytes from 192.168.15.252: icmp_req=2 ttl=63 time=0.253 ms
64 bytes from 192.168.15.252: icmp_req=3 ttl=63 time=0.500 ms
^C
--- 192.168.15.252 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.253/0.432/0.544/0.129 ms
13:36:57
#ping 192.168.50.1
PING 192.168.50.1 (192.168.50.1) 56(84) bytes of data.
^C
--- 192.168.50.1 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 4031ms
13:38:22
#vi /etc/dhcp/dhcpd.conf
13:40:25
#}
PING google.com (74.125.232.224) 56(84) bytes of data.
64 bytes from bud01s09-in-f0.1e100.net (74.125.232.224): icmp_req=1 ttl=55 time=25.2 ms
64 bytes from bud01s09-in-f0.1e100.net (74.125.232.224): icmp_req=2 ttl=55 time=25.2 ms
64 bytes from bud01s09-in-f0.1e100.net (74.125.232.224): icmp_req=3 ttl=55 time=25.2 ms
^C
--- google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 25.261/25.282/25.299/0.130 ms
13:40:32
#vi /etc/dhcp/dhcpd.conf
--- /tmp/l3-saved-10017.9771.133	2012-04-23 14:40:35.485620613 +0300
+++ /etc/dhcp/dhcpd.conf	2012-04-23 14:42:32.178200187 +0300
@@ -18,7 +18,7 @@
 
 # If this DHCP server is the official DHCP server for the local
 # network, the authoritative directive should be uncommented.
-#authoritative;
+authoritative;
 
 # Use this to send dhcp log messages to a different log file (you also
 # have to hack syslog.conf to complete the redirection).
@@ -27,15 +27,15 @@
 # No service will be given on this subnet, but declaring it helps the 
 # DHCP server to understand the network topology.
 
-#subnet 10.152.187.0 netmask 255.255.255.0 {
+#subnet 192.168.40.0 netmask 255.255.255.0 {
 #}
 
 # 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.40.0 netmask 255.255.255.224 {
+  range 192.168.40.10 192.168.40.100;
+  option routers 192.168.40.254;
+}
 
 # This declaration allows BOOTP clients to get dynamic addresses,
 # which we don't really recommend.
13:42:32
#dhcpd start
Internet Systems Consortium DHCP Server 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
bad range, address 192.168.40.100 not in subnet 192.168.40.0 netmask 255.255.255.224
13:42:42
#vi /etc/dhcp/dhcpd.conf
--- /tmp/l3-saved-10017.9988.2339	2012-04-23 14:42:51.502295039 +0300
+++ /etc/dhcp/dhcpd.conf	2012-04-23 14:44:35.210809298 +0300
@@ -32,7 +32,7 @@
 
 # This is a very basic subnet declaration.
 
-subnet 192.168.40.0 netmask 255.255.255.224 {
+subnet 192.168.40.0 netmask 255.255.255.0 {
   range 192.168.40.10 192.168.40.100;
   option routers 192.168.40.254;
 }
13:45:46
#ps ax |grep dhcp
13802 pts/2    S+     0:00 grep dhcp
13:46:04
#vi /etc/dhcp/dhcpd.conf
--- /tmp/l3-saved-10017.27144.18851	2012-04-23 14:46:09.023274288 +0300
+++ /etc/dhcp/dhcpd.conf	2012-04-23 14:49:15.780200358 +0300
@@ -32,10 +32,10 @@
 
 # This is a very basic subnet declaration.
 
-subnet 192.168.40.0 netmask 255.255.255.0 {
-  range 192.168.40.10 192.168.40.100;
-  option routers 192.168.40.254;
-}
+#subnet 192.168.40.0 netmask 255.255.255.0 {
+#  range 192.168.40.10 192.168.40.100;
+#  option routers 192.168.40.254;
+#}
 
 # This declaration allows BOOTP clients to get dynamic addresses,
 # which we don't really recommend.
@@ -47,15 +47,15 @@
 #}
 
 # A slightly different configuration for an internal subnet.
-#subnet 10.5.5.0 netmask 255.255.255.224 {
-#  range 10.5.5.26 10.5.5.30;
-#  option domain-name-servers ns1.internal.example.org;
-#  option domain-name "internal.example.org";
-#  option routers 10.5.5.1;
-#  option broadcast-address 10.5.5.31;
-#  default-lease-time 600;
-#  max-lease-time 7200;
-#}
+subnet 192.168.40.0 netmask 255.255.255.0 {
+  range 192.168.40.10 192.168.40.100;
+  #option domain-name-servers ns1.internal.example.org;
+  #option domain-name "internal.example.org";
+  option routers 192.168.40.254;
+  #option broadcast-address 10.5.5.31;
+  #default-lease-time 600;
+  #max-lease-time 7200;
+}
 
 # Hosts which require special configuration options can be listed in
 # host statements.   If no address is specified, the address will be
13:49:22
#vi /etc/dhcp/dhcpd.conf
13:55:25
#cat /etc/de
debconf.conf    debian_version  default/        defoma/         deluser.conf
13:55:25
#cat /etc/de
debconf.conf    debian_version  default/        defoma/         deluser.conf
13:55:25
#cat /etc/default/
acpid            bootlogd         dbus             grub             hdparm           kdm.d/           nfs-common       rcS              ssh
alsa             console-setup    devpts           hal              ifupdown         keyboard         ntpdate          rsync            tmpfs
asterisk         cron             exim4            halt             isc-dhcp-server  locale           portmap          rsyslog          useradd
13:55:25
#cd /etc/default/

13:56:14
#ls -la
total 116
drwxr-xr-x  3 root root 4096 Apr 23 14:18 .
drwxr-xr-x 94 root root 4096 Apr 23 12:41 ..
-rw-r--r--  1 root root  346 Nov 16  2010 acpid
-rw-r--r--  1 root root  638 Apr 23 11:44 alsa
-rw-r--r--  1 root root 3649 Feb 23  2011 asterisk
-rw-r--r--  1 root root   47 Jan  1  2011 bootlogd
-rw-r--r--  1 root root 2055 Apr 23 14:13 console-setup
-rw-r--r--  1 root root  653 Dec 19  2010 cron
-rw-r--r--  1 root root  297 Jun 12  2011 dbus
...
-rw-r--r--  1 root root   72 Apr 23 12:27 locale
-rw-r--r--  1 root root  794 Aug 26  2010 nfs-common
-rw-r--r--  1 root root  529 Dec 18  2006 ntpdate
-rw-r--r--  1 root root  386 Apr 23 14:17 portmap
-rw-r--r--  1 root root  282 Apr 23 14:18 rcS
-rw-r--r--  1 root root 1768 Feb 17  2010 rsync
-rw-r--r--  1 root root  321 Nov 30  2010 rsyslog
-rw-r--r--  1 root root  133 Mar 31  2010 ssh
-rw-r--r--  1 root root  289 Jan  1  2011 tmpfs
-rw-r--r--  1 root root 1118 Feb 15  2011 useradd
13:56:17
#cd ..

13:56:32
#cd default/
acpid            bootlogd         dbus             grub             hdparm           kdm.d/           nfs-common       rcS              ssh
alsa             console-setup    devpts           hal              ifupdown         keyboard         ntpdate          rsync            tmpfs
asterisk         cron             exim4            halt             isc-dhcp-server  locale           portmap          rsyslog          useradd
13:56:32
#cd default/
acpid            bootlogd         dbus             grub             hdparm           kdm.d/           nfs-common       rcS              ssh
alsa             console-setup    devpts           hal              ifupdown         keyboard         ntpdate          rsync            tmpfs
asterisk         cron             exim4            halt             isc-dhcp-server  locale           portmap          rsyslog          useradd
13:56:32
#cd default/

13:56:54
#vi isc-dhcp-server
--- /tmp/l3-saved-10017.188.24486	2012-04-23 14:57:06.926535159 +0300
+++ isc-dhcp-server	2012-04-23 14:57:21.486608572 +0300
@@ -8,4 +8,4 @@
 
 # On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
 #	Separate multiple interfaces with spaces, e.g. "eth0 eth1".
-INTERFACES=""
+INTERFACES="eth0"
13:57:21
#dhcpd restart
Internet Systems Consortium DHCP Server 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Wrote 1 leases to leases file.
No subnet declaration for restart (no IPv4 addresses).
** Ignoring requests on restart.  If this is not what
   you want, please write a subnet declaration
   in your dhcpd.conf file for the network segment
   to which interface restart is attached. **
Not configured to listen on any interfaces!
13:57:39
#dhcpd --help
Internet Systems Consortium DHCP Server 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
Usage: dhcpd [-p <UDP port #>] [-f] [-d] [-q] [-t|-T]
             [-4|-6] [-cf config-file] [-lf lease-file]
             [-tf trace-output-file]
             [-play trace-input-file]
             [-pf pid-file] [-s server] [if0 [...ifN]]
13:57:52
#ps ax |grep dhcp
13831 ?        Ss     0:00 dhcpd
13941 pts/2    S+     0:00 grep dhcp
13:58:36
#kill -HUP 13831

13:58:49
#/etc/init.d/isc-dhcp-server restart
Stopping ISC DHCP server: dhcpdstart-stop-daemon: warning: failed to kill 13831: No such process
 failed!
Starting ISC DHCP server: dhcpd.
13:59:38
#ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0f:fe:7e:b8:fb brd ff:ff:ff:ff:ff:ff
    inet 192.168.40.1/24 brd 192.168.40.255 scope global eth0
    inet6 fe80::20f:feff:fe7e:b8fb/64 scope link
       valid_lft forever preferred_lft forever
14:03:05
#vi /etc/dhcp/dhcpd.conf
14:06:26
#option domain-name "internal.example.org";
The authenticity of host '192.168.50.1 (192.168.50.1)' can't be established.
RSA key fingerprint is 04:93:5b:b5:f1:59:3c:0c:38:37:bb:d2:f9:55:28:6b.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.50.1' (RSA) to the list of known hosts.
root@192.168.50.1's password:
Linux linux5 2.6.39-bpo.2-686-pae #1 SMP Thu Aug 4 11:02:22 UTC 2011 i686
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Apr 23 14:18:55 2012 from 192.168.15.105
l3-agent is already running: pid=7560; pidfile=/root/.lilalo/l3-agent.pid
14:06:46
#vi /etc/dhcp/dhcpd.conf
14:08:27
#ssh root@192.168.50.1
root@192.168.50.1's password:
Linux linux5 2.6.39-bpo.2-686-pae #1 SMP Thu Aug 4 11:02:22 UTC 2011 i686
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Apr 23 15:06:45 2012 from linux4.unix.nt
l3-agent is already running: pid=7560; pidfile=/root/.lilalo/l3-agent.pid
14:09:14
#vi /etc/default/isc-dhcp-server
14:09:36
#exit
exit
Connection to 192.168.50.1 closed.
14:10:12
#vi /etc/asterisk/sip.conf
14:15:25
#cat /var/lib/dhcp/dhc
dhclient.leases  dhcpd.leases     dhcpd.leases~
14:15:25
#cat /var/lib/dhcp/dhc
dhclient.leases  dhcpd.leases     dhcpd.leases~
14:15:25
#cat /var/lib/dhcp/dhcpd.leases
# The format of this file is documented in the dhcpd.leases(5) manual page.
# This lease file was written by isc-dhcp-4.1.1-P1
lease 192.168.40.10 {
  starts 1 2012/04/23 11:55:38;
  ends 1 2012/04/23 12:05:38;
  tstp 1 2012/04/23 12:05:38;
  cltt 1 2012/04/23 11:55:38;
  binding state active;
  next binding state free;
  hardware ethernet 00:1b:fc:f3:83:13;
...
}
lease 192.168.40.11 {
  starts 1 2012/04/23 12:14:24;
  ends 1 2012/04/23 12:24:24;
  cltt 1 2012/04/23 12:14:24;
  binding state active;
  next binding state free;
  hardware ethernet 00:1b:fc:f3:83:13;
  client-hostname "yad-nb";
}
14:16:07
#ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0f:fe:7e:b8:fb brd ff:ff:ff:ff:ff:ff
    inet 192.168.40.1/24 brd 192.168.40.255 scope global eth0
    inet6 fe80::20f:feff:fe7e:b8fb/64 scope link
       valid_lft forever preferred_lft forever
14:21:17
#cat /var/lib/dhcp/dhcpd.leases
# The format of this file is documented in the dhcpd.leases(5) manual page.
# This lease file was written by isc-dhcp-4.1.1-P1
lease 192.168.40.10 {
  starts 1 2012/04/23 11:55:38;
  ends 1 2012/04/23 12:05:38;
  tstp 1 2012/04/23 12:05:38;
  cltt 1 2012/04/23 11:55:38;
  binding state active;
  next binding state free;
  hardware ethernet 00:1b:fc:f3:83:13;
...
  hardware ethernet 00:1b:fc:f3:83:13;
  client-hostname "yad-nb";
}
lease 192.168.40.11 {
  starts 1 2012/04/23 12:17:12;
  ends 1 2012/04/23 12:17:12;
  tstp 1 2012/04/23 12:17:12;
  cltt 1 2012/04/23 12:17:12;
  binding state free;
}
14:21:32
#cat /var/lib/dhcp/dhcpd.leases
# The format of this file is documented in the dhcpd.leases(5) manual page.
# This lease file was written by isc-dhcp-4.1.1-P1
lease 192.168.40.10 {
  starts 1 2012/04/23 11:55:38;
  ends 1 2012/04/23 12:05:38;
  tstp 1 2012/04/23 12:05:38;
  cltt 1 2012/04/23 11:55:38;
  binding state active;
  next binding state free;
  hardware ethernet 00:1b:fc:f3:83:13;
...
lease 192.168.40.13 {
  starts 1 2012/04/23 12:22:15;
  ends 1 2012/04/23 12:32:15;
  cltt 1 2012/04/23 12:22:15;
  binding state active;
  next binding state free;
  hardware ethernet 00:0e:08:dd:77:9f;
  uid "\001\000\016\010\335w\237";
  client-hostname "SipuraSPA";
}
14:25:30
#vi /etc/asterisk/sip.conf
--- /tmp/l3-saved-10017.14557.21066	2012-04-23 15:25:39.583028199 +0300
+++ /etc/asterisk/sip.conf	2012-04-23 15:48:29.417822029 +0300
@@ -222,7 +222,7 @@
                                 ; Parkinglots are configured in features.conf
 ;language=en                    ; Default language setting for all users/peers
                                 ; This may also be set for individual users/peers
-;relaxdtmf=yes                  ; Relax dtmf handling
+relaxdtmf=yes                  ; Relax dtmf handling
 ;trustrpid = no                 ; If Remote-Party-ID should be trusted
 ;sendrpid = yes                 ; If Remote-Party-ID should be sent
 ;prematuremedia=no		; Some ISDN links send empty media frames before 
@@ -251,7 +251,7 @@
                                 ; of performing a "hairpin" call.
 ;usereqphone = no               ; If yes, ";user=phone" is added to uri that contains
                                 ; a valid phone number
-;dtmfmode = rfc2833             ; Set default dtmfmode for sending DTMF. Default: rfc2833
+dtmfmode = rfc2833             ; Set default dtmfmode for sending DTMF. Default: rfc2833
                                 ; Other options: 
                                 ; info : SIP INFO messages (application/dtmf-relay)
                                 ; shortinfo : SIP INFO messages (application/dtmf)
прошло 22 минуты
14:48:29
#cp sip.conf sip.conf-old
cp: cannot stat `sip.conf': No such file or directory
14:49:02
#cd /etc/asterisk/

14:49:28
#cp sip.conf sip.conf-old

14:49:45
#echo "" sip.conf
 sip.conf
14:49:59
#echo "" > sip.conf

14:50:05
#vi sip.conf
--- /tmp/l3-saved-10017.6455.29746	2012-04-23 15:50:11.394327618 +0300
+++ sip.conf	2012-04-23 15:50:39.358466883 +0300
@@ -1 +1,12 @@
+context = default
+
+[4001]
+type=friend
+secret=1234
+host=dynamic
+
+[4002]
+type=friend
+secret=1234
+host=dynamic
 
14:50:39
#asterisk -r
Asterisk 1.6.2.9-2+squeeze4, 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+squeeze4 currently running on linux4 (pid = 12900)
Verbosity is at least 5
linux4*CLI> core restart now
linux4*CLI>
Disconnected from Asterisk server
14:50:55
#asterisk -r
Asterisk 1.6.2.9-2+squeeze4, 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+squeeze4 currently running on linux4 (pid = 14250)
linux4*CLI> co
config   console  core
...
   udptl set debug {on|off|ip} Enable/Disable UDPTL debugging
                        ulimit Set or show process resource limits
                unistim reload Reload UNISTIM configuration
           unistim send packet Send packet (for reverse engineering)
    unistim set debug {on|off} Toggle UNITSTIM debugging
             unistim show info Show UNISTIM info
              voicemail reload Reload voicemail configuration
          voicemail show users List defined voicemail boxes
          voicemail show zones List zone message formats
linux4*CLI> quit

Файлы

  • /etc/de
  • /etc/default/
  • /var/lib/dhcp/dhc
  • /var/lib/dhcp/dhcpd.leases
  • /etc/de
    >
    debconf.conf    debian_version  default/        defoma/         deluser.conf
    
    /etc/default/
    >
    acpid            bootlogd         dbus             grub             hdparm           kdm.d/           nfs-common       rcS              ssh
    alsa             console-setup    devpts           hal              ifupdown         keyboard         ntpdate          rsync            tmpfs
    asterisk         cron             exim4            halt             isc-dhcp-server  locale           portmap          rsyslog          useradd
    
    /var/lib/dhcp/dhc
    >
    dhclient.leases  dhcpd.leases     dhcpd.leases~
    
    /var/lib/dhcp/dhcpd.leases
    >
    # The format of this file is documented in the dhcpd.leases(5) manual page.
    # This lease file was written by isc-dhcp-4.1.1-P1
    lease 192.168.40.10 {
      starts 1 2012/04/23 11:55:38;
      ends 1 2012/04/23 12:05:38;
      tstp 1 2012/04/23 12:05:38;
      cltt 1 2012/04/23 11:55:38;
      binding state active;
      next binding state free;
      hardware ethernet 00:1b:fc:f3:83:13;
      client-hostname "yad-nb";
    }
    server-duid "\000\001\000\001\027'\376B\000\017\376~\270\373";
    lease 192.168.40.10 {
      starts 1 2012/04/23 11:59:40;
      ends 1 2012/04/23 11:59:40;
      tstp 1 2012/04/23 11:59:40;
      cltt 1 2012/04/23 11:59:40;
      binding state abandoned;
      next binding state free;
    }
    lease 192.168.40.11 {
      starts 1 2012/04/23 11:59:53;
      ends 1 2012/04/23 12:09:53;
      cltt 1 2012/04/23 11:59:53;
      binding state active;
      next binding state free;
      hardware ethernet 00:1b:fc:f3:83:13;
      client-hostname "yad-nb";
    }
    lease 192.168.40.10 {
      starts 1 2012/04/23 11:59:40;
      ends 1 2012/04/23 11:59:40;
      tstp 1 2012/04/23 11:59:40;
      cltt 1 2012/04/23 11:59:40;
      binding state free;
    }
    lease 192.168.40.11 {
      starts 1 2012/04/23 12:06:06;
      ends 1 2012/04/23 12:16:06;
      cltt 1 2012/04/23 12:06:06;
      binding state active;
      next binding state free;
      hardware ethernet 00:1b:fc:f3:83:13;
      client-hostname "yad-nb";
    }
    lease 192.168.40.11 {
      starts 1 2012/04/23 12:10:29;
      ends 1 2012/04/23 12:20:29;
      cltt 1 2012/04/23 12:10:29;
      binding state active;
      next binding state free;
      hardware ethernet 00:1b:fc:f3:83:13;
      client-hostname "yad-nb";
    }
    lease 192.168.40.11 {
      starts 1 2012/04/23 12:14:24;
      ends 1 2012/04/23 12:24:24;
      cltt 1 2012/04/23 12:14:24;
      binding state active;
      next binding state free;
      hardware ethernet 00:1b:fc:f3:83:13;
      client-hostname "yad-nb";
    }
    lease 192.168.40.11 {
      starts 1 2012/04/23 12:17:12;
      ends 1 2012/04/23 12:17:12;
      tstp 1 2012/04/23 12:17:12;
      cltt 1 2012/04/23 12:17:12;
      binding state abandoned;
      next binding state free;
    }
    lease 192.168.40.12 {
      starts 1 2012/04/23 12:17:21;
      ends 1 2012/04/23 12:27:21;
      cltt 1 2012/04/23 12:17:21;
      binding state active;
      next binding state free;
      hardware ethernet 00:1b:fc:f3:83:13;
      client-hostname "yad-nb";
    }
    lease 192.168.40.11 {
      starts 1 2012/04/23 12:17:12;
      ends 1 2012/04/23 12:17:12;
      tstp 1 2012/04/23 12:17:12;
      cltt 1 2012/04/23 12:17:12;
      binding state free;
    }
    lease 192.168.40.12 {
      starts 1 2012/04/23 12:22:13;
      ends 1 2012/04/23 12:32:13;
      cltt 1 2012/04/23 12:22:13;
      binding state active;
      next binding state free;
      hardware ethernet 00:1b:fc:f3:83:13;
      client-hostname "yad-nb";
    }
    lease 192.168.40.13 {
      starts 1 2012/04/23 12:22:15;
      ends 1 2012/04/23 12:32:15;
      cltt 1 2012/04/23 12:22:15;
      binding state active;
      next binding state free;
      hardware ethernet 00:0e:08:dd:77:9f;
      uid "\001\000\016\010\335w\237";
      client-hostname "SipuraSPA";
    }
    

    Статистика

    Время первой команды журнала11:17:12 2012- 4-23
    Время последней команды журнала14:50:55 2012- 4-23
    Количество командных строк в журнале100
    Процент команд с ненулевым кодом завершения, %17.00
    Процент синтаксически неверно набранных команд, % 4.00
    Суммарное время работы с терминалом *, час 2.28
    Количество командных строк в единицу времени, команда/мин 0.73
    Частота использования команд
    vi18|================| 16.98%
    ping14|=============| 13.21%
    cat8|=======| 7.55%
    asterisk6|=====| 5.66%
    cd6|=====| 5.66%
    dhcpd4|===| 3.77%
    ip4|===| 3.77%
    ps4|===| 3.77%
    grep4|===| 3.77%
    apt-get3|==| 2.83%
    cp2|=| 1.89%
    dpkg-reconfigure2|=| 1.89%
    echo2|=| 1.89%
    dh2|=| 1.89%
    ls2|=| 1.89%
    /etc/init.d/networking2|=| 1.89%
    ifdown2|=| 1.89%
    dpkg1|| 0.94%
    }1|| 0.94%
    sip.conf1|| 0.94%
    m1|| 0.94%
    traceroute1|| 0.94%
    /etc/init.d/d1|| 0.94%
    option1|| 0.94%
    mt1|| 0.94%
    mtrace1|| 0.94%
    dhc1|| 0.94%
    ifup1|| 0.94%
    route1|| 0.94%
    mtr1|| 0.94%
    less1|| 0.94%
    trace1|| 0.94%
    /etc/init.d/isc-dhcp-server1|| 0.94%
    kill1|| 0.94%
    ^C1|| 0.94%
    ssh1|| 0.94%
    exit1|| 0.94%
    apt-cache1|| 0.94%
    ____
    *) Интервалы неактивности длительностью 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$