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

Содержание

Журнал

Среда (02/22/12)

/dev/pts/1
15:32:18
#ping 192.168.30.13
PING 192.168.30.13 (192.168.30.13) 56(84) bytes of data.
64 bytes from 192.168.30.13: icmp_req=1 ttl=64 time=0.237 ms
64 bytes from 192.168.30.13: icmp_req=2 ttl=64 time=0.137 ms
^C
--- 192.168.30.13 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.137/0.187/0.237/0.050 ms
/dev/pts/2
15:32:37
#ssh root@192.168.30.13
ssh: connect to host 192.168.30.13 port 22: Connection refused
/dev/pts/1
15:32:37
#ssh root@192.168.30.13
ssh: connect to host 192.168.30.13 port 22: Connection refused
/dev/pts/2
15:32:49
#ssh root@192.168.30.13
The authenticity of host '192.168.30.13 (192.168.30.13)' can't be established.
RSA key fingerprint is 93:2a:cb:dc:8d:e9:3d:e1:3a:e7:ed:db:ad:1d:cc:53.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.30.13' (RSA) to the list of known hosts.
root@192.168.30.13's password:
Linux debian3 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: Wed Feb 22 14:30:36 2012
root@debian3:~#
root@debian3:~#
root@debian3:~#
root@debian3:~# exit
logout
Connection to 192.168.30.13 closed.
/dev/pts/1
15:32:49
#ssh root@192.168.30.13
The authenticity of host '192.168.30.13 (192.168.30.13)' can't be established.
RSA key fingerprint is 93:2a:cb:dc:8d:e9:3d:e1:3a:e7:ed:db:ad:1d:cc:53.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.30.13' (RSA) to the list of known hosts.
root@192.168.30.13's password:
Linux debian3 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: Wed Feb 22 14:30:36 2012
root@debian3:~#
root@debian3:~#
root@debian3:~#
root@debian3:~# exit
logout
Connection to 192.168.30.13 closed.
/dev/pts/2
15:35:07
#ssh root@192.168.30.13
root@192.168.30.13's password:
Permission denied, please try again.
root@192.168.30.13's password:
Linux debian3 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: Wed Feb 22 14:34:30 2012 from 192.168.30.3
root@debian13:~# exit
logout
Connection to 192.168.30.13 closed.
/dev/pts/1
15:35:07
#ssh root@192.168.30.13
root@192.168.30.13's password:
Permission denied, please try again.
root@192.168.30.13's password:
Linux debian3 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: Wed Feb 22 14:34:30 2012 from 192.168.30.3
root@debian13:~# exit
logout
Connection to 192.168.30.13 closed.
/dev/pts/2
15:36:23
#brctl show
bridge name     bridge id               STP enabled     interfaces
br30            8000.0007e90c4511       no              eth0.30
                                                        tap0
pan0            8000.000000000000       no
/dev/pts/1
15:36:23
#brctl show
bridge name     bridge id               STP enabled     interfaces
br30            8000.0007e90c4511       no              eth0.30
                                                        tap0
pan0            8000.000000000000       no
/dev/pts/2
15:36:28
#ssh -X root@192.168.30.13
root@192.168.30.13's password:
Linux debian3 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: Wed Feb 22 14:35:19 2012 from 192.168.30.3
/usr/bin/xauth:  creating new authority file /root/.Xauthority
root@debian13:~# xclock
...
root@debian13:~# bg
[1]+ iceweasel &
root@debian13:~# ls -l
total 4
drwxr-xr-x 2 root root 4096 Feb 22 14:43 Downloads
root@debian13:~# ls -l Downloads/
total 20
-rw-r--r-- 1 root root 19491 Feb 22 14:43 circle.htm
root@debian13:~# Connection to 192.168.30.13 closed by remote host.
Connection to 192.168.30.13 closed.
/dev/pts/1
15:36:28
#ssh -X root@192.168.30.13
root@192.168.30.13's password:
Linux debian3 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: Wed Feb 22 14:35:19 2012 from 192.168.30.3
/usr/bin/xauth:  creating new authority file /root/.Xauthority
root@debian13:~# xclock
...
root@debian13:~# bg
[1]+ iceweasel &
root@debian13:~# ls -l
total 4
drwxr-xr-x 2 root root 4096 Feb 22 14:43 Downloads
root@debian13:~# ls -l Downloads/
total 20
-rw-r--r-- 1 root root 19491 Feb 22 14:43 circle.htm
root@debian13:~# Connection to 192.168.30.13 closed by remote host.
Connection to 192.168.30.13 closed.
прошло 16 минут
/dev/pts/2
15:53:05
#vim ./start-kvm
--- /tmp/l3-saved-3925.13968.19548	2012-02-22 16:54:07.000000000 +0200
+++ ./start-kvm	2012-02-22 16:54:33.000000000 +0200
@@ -2,4 +2,4 @@
 kvm -m 1024 \
 -net nic,vlan=0 -net tap,ifname=tap0,script=/etc/qemu-ifup-my -hda /dev/VG0/vol1 \
 -kernel /boot/vmlinuz-2.6.39-bpo.2-686-pae -initrd /boot/initrd.img-2.6.39-bpo.2-686-pae \
-        -append root=/dev/sda
+        -append root=/dev/sda -nographic
/dev/pts/1
15:53:05
#vim ./start-kvm
/dev/pts/2
15:54:33
#./start-kvm
umount: /dev/VG0/vol1: not mounted
/dev/pts/1
15:54:33
#./start-kvm
umount: /dev/VG0/vol1: not mounted
/dev/pts/2
15:58:04
#./start-kvm
umount: /dev/VG0/vol1: not mounted
/dev/pts/1
15:58:04
#./start-kvm
umount: /dev/VG0/vol1: not mounted
/dev/pts/8
15:58:37
#vim ./start-kvm
--- /tmp/l3-saved-12085.28120.14974	2012-02-22 16:58:44.000000000 +0200
+++ ./start-kvm	2012-02-22 16:59:16.000000000 +0200
@@ -2,4 +2,4 @@
 kvm -m 1024 \
 -net nic,vlan=0 -net tap,ifname=tap0,script=/etc/qemu-ifup-my -hda /dev/VG0/vol1 \
 -kernel /boot/vmlinuz-2.6.39-bpo.2-686-pae -initrd /boot/initrd.img-2.6.39-bpo.2-686-pae \
-        -append root=/dev/sda -nographic
+        -append root=/dev/sda -nographic -daemonize
/dev/pts/7
15:58:37
#vim ./start-kvm
/dev/pts/2
15:59:32
#bash: sssshsdafasdf: command not found

/dev/pts/1
15:59:32
#bash: sssshsdafasdf: command not found

/dev/pts/2
16:00:00
#usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]
           [-D [bind_address:]port] [-e escape_char] [-F configfile]
           [-I pkcs11] [-i identity_file]
           [-L [bind_address:]port:host:hostport]
           [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
           [-R [bind_address:]port:host:hostport] [-S ctl_path]
           [-W host:port] [-w local_tun[:remote_tun]]
           [user@]hostname [command]
/dev/pts/1
16:00:00
#usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]
           [-D [bind_address:]port] [-e escape_char] [-F configfile]
           [-I pkcs11] [-i identity_file]
           [-L [bind_address:]port:host:hostport]
           [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
           [-R [bind_address:]port:host:hostport] [-S ctl_path]
           [-W host:port] [-w local_tun[:remote_tun]]
           [user@]hostname [command]
/dev/pts/2
16:00:04
#State Recv-Q Send-Q Local Address:Port Peer Address:Port
ESTAB       0      0                              10.0.35.43:39696                           10.0.35.40:ssh
/dev/pts/1
16:00:04
#State Recv-Q Send-Q Local Address:Port Peer Address:Port
ESTAB       0      0                              10.0.35.43:39696                           10.0.35.40:ssh
/dev/pts/2
16:00:06
#bash: dsfg: command not found

/dev/pts/1
16:00:06
#bash: dsfg: command not found

/dev/pts/2
16:01:28
#bash: d: command not found

/dev/pts/1
16:01:28
#bash: d: command not found

/dev/pts/2
16:01:32
#bash: e: command not found

/dev/pts/1
16:01:32
#bash: e: command not found

/dev/pts/2
16:01:35
#bash: sdfdsfdsfdsfdsf: command not found

/dev/pts/1
16:01:35
#bash: sdfdsfdsfdsfdsf: command not found

/dev/pts/8
16:03:14
#ssh root@192.168.30.13
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
"/etc/rc.local" 14L, 306C
cat <<EOF > /dev/ttyS0
`hostname` is ready.
`date`
Use SSH to access the host.
Address: `ip addr show eth0 | grep 'inet '`
EOF
exit 0
root@debian13:~# init 0
root@debian13:~# Connection to 192.168.30.13 closed by remote host.
Connection to 192.168.30.13 closed.
/dev/pts/7
16:03:14
#ssh root@192.168.30.13
Get:2 http://10.0.35.1/debian/ squeeze/main vim-runtime all 2:7.2.445+hg~cb94c42c0e1a-1 [6207 kB]
Get:3 http://10.0.35.1/debian/ squeeze/main vim i386 2:7.2.445+hg~cb94c42c0e1a-1 [798 kB]
Fetched 7039 kB in 0s (10.5 MB/s)
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
cat <<EOF > /dev/ttyS0
`hostname` is ready.
`date`
Use SSH to access the host.
Address: `ip addr show eth0 | grep 'inet '`
EOF
exit 0
root@debian13:~# init 0
root@debian13:~# Connection to 192.168.30.13 closed by remote host.
Connection to 192.168.30.13 closed.
/dev/pts/1
16:08:54
#bash: srfdfgs: command not found

/dev/pts/2
16:08:54
#bash: srfdfgs: command not found

16:08:55
#speed 38400 baud; rows 52; columns 113; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q;
stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon -iexten -echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke
/dev/pts/1
16:08:55
#speed 38400 baud; rows 52; columns 113; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q;
stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon -iexten -echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke
/dev/pts/2
16:09:08
#stty -a
speed 38400 baud; rows 52; columns 113; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q;
stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -ixon -ixoff -iuclc -ixany imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke
/dev/pts/1
16:09:08
#stty -a
speed 38400 baud; rows 52; columns 113; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q;
stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -ixon -ixoff -iuclc -ixany imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke
/dev/pts/2
16:09:55
#vim ./start-kvm
--- /tmp/l3-saved-3925.15988.20345	2012-02-22 17:10:46.000000000 +0200
+++ ./start-kvm	2012-02-22 17:11:40.000000000 +0200
@@ -3,3 +3,4 @@
 -net nic,vlan=0 -net tap,ifname=tap0,script=/etc/qemu-ifup-my -hda /dev/VG0/vol1 \
 -kernel /boot/vmlinuz-2.6.39-bpo.2-686-pae -initrd /boot/initrd.img-2.6.39-bpo.2-686-pae \
         -append root=/dev/sda -nographic -daemonize
+stty sane
/dev/pts/1
16:09:55
#vim ./start-kvm
/dev/pts/2
16:11:40
#vim ./start-kvm
--- /tmp/l3-saved-3925.6564.28454	2012-02-22 17:12:07.000000000 +0200
+++ ./start-kvm	2012-02-22 17:13:07.000000000 +0200
@@ -2,5 +2,5 @@
 kvm -m 1024 \
 -net nic,vlan=0 -net tap,ifname=tap0,script=/etc/qemu-ifup-my -hda /dev/VG0/vol1 \
 -kernel /boot/vmlinuz-2.6.39-bpo.2-686-pae -initrd /boot/initrd.img-2.6.39-bpo.2-686-pae \
-        -append root=/dev/sda -nographic -daemonize
+        -append root=/dev/sda -nographic #-daemonize
 stty sane
/dev/pts/1
16:11:40
#vim ./start-kvm
/dev/pts/2
16:13:07
#./start-kvm
umount: /dev/VG0/vol1: not mounted
debian13 is ready.
Wed Feb 22 15:13:25 UTC 2012
Use SSH to access the host.
Address:     inet 192.168.30.13/24 brd 192.168.30.255 scope global eth0
/dev/pts/1
16:13:07
#./start-kvm
umount: /dev/VG0/vol1: not mounted
debian13 is ready.
Wed Feb 22 15:13:25 UTC 2012
Use SSH to access the host.
Address:     inet 192.168.30.13/24 brd 192.168.30.255 scope global eth0
/dev/pts/11
16:17:12
#ssh root@192.168.30.13
# dmidecode 2.9
root@192.168.30.13's password:
Linux debian13 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: Wed Feb 22 15:03:26 2012 from 192.168.30.3
root@debian13:~# grep vmx /proc/cpuinfo
...
        Partition Row Position: 1
Handle 0x2000, DMI type 32, 11 bytes
System Boot Information
        Status: No errors detected
Handle 0x7F00, DMI type 127, 4 bytes
End Of Table
[1]+  Stopped                 dmidecode | less
root@debian13:~# init 0
root@debian13:~# Connection to 192.168.30.13 closed by remote host.
Connection to 192.168.30.13 closed.
/dev/pts/12
16:17:12
#ssh root@192.168.30.13
root@192.168.30.13's password:
Linux debian13 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
# dmidecode 2.9
permitted by applicable law.
Last login: Wed Feb 22 15:03:26 2012 from 192.168.30.3
root@debian13:~# grep vmx /proc/cpuinfo
...
        Partition Row Position: 1
Handle 0x2000, DMI type 32, 11 bytes
System Boot Information
        Status: No errors detected
Handle 0x7F00, DMI type 127, 4 bytes
End Of Table
[1]+  Stopped                 dmidecode | less
root@debian13:~# init 0
root@debian13:~# Connection to 192.168.30.13 closed by remote host.
Connection to 192.168.30.13 closed.
прошло 24 минуты
/dev/pts/2
16:41:24
#init 0

/dev/pts/1
16:41:24
#init 0

Четверг (02/23/12)

/dev/pts/1
08:58:23
#ssh user@10.0.35.40
Handle 0x0002, DMI type 1, 27 bytes
System Information
        Manufacturer: Hewlett-Packard
        Product Name:
[root@debian5:~]#
[root@debian5:~]# apt-cache search linux image xen
linux-headers-2.6.32-5-xen-686 - Header files for Linux 2.6.32-5-xen-686
linux-image-2.6.32-5-xen-686-dbg - Debugging infos for Linux 2.6.32-5-xen-686
linux-image-2.6.32-5-xen-686 - Linux 2.6.32 for modern PCs, Xen dom0 support
xen-linux-system-2.6.32-5-xen-686 - Xen system with Linux 2.6.32 on modern PCs (meta-package)
...
[root@debian5:~]# Write failed: Broken pipe
user@book:~$ ssh root@10.0.35.45
root@10.0.35.45's password:
Linux debian5 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: Wed Feb 22 15:08:19 2012 from 10.0.35.40
/dev/pts/2
08:58:23
#ssh user@10.0.35.40
        ID: FB 06 00 00 FF FB EB BF
[root@debian5:~]# dmidecode | head -40
# dmidecode 2.9
SMBIOS 2.5 present.
78 structures occupying 2325 bytes.
Table at 0x000EA0C0.
Handle 0x0001, DMI type 0, 24 bytes
BIOS Information
        Vendor: Hewlett-Packard
        Version: 786F1 v01.04
...
[root@debian5:~]# Write failed: Broken pipe
user@book:~$ ssh root@10.0.35.45
root@10.0.35.45's password:
Linux debian5 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: Wed Feb 22 15:08:19 2012 from 10.0.35.40
/dev/pts/5
08:59:21
#ifconfig
eth0      Link encap:Ethernet  HWaddr 00:07:e9:0c:45:11
          inet addr:10.0.35.43  Bcast:10.0.35.255  Mask:255.255.255.0
          inet6 addr: fe80::207:e9ff:fe0c:4511/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:45946 errors:0 dropped:8 overruns:0 frame:0
          TX packets:632 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3975282 (3.7 MiB)  TX bytes:79750 (77.8 KiB)
eth0.30   Link encap:Ethernet  HWaddr 00:07:e9:0c:45:11
          inet addr:192.168.30.3  Bcast:192.168.30.255  Mask:255.255.255.0
...
          collisions:0 txqueuelen:0
          RX bytes:2204 (2.1 KiB)  TX bytes:6078 (5.9 KiB)
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:800 (800.0 B)  TX bytes:800 (800.0 B)
/dev/pts/6
08:59:21
#ifconfig
eth0      Link encap:Ethernet  HWaddr 00:07:e9:0c:45:11
          inet addr:10.0.35.43  Bcast:10.0.35.255  Mask:255.255.255.0
          inet6 addr: fe80::207:e9ff:fe0c:4511/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:45946 errors:0 dropped:8 overruns:0 frame:0
          TX packets:632 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3975282 (3.7 MiB)  TX bytes:79750 (77.8 KiB)
eth0.30   Link encap:Ethernet  HWaddr 00:07:e9:0c:45:11
          inet addr:192.168.30.3  Bcast:192.168.30.255  Mask:255.255.255.0
...
          collisions:0 txqueuelen:0
          RX bytes:2204 (2.1 KiB)  TX bytes:6078 (5.9 KiB)
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:800 (800.0 B)  TX bytes:800 (800.0 B)
/dev/pts/5
09:08:12
#ping 10.0.35.1
PING 10.0.35.1 (10.0.35.1) 56(84) bytes of data.
64 bytes from 10.0.35.1: icmp_req=1 ttl=64 time=0.242 ms
64 bytes from 10.0.35.1: icmp_req=2 ttl=64 time=0.361 ms
64 bytes from 10.0.35.1: icmp_req=3 ttl=64 time=0.232 ms
^C
--- 10.0.35.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.232/0.278/0.361/0.060 ms
/dev/pts/6
09:08:12
#ping 10.0.35.1
PING 10.0.35.1 (10.0.35.1) 56(84) bytes of data.
64 bytes from 10.0.35.1: icmp_req=1 ttl=64 time=0.242 ms
64 bytes from 10.0.35.1: icmp_req=2 ttl=64 time=0.361 ms
64 bytes from 10.0.35.1: icmp_req=3 ttl=64 time=0.232 ms
^C
--- 10.0.35.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.232/0.278/0.361/0.060 ms
/dev/pts/5
09:08:32
#ping google.com
PING google.com (173.194.70.102) 56(84) bytes of data.
64 bytes from fa-in-f102.1e100.net (173.194.70.102): icmp_req=1 ttl=50 time=38.6 ms
64 bytes from fa-in-f102.1e100.net (173.194.70.102): icmp_req=2 ttl=50 time=38.6 ms
64 bytes from fa-in-f102.1e100.net (173.194.70.102): icmp_req=3 ttl=50 time=38.5 ms
64 bytes from fa-in-f102.1e100.net (173.194.70.102): icmp_req=4 ttl=50 time=38.5 ms
64 bytes from fa-in-f102.1e100.net (173.194.70.102): icmp_req=5 ttl=50 time=38.5 ms
^C
--- google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4005ms
rtt min/avg/max/mdev = 38.577/38.603/38.648/0.126 ms
/dev/pts/6
09:08:32
#ping google.com
PING google.com (173.194.70.102) 56(84) bytes of data.
64 bytes from fa-in-f102.1e100.net (173.194.70.102): icmp_req=1 ttl=50 time=38.6 ms
64 bytes from fa-in-f102.1e100.net (173.194.70.102): icmp_req=2 ttl=50 time=38.6 ms
64 bytes from fa-in-f102.1e100.net (173.194.70.102): icmp_req=3 ttl=50 time=38.5 ms
64 bytes from fa-in-f102.1e100.net (173.194.70.102): icmp_req=4 ttl=50 time=38.5 ms
64 bytes from fa-in-f102.1e100.net (173.194.70.102): icmp_req=5 ttl=50 time=38.5 ms
^C
--- google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4005ms
rtt min/avg/max/mdev = 38.577/38.603/38.648/0.126 ms
/dev/pts/5
09:08:41
#route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.35.1       0.0.0.0         UG    0      0        0 eth0
10.0.35.0       0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.30.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0.30
192.168.40.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0.40
/dev/pts/6
09:08:41
#route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.35.1       0.0.0.0         UG    0      0        0 eth0
10.0.35.0       0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.30.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0.30
192.168.40.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0.40
/dev/pts/5
09:08:52
#ping 192.168.30.3
PING 192.168.30.3 (192.168.30.3) 56(84) bytes of data.
64 bytes from 192.168.30.3: icmp_req=1 ttl=64 time=0.026 ms
64 bytes from 192.168.30.3: icmp_req=2 ttl=64 time=0.021 ms
^C
--- 192.168.30.3 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.021/0.023/0.026/0.005 ms
/dev/pts/6
09:08:52
#ping 192.168.30.3
PING 192.168.30.3 (192.168.30.3) 56(84) bytes of data.
64 bytes from 192.168.30.3: icmp_req=1 ttl=64 time=0.026 ms
64 bytes from 192.168.30.3: icmp_req=2 ttl=64 time=0.021 ms
^C
--- 192.168.30.3 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.021/0.023/0.026/0.005 ms
/dev/pts/5
09:09:09
#ping 192.168.30.2
PING 192.168.30.2 (192.168.30.2) 56(84) bytes of data.
From 192.168.30.3 icmp_seq=1 Destination Host Unreachable
From 192.168.30.3 icmp_seq=2 Destination Host Unreachable
From 192.168.30.3 icmp_seq=3 Destination Host Unreachable
^C
--- 192.168.30.2 ping statistics ---
5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4023ms
pipe 3
/dev/pts/6
09:09:09
#ping 192.168.30.2
PING 192.168.30.2 (192.168.30.2) 56(84) bytes of data.
From 192.168.30.3 icmp_seq=1 Destination Host Unreachable
From 192.168.30.3 icmp_seq=2 Destination Host Unreachable
From 192.168.30.3 icmp_seq=3 Destination Host Unreachable
^C
--- 192.168.30.2 ping statistics ---
5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4023ms
pipe 3
/dev/pts/5
09:09:16
#ping google.com
PING google.com (173.194.70.101) 56(84) bytes of data.
64 bytes from fa-in-f101.1e100.net (173.194.70.101): icmp_req=1 ttl=50 time=38.6 ms
64 bytes from fa-in-f101.1e100.net (173.194.70.101): icmp_req=2 ttl=50 time=38.4 ms
64 bytes from fa-in-f101.1e100.net (173.194.70.101): icmp_req=3 ttl=50 time=38.5 ms
64 bytes from fa-in-f101.1e100.net (173.194.70.101): icmp_req=4 ttl=50 time=38.8 ms
^C
--- google.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 38.420/38.620/38.852/0.249 ms
/dev/pts/6
09:09:16
#ping google.com
PING google.com (173.194.70.101) 56(84) bytes of data.
64 bytes from fa-in-f101.1e100.net (173.194.70.101): icmp_req=1 ttl=50 time=38.6 ms
64 bytes from fa-in-f101.1e100.net (173.194.70.101): icmp_req=2 ttl=50 time=38.4 ms
64 bytes from fa-in-f101.1e100.net (173.194.70.101): icmp_req=3 ttl=50 time=38.5 ms
64 bytes from fa-in-f101.1e100.net (173.194.70.101): icmp_req=4 ttl=50 time=38.8 ms
^C
--- google.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 38.420/38.620/38.852/0.249 ms
/dev/pts/5
09:10:06
#cat install
cat: install: No such file or directory
/dev/pts/6
09:10:06
#cat install
cat: install: No such file or directory
прошло 27 минут
/dev/pts/5
09:37:14
#ls
file.txt  KNOPPIX_V6.7.1CD-2011-09-14-EN.iso  start-kvm
/dev/pts/6
09:37:14
#ls
file.txt  KNOPPIX_V6.7.1CD-2011-09-14-EN.iso  start-kvm
/dev/pts/5
09:37:20
#vim install-authorized
/dev/pts/6
09:37:20
#vim install-authorized
--- /dev/null	2012-02-23 09:33:31.586113060 +0200
+++ install-authorized	2012-02-23 10:39:08.000000000 +0200
@@ -0,0 +1,5 @@
+for i int 1 2 3 4 5
+do 
+cat ~/.ssh/id_dsa.pub | ssh debian$i 'cat >> ~/.ssh/authorized_keys'
+done
+
/dev/pts/5
09:40:45
#cat /etc/resolv.conf
nameserver 10.0.35.1
/dev/pts/6
09:40:45
#cat /etc/resolv.conf
nameserver 10.0.35.1
/dev/pts/5
09:40:58
#vim /etc/resolv.conf
/dev/pts/6
09:40:58
#vim /etc/resolv.conf
--- /tmp/l3-saved-2952.18346.5981	2012-02-23 10:41:11.000000000 +0200
+++ /etc/resolv.conf	2012-02-23 10:41:35.000000000 +0200
@@ -1 +1,2 @@
 nameserver 10.0.35.1
+domain unix.nt
/dev/pts/5
09:41:38
#ls
file.txt  install-authorized  KNOPPIX_V6.7.1CD-2011-09-14-EN.iso  start-kvm
/dev/pts/6
09:41:38
#ls
file.txt  install-authorized  KNOPPIX_V6.7.1CD-2011-09-14-EN.iso  start-kvm
/dev/pts/5
09:41:47
#chmod +x ./install-authorized

/dev/pts/6
09:41:47
#chmod +x ./install-authorized

/dev/pts/5
09:42:02
#./install-authorized
./install-authorized: line 1: syntax error near unexpected token `int'
./install-authorized: line 1: `for i int 1 2 3 4 5'
/dev/pts/6
09:42:02
#./install-authorized
./install-authorized: line 1: syntax error near unexpected token `int'
./install-authorized: line 1: `for i int 1 2 3 4 5'
/dev/pts/5
09:42:28
#vim ./install-authorized
/dev/pts/6
09:42:28
#vim ./install-authorized
--- /tmp/l3-saved-2952.4603.402	2012-02-23 10:42:38.000000000 +0200
+++ ./install-authorized	2012-02-23 10:43:10.000000000 +0200
@@ -1,4 +1,4 @@
-for i int 1 2 3 4 5
+for i in 1 2 3 4 5
 do 
 cat ~/.ssh/id_dsa.pub | ssh debian$i 'cat >> ~/.ssh/authorized_keys'
 done
/dev/pts/5
09:44:28
#ssh root@debian5
Debian GNU/Linux 6.0
root@debian5's password:
l3-agent is already running: pid=2392; pidfile=/root/.lilalo/l3-agent.pid
/dev/pts/6
09:44:28
#ssh root@debian5
Debian GNU/Linux 6.0
root@debian5's password:
l3-agent is already running: pid=2392; pidfile=/root/.lilalo/l3-agent.pid
/dev/pts/5
09:48:26
#ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/root/.ssh/id_dsa):
/root/.ssh/id_dsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_dsa.
Your public key has been saved in /root/.ssh/id_dsa.pub.
The key fingerprint is:
34:2c:f4:4c:49:0d:1a:2e:a6:bf:f6:90:19:9b:0e:de root@debian5
...
|      o.++       |
|     o B. .      |
|    o + *        |
|   o . o .       |
|  . .   S        |
|   . *           |
|  . B            |
| . +.o           |
|  ..E..          |
+-----------------+
/dev/pts/6
09:48:26
#ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/root/.ssh/id_dsa):
/root/.ssh/id_dsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_dsa.
Your public key has been saved in /root/.ssh/id_dsa.pub.
The key fingerprint is:
34:2c:f4:4c:49:0d:1a:2e:a6:bf:f6:90:19:9b:0e:de root@debian5
...
|      o.++       |
|     o B. .      |
|    o + *        |
|   o . o .       |
|  . .   S        |
|   . *           |
|  . B            |
| . +.o           |
|  ..E..          |
+-----------------+
/dev/pts/5
09:50:40
#ls
install-authorized  knoppix.iso  ssh  start-kvm
/dev/pts/6
09:50:40
#ls
install-authorized  knoppix.iso  ssh  start-kvm
/dev/pts/5
09:50:42
#ls ssh
ssh
/dev/pts/6
09:50:42
#ls ssh
ssh
/dev/pts/5
09:50:54
#ls /root/ssh
/root/ssh
/dev/pts/6
09:50:54
#ls /root/ssh
/root/ssh
/dev/pts/5
09:51:01
#ls /root/.ssh
authorized_keys  id_dsa  id_dsa.pub  known_hosts
/dev/pts/6
09:51:01
#ls /root/.ssh
authorized_keys  id_dsa  id_dsa.pub  known_hosts
/dev/pts/5
09:51:09
#cat ./install-authorized
for i in 1 2 3 4 5
do
cat ~/.ssh/id_dsa.pub | ssh debian$i 'cat >> ~/.ssh/authorized_keys'
done
/dev/pts/6
09:51:09
#cat ./install-authorized
for i in 1 2 3 4 5
do
cat ~/.ssh/id_dsa.pub | ssh debian$i 'cat >> ~/.ssh/authorized_keys'
done
/dev/pts/5
09:51:15
#ls
install-authorized  knoppix.iso  ssh  start-kvm
/dev/pts/6
09:51:15
#ls
install-authorized  knoppix.iso  ssh  start-kvm

Файлы

  • ./install-authorized
  • /etc/resolv.conf
  • ./install-authorized
    >
    for i in 1 2 3 4 5
    do
    cat ~/.ssh/id_dsa.pub | ssh debian$i 'cat >> ~/.ssh/authorized_keys'
    done
    
    /etc/resolv.conf
    >
    nameserver 10.0.35.1
    

    Статистика

    Время первой команды журнала15:32:18 2012- 2-22
    Время последней команды журнала09:51:15 2012- 2-23
    Количество командных строк в журнале101
    Процент команд с ненулевым кодом завершения, %17.82
    Процент синтаксически неверно набранных команд, %11.88
    Суммарное время работы с терминалом *, час 2.03
    Количество командных строк в единицу времени, команда/мин 0.83
    Частота использования команд
    ssh16|==============| 14.95%
    vim14|=============| 13.08%
    ls14|=============| 13.08%
    bash:12|===========| 11.21%
    ping11|==========| 10.28%
    start-kvm6|=====| 5.61%
    cat6|=====| 5.61%
    ifconfig2|=| 1.87%
    brctl2|=| 1.87%
    columns2|=| 1.87%
    usage:2|=| 1.87%
    chmod2|=| 1.87%
    route2|=| 1.87%
    ssh-keygen2|=| 1.87%
    line2|=| 1.87%
    speed2|=| 1.87%
    install-authorized2|=| 1.87%
    stty2|=| 1.87%
    init2|=| 1.87%
    rows2|=| 1.87%
    State2|=| 1.87%
    ____
    *) Интервалы неактивности длительностью 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$