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

Содержание

Журнал

Четверг (03/25/10)

/dev/pts/3
16:59:53
#sh zlo
++ seq 1 20
+ for i in '`seq 1 20`'
+ echo 1
1
+ ssh 192.168.15.1 xm migrate --live winxp1 192.168.15.10
+ sleep 20
+ xm migrate --live winxp1 192.168.15.1
+ for i in '`seq 1 20`'
+ echo 2
2
+ ssh 192.168.15.1 xm migrate --live winxp1 192.168.15.10
+ sleep 20
^C
/dev/pts/15
17:00:08
#ping 192.168.15.51
PING 192.168.15.51 (192.168.15.51) 56(84) bytes of data.
64 bytes from 192.168.15.51: icmp_seq=1 ttl=128 time=7.62 ms
64 bytes from 192.168.15.51: icmp_seq=2 ttl=128 time=0.869 ms
64 bytes from 192.168.15.51: icmp_seq=3 ttl=128 time=0.529 ms
64 bytes from 192.168.15.51: icmp_seq=4 ttl=128 time=8.27 ms
64 bytes from 192.168.15.51: icmp_seq=5 ttl=128 time=0.634 ms
64 bytes from 192.168.15.51: icmp_seq=6 ttl=128 time=10.2 ms
64 bytes from 192.168.15.51: icmp_seq=7 ttl=128 time=2.37 ms
64 bytes from 192.168.15.51: icmp_seq=8 ttl=128 time=82.6 ms
64 bytes from 192.168.15.51: icmp_seq=9 ttl=128 time=3.29 ms
...
From 192.168.15.10 icmp_seq=192 Destination Host Unreachable
From 192.168.15.10 icmp_seq=193 Destination Host Unreachable
From 192.168.15.10 icmp_seq=194 Destination Host Unreachable
From 192.168.15.10 icmp_seq=196 Destination Host Unreachable
From 192.168.15.10 icmp_seq=197 Destination Host Unreachable
From 192.168.15.10 icmp_seq=198 Destination Host Unreachable
^C
--- 192.168.15.51 ping statistics ---
201 packets transmitted, 12 received, +141 errors, 94% packet loss, time 201478ms
rtt min/avg/max/mdev = 0.529/12.369/82.620/21.891 ms, pipe 4
/dev/pts/3
17:02:03
#xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  6024     2     r-----   2382.6
winxp1                                       9  1024     1     r-----     32.3
winxp10                                      4  1024     1     ------     44.0
17:02:05
#xm destroy winxp1

17:02:35
#xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  6024     2     r-----   2414.4
winxp10                                      4  1024     1     ------     46.1
17:02:36
#cat /proc/drbd
version: 8.0.14 (api:86/proto:86)
GIT-hash: bb447522fc9a87d0069b7e14f0234911ebdab0f7 build by phil@fat-tyre, 2008-11-12 16:40:33
 1: cs:Connected st:Secondary/Primary ds:UpToDate/UpToDate C r---
    ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0
        resync: used:0/61 hits:0 misses:0 starving:0 dirty:0 changed:0
        act_log: used:0/127 hits:0 misses:0 starving:0 dirty:0 changed:0
 2: cs:Connected st:Secondary/Secondary ds:UpToDate/UpToDate C r---
    ns:588 nr:0 dw:0 dr:588 al:0 bm:14 lo:0 pe:0 ua:0 ap:0
        resync: used:0/61 hits:0 misses:0 starving:0 dirty:0 changed:0
        act_log: used:0/127 hits:0 misses:0 starving:0 dirty:0 changed:0
 3: cs:StandAlone st:Primary/Unknown ds:UpToDate/DUnknown   r---
    ns:48680 nr:1309248 dw:1358436 dr:22340 al:149 bm:47 lo:0 pe:0 ua:0 ap:0
        resync: used:0/61 hits:0 misses:0 starving:0 dirty:0 changed:0
        act_log: used:0/127 hits:12148 misses:149 starving:0 dirty:0 changed:149
 4: cs:Connected st:Primary/Secondary ds:UpToDate/UpToDate C r---
    ns:1812244 nr:0 dw:1812244 dr:1645844 al:1568 bm:0 lo:0 pe:0 ua:0 ap:0
        resync: used:0/61 hits:0 misses:0 starving:0 dirty:0 changed:0
        act_log: used:0/127 hits:451493 misses:1582 starving:0 dirty:14 changed:1568
17:02:47
#less /var/log/messages
17:03:28
##drbdadm -- --discard-my-data connect winxp1

17:03:57
#drbdadm secondary winxp1

17:04:02
#drbdadm -- --discard-my-data connect winxp1

17:04:31
#watch cat /proc/drbd

17:04:48
#version: 8.0.14 (api:86/proto:86)

17:04:57
#apt-get install mkisofs
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  mkisofs
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 994B of archives.
After this operation, 36.9kB of additional disk space will be used.
Get:1 http://10.0.35.1 lenny/main mkisofs 9:1.1.9-1 [994B]
Fetched 994B in 0s (28.2kB/s)
Selecting previously deselected package mkisofs.
(Reading database ... 133673 files and directories currently installed.)
Unpacking mkisofs (from .../mkisofs_9%3a1.1.9-1_all.deb) ...
Processing triggers for man-db ...
Setting up mkisofs (9:1.1.9-1) ...
17:09:37
#mkisofs -o /root/etc.iso /etc/
I: -input-charset not specified, using utf-8 (detected in locale settings)
genisoimage: Symlink /etc/rc1.d/K20xendomains ignored - continuing.
genisoimage: Symlink /etc/rc1.d/K88acpid ignored - continuing.
genisoimage: Symlink /etc/rc1.d/K20iscsitarget ignored - continuing.
genisoimage: Symlink /etc/rc1.d/K16hal ignored - continuing.
genisoimage: Symlink /etc/rc1.d/K90rsyslog ignored - continuing.
genisoimage: Symlink /etc/rc1.d/K20nfs-common ignored - continuing.
genisoimage: Symlink /etc/rc1.d/K81portmap ignored - continuing.
genisoimage: Symlink /etc/rc1.d/K14network-manager-dispatcher ignored - continuing.
genisoimage: Symlink /etc/rc1.d/K14network-manager ignored - continuing.
...
Using MOUNT001.SH;1 for  /etc/init.d/mountnfs.sh (mountnfs-bootclean.sh)
Using COMMO000.;1 for  /etc/pam.d/common-auth (common-account)
Using COOLS000.CON;1 for  /etc/sane.d/coolscan2.conf (coolscan.conf)
Using MICRO000.CON;1 for  /etc/sane.d/microtek.conf (microtek2.conf)
Total translation table size: 0
Total rockridge attributes bytes: 0
Total directory bytes: 559104
Path table size(bytes): 4082
Max brk space used e3000
2697 extents written (5 MB)
17:09:54
#scp -r /root/etc.iso 192.168.15.1:/root/
etc.iso                                                                                       100% 5394KB   5.3MB/s   00:00
прошло 44 минуты
/dev/pts/5
17:54:28
#1
bash: 1: command not found
17:54:28
#apt-cache search asl compiler
iasl - Intel ASL compiler/decompiler
erlang-base-hipe - Concurrent, real-time, distributed functional language (HiPE virtual machine)
erlang-base - Concurrent, real-time, distributed functional language (virtual machine)
18:01:32
#apt-get install iasl
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  iasl
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 367kB of archives.
After this operation, 692kB of additional disk space will be used.
Get:1 http://10.0.35.1 lenny/main iasl 20061109-0.1 [367kB]
Fetched 367kB in 0s (511kB/s)
Selecting previously deselected package iasl.
(Reading database ... 133678 files and directories currently installed.)
Unpacking iasl (from .../iasl_20061109-0.1_i386.deb) ...
Processing triggers for man-db ...
Setting up iasl (20061109-0.1) ...
18:01:40
#make world
make clean
make[1]: Entering directory `/usr/src/xen-unstable.hg'
make -C xen clean
make[2]: Entering directory `/usr/src/xen-unstable.hg/xen'
make -f Rules.mk _clean
make[3]: Entering directory `/usr/src/xen-unstable.hg/xen'
make -C tools clean
make[4]: Entering directory `/usr/src/xen-unstable.hg/xen/tools'
[ -d figlet ] && make -C figlet clean
make[5]: Entering directory `/usr/src/xen-unstable.hg/xen/tools/figlet'
...
^@
make[2]: *** [user.dvi] Error 1
rm user.dvi
make[2]: Leaving directory `/usr/src/xen-unstable.hg/docs'
install -d -m0755 -p /usr/src/xen-unstable.hg/dist/check
install -m0644 -p ./COPYING /usr/src/xen-unstable.hg/dist
install -m0644 -p ./README /usr/src/xen-unstable.hg/dist
install -m0755 -p ./install.sh /usr/src/xen-unstable.hg/dist
install -m0755 -p tools/check/chk tools/check/check_* tools/check/funcs.sh /usr/src/xen-unstable.hg/dist/check
make[1]: Leaving directory `/usr/src/xen-unstable.hg'

Пятница (03/26/10)

/dev/pts/0
09:03:02
#screen -x
/dev/pts/7
09:03:47
#screen -x
/dev/pts/3
09:04:08
#top
top - 10:04:12 up 16:59,  8 users,  load average: 1.11, 0.73, 0.60
Tasks: 149 total,   4 running, 145 sleeping,   0 stopped,   0 zombie
Cpu(s): 54.6%us,  1.3%sy,  0.0%ni, 43.8%id,  0.0%wa,  0.0%hi,  0.0%si,  0.3%st
Mem:   6168576k total,  2831800k used,  3336776k free,   416112k buffers
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
Swap:  4883752k total,        0k used,  4883752k free,  1992576k cached
 3560 root      20   0 23108  19m 1516 R  100  0.3 614:44.94 l3-agent
23877 root      20   0  5484 2836 1248 R    4  0.0   0:00.12 bash
25941 root      20   0  383m  14m 1680 R    0  0.2   3:12.93 qemu-dm
    1 root      20   0  2116  688  588 S    0  0.0   0:00.46 init
...
  623 root      15  -5     0    0    0 S    0  0.0   0:00.00 ksuspend_usbd
  624 root      15  -5     0    0    0 S    0  0.0   0:00.00 khubd
  926 root      15  -5     0    0    0 S    0  0.0   0:00.00 ata/0
  927 root      15  -5     0    0    0 S    0  0.0   0:00.00 ata/1
  928 root      15  -5     0    0    0 S    0  0.0   0:00.00 ata_aux
  959 root      15  -5     0    0    0 S    0  0.0   0:00.00 scsi_eh_0
  960 root      15  -5     0    0    0 S    0  0.0   0:00.00 scsi_eh_1
  961 root      15  -5     0    0    0 S    0  0.0   0:00.00 scsi_eh_2
  962 root      15  -5     0    0    0 S    0  0.0   0:00.00 scsi_eh_3
 1123 root      15  -5     0    0    0 S    0  0.0   0:00.00 kstriped
/dev/pts/12
09:04:13
#screen -x
/dev/pts/17
09:04:48
#screen -x
/dev/pts/5
09:06:44
##hg update 4.0.0-rc7

09:07:24
##make world

09:07:33
#ls
buildconfigs                  COPYING  install.sh           stubdom
build-linux-2.6-pvops_x86_32  dist     linux-2.6-pvops.git  tools
config                        docs     Makefile             unmodified_drivers
Config.mk                     extras   README               xen
09:07:54
#make install
make -C xen install
make[1]: Entering directory `/usr/src/xen-unstable.hg/xen'
make -f Rules.mk _install
make[2]: Entering directory `/usr/src/xen-unstable.hg/xen'
make -C tools
make[3]: Entering directory `/usr/src/xen-unstable.hg/xen/tools'
[ -d figlet ] && make -C figlet
make[4]: Entering directory `/usr/src/xen-unstable.hg/xen/tools/figlet'
make[4]: `figlet' is up to date.
make[4]: Leaving directory `/usr/src/xen-unstable.hg/xen/tools/figlet'
...
<*> ...ljfour; mag:=1; nonstopmode; input nullfont
Please type another input file name
! Emergency stop.
<*> ...ljfour; mag:=1; nonstopmode; input nullfont
Transcript written on mfput.log.
grep: nullfont.log: No such file or directory
mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input nullfont' failed to make nullfont.tfm.
make[1]: *** [user.dvi] Error 1
rm user.dvi
make[1]: Leaving directory `/usr/src/xen-unstable.hg/docs'
09:15:09
#make install
make -C xen install
make[1]: Entering directory `/usr/src/xen-unstable.hg/xen'
make -f Rules.mk _install
make[2]: Entering directory `/usr/src/xen-unstable.hg/xen'
make -C tools
make[3]: Entering directory `/usr/src/xen-unstable.hg/xen/tools'
[ -d figlet ] && make -C figlet
make[4]: Entering directory `/usr/src/xen-unstable.hg/xen/tools/figlet'
make[4]: `figlet' is up to date.
make[4]: Leaving directory `/usr/src/xen-unstable.hg/xen/tools/figlet'
...
<*> ...ljfour; mag:=1; nonstopmode; input nullfont
Please type another input file name
! Emergency stop.
<*> ...ljfour; mag:=1; nonstopmode; input nullfont
Transcript written on mfput.log.
grep: nullfont.log: No such file or directory
mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input nullfont' failed to make nullfont.tfm.
make[1]: *** [user.dvi] Error 1
rm user.dvi
make[1]: Leaving directory `/usr/src/xen-unstable.hg/docs'
09:18:33
#vi Makefile
--- /tmp/l3-saved-4586.10047.912	2010-03-26 10:18:42.000000000 +0200
+++ Makefile	2010-03-26 10:18:50.000000000 +0200
@@ -15,7 +15,8 @@
 
 # build and install everything into the standard system directories
 .PHONY: install
-install: install-xen install-kernels install-tools install-stubdom install-docs
+install: install-xen install-kernels install-tools install-stubdom 
+#install-docs
 
 .PHONY: build
 build: kernels
09:18:50
#make install
make -C xen install
make[1]: Entering directory `/usr/src/xen-unstable.hg/xen'
make -f Rules.mk _install
make[2]: Entering directory `/usr/src/xen-unstable.hg/xen'
make -C tools
make[3]: Entering directory `/usr/src/xen-unstable.hg/xen/tools'
[ -d figlet ] && make -C figlet
make[4]: Entering directory `/usr/src/xen-unstable.hg/xen/tools/figlet'
make[4]: `figlet' is up to date.
make[4]: Leaving directory `/usr/src/xen-unstable.hg/xen/tools/figlet'
...
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/usr/src/xen-unstable.hg/extras/mini-os/arch/x86'
ld -r -nostdlib -L/usr/src/xen-unstable.hg/stubdom/cross-root-i686/i686-xen-elf/lib  -m elf_i386 /usr/src/xen-unstable.hg/stubdom/mini-os-x86_32-grub/arch/x86/x86_32.o /usr/src/xen-unstable.hg/stubdom/mini-os-x86_32-grub/mini-os_app.o  /usr/src/xen-unstable.hg/stubdom/mini-os-x86_32-grub/blkfront.o /usr/src/xen-unstable.hg/stubdom/mini-os-x86_32-grub/events.o /usr/src/xen-unstable.hg/stubdom/mini-
objcopy -w -G xenos_* -G _start /usr/src/xen-unstable.hg/stubdom/mini-os-x86_32-grub/mini-os.o /usr/src/xen-unstable.hg/stubdom/mini-os-x86_32-grub/mini-os.o
ld -nostdlib -L/usr/src/xen-unstable.hg/stubdom/cross-root-i686/i686-xen-elf/lib  -m elf_i386 -T arch/x86/minios-x86_32.lds /usr/src/xen-unstable.hg/stubdom/mini-os-x86_32-grub/mini-os.o  -o /usr/src/xen-unstable.hg/stubdom/mini-os-x86_32-grub/mini-os
gzip -f -9 -c /usr/src/xen-unstable.hg/stubdom/mini-os-x86_32-grub/mini-os >/usr/src/xen-unstable.hg/stubdom/mini-os-x86_32-grub/mini-os.gz
make[2]: Leaving directory `/usr/src/xen-unstable.hg/extras/mini-os'
install -d -m0755 -p "//usr/lib/xen/boot"
install -m0644 -p mini-os-x86_32-grub/mini-os.gz "//usr/lib/xen/boot/pv-grub-x86_32.gz"
make[1]: Leaving directory `/usr/src/xen-unstable.hg/stubdom'
09:21:13
#apt-cache show iasl
Package: iasl
Priority: optional
Section: devel
Installed-Size: 676
Maintainer: Mattia Dongili <malattia@debian.org>
Architecture: i386
Source: acpica-unix
Version: 20061109-0.1
Depends: libc6 (>= 2.5-5)
Filename: pool/main/a/acpica-unix/iasl_20061109-0.1_i386.deb
...
MD5sum: ef58594a2157baaff10c22e30cfdd965
SHA1: 1e5d41718a62f541557b8c62a2c84427979751ec
SHA256: cbe37f33bcebde97677f51570e7a5ac94667ee707706ef899b05b8fddbbd0264
Description: Intel ASL compiler/decompiler
 iASL compiles ASL (ACPI Source Language) into AML (ACPI Machine
 Language). This AML is suitable for inclusion as a DSDT in sytem
 firmware. It also can disassemble AML, for debugging purposes.
 .
 Homepage: http://developer.intel.com/technology/iapc/acpi/
Tag: devel::compiler, hardware::power:acpi, implemented-in::c, interface::commandline, role::program, scope::utility
09:23:13
#ls /boot/
config-2.6.18-6-xen-686      initrd.img-2.6.26-2-xen-686  vmlinuz-2.6.31.12
config-2.6.26-2-686          System.map-2.6.18-6-xen-686  xen-3.2-1-i386.gz
config-2.6.26-2-xen-686      System.map-2.6.26-2-686      xen-4.0.0-rc7.gz
config-2.6.31.12             System.map-2.6.26-2-xen-686  xen-4.0.gz
grub                         System.map-2.6.31.12         xen-4.gz
initrd.img-2.6.18-6-xen-686  vmlinuz-2.6.18-6-xen-686     xen.gz
initrd.img-2.6.26-2-686      vmlinuz-2.6.26-2-686         xen-syms-4.0.0-rc7
initrd.img-2.6.26-2-686.bak  vmlinuz-2.6.26-2-xen-686
09:23:31
#ls /boot/*2.6.31*
/boot/config-2.6.31.12  /boot/System.map-2.6.31.12  /boot/vmlinuz-2.6.31.12
09:24:41
#ls /boot/*2.6.31*
/boot/config-2.6.31.12  /boot/System.map-2.6.31.12  /boot/vmlinuz-2.6.31.12
09:25:08
#ls -1 /boot/*2.6.31*
/boot/config-2.6.31.12
/boot/System.map-2.6.31.12
/boot/vmlinuz-2.6.31.12
09:25:21
#ьм .еmv /tmp/initrd.img-2.6.31.12 /boot/

09:25:35
#ls -1 /boot/[vi]*2.6.31*
/boot/initrd.img-2.6.31.12
/boot/vmlinuz-2.6.31.12
09:25:41
#ls -1 /boot/[vi]*2.6.31* >> /boot/grub/menu.lst

09:25:51
#vi /boot/grub/menu.lst
--- /tmp/l3-saved-4586.12491.7090	2010-03-26 10:25:52.000000000 +0200
+++ /boot/grub/menu.lst	2010-03-26 10:27:45.000000000 +0200
@@ -119,6 +119,12 @@
 
 ## ## End Default Options ##
 
+title		Xen 4.0-i386 / Debian GNU/Linux, kernel 2.6.31.12
+root		(hd0,0)
+kernel		/boot/xen-4.0.gz
+module		/boot/vmlinuz-2.6.31.12 root=/dev/sda1 ro console=tty0
+module		/boot/initrd.img-2.6.31.12
+
 title		Xen 3.2-1-i386 / Debian GNU/Linux, kernel 2.6.26-2-xen-686
 root		(hd0,0)
 kernel		/boot/xen-3.2-1-i386.gz
@@ -179,5 +185,3 @@
 map		(hd1) (hd0)
 chainloader	+1
 
-/boot/initrd.img-2.6.31.12
-/boot/vmlinuz-2.6.31.12
09:27:45
#xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  6024     2     r-----  42610.1
winxp10                                      4  1024     1     -b----   2229.8
09:27:48
#cat /proc/drbd
version: 8.0.14 (api:86/proto:86)
GIT-hash: bb447522fc9a87d0069b7e14f0234911ebdab0f7 build by phil@fat-tyre, 2008-11-12 16:40:33
 1: cs:Connected st:Secondary/Primary ds:UpToDate/UpToDate C r---
    ns:0 nr:920 dw:920 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0
        resync: used:0/61 hits:0 misses:0 starving:0 dirty:0 changed:0
        act_log: used:0/127 hits:0 misses:0 starving:0 dirty:0 changed:0
 2: cs:Connected st:Secondary/Secondary ds:UpToDate/UpToDate C r---
    ns:588 nr:0 dw:0 dr:588 al:0 bm:14 lo:0 pe:0 ua:0 ap:0
        resync: used:0/61 hits:0 misses:0 starving:0 dirty:0 changed:0
        act_log: used:0/127 hits:0 misses:0 starving:0 dirty:0 changed:0
 3: cs:Connected st:Primary/Primary ds:UpToDate/UpToDate C r---
    ns:0 nr:370464 dw:1728900 dr:22368 al:149 bm:127 lo:0 pe:0 ua:0 ap:0
        resync: used:0/61 hits:47 misses:13 starving:0 dirty:0 changed:13
        act_log: used:0/127 hits:12148 misses:149 starving:0 dirty:0 changed:149
 4: cs:Connected st:Primary/Secondary ds:UpToDate/UpToDate C r---
    ns:2054864 nr:0 dw:2054864 dr:1777140 al:1767 bm:0 lo:0 pe:0 ua:0 ap:0
        resync: used:0/61 hits:0 misses:0 starving:0 dirty:0 changed:0
        act_log: used:0/127 hits:511949 misses:1781 starving:0 dirty:14 changed:1767
09:27:58
#ssh 192.168.15.1 drbdadm primary winxp2

09:28:42
#xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  6024     2     r-----  42674.0
winxp10                                      4  1024     1     -b----   2231.9
09:28:51
#ssh 192.168.15.1 grep winxp /etc/drbd.conf
resource "winxp1" {
    disk        /dev/DATA/winxp1;
    disk       /dev/DATA/winxp1;
resource "winxp2" {
    disk        /dev/DATA/winxp2;
    disk       /dev/DATA/winxp2;
09:30:08
#xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  6024     2     r-----  42764.4
winxp10                                      4  1024     1     -b----   2235.0
09:30:40
#xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  6024     2     r-----  42787.2
09:30:42
#reboot

/dev/tty1
09:34:59
#ifconfig -a
eth1      Link encap:Ethernet  HWaddr 00:07:e9:0c:4f:a1
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
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:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:560 (560.0 B)  TX bytes:560 (560.0 B)
sit0      Link encap:IPv6-in-IPv4
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
09:35:01
#mii-tool
eth1: no link
09:35:09
#mii-tool
eth1: negotiated 1000baseT-FD flow-control, link ok
09:35:57
#xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  6950     2     r-----    100.5
09:36:11
#vi /etc/xen/xend-config.sxp
--- /tmp/l3-saved-3986.1645.30824	2010-03-26 10:36:21.000000000 +0200
+++ /etc/xen/xend-config.sxp	2010-03-26 10:36:35.000000000 +0200
@@ -125,7 +125,7 @@
 # Your default ethernet device is used as the outgoing interface, by default. 
 # To use a different one (e.g. eth1) use
 #
-#(network-script 'network-bridge netdev=eth0')
+(network-script 'network-bridge netdev=eth1')
 #
 # The bridge is named xenbr0, by default.  To rename the bridge, use
 #
@@ -136,7 +136,7 @@
 # two fake interfaces per guest domain.  To do things like this, write
 # yourself a wrapper script, and call network-bridge from it, as appropriate.
 #
-(network-script network-dummy)
+#(network-script network-dummy)
 
 # The script used to control virtual interfaces.  This can be overridden on a
 # per-vif basis when creating a domain or a configuring a new vif.  The
09:36:35
#vi /etc/network/interfaces
--- /tmp/l3-saved-3986.29981.12434	2010-03-26 10:36:40.000000000 +0200
+++ /etc/network/interfaces	2010-03-26 10:36:48.000000000 +0200
@@ -6,8 +6,8 @@
 iface lo inet loopback
 
 # The primary network interface
-allow-hotplug eth0
-iface eth0 inet static
+allow-hotplug eth1
+iface eth1 inet static
 	address 192.168.15.10
 	netmask 255.255.255.0
 	network 192.168.15.0
09:36:48
#/etc/init.d/xend restatr
Usage: /etc/init.d/xend {start|stop|status|restart|reload|force-reload}
09:38:01
#ifup eth1

/dev/pts/1
09:38:14
#screen
/dev/pts/3
09:38:18
#xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  6950     2     r-----    240.5
/dev/pts/5
09:38:22
#screen -x
/dev/pts/6
09:38:22
#screen -x
/dev/pts/3
09:38:23
#xm dmesg
 __  __            _  _    ___   ___             _____
 \ \/ /___ _ __   | || |  / _ \ / _ \    _ __ __|___  |
  \  // _ \ '_ \  | || |_| | | | | | |__| '__/ __| / /
  /  \  __/ | | | |__   _| |_| | |_| |__| | | (__ / /
 /_/\_\___|_| |_|    |_|(_)___(_)___/   |_|  \___/_/
(XEN) Xen version 4.0.0-rc7 (root@unix.nt) (gcc version 4.3.2 (Debian 4.3.2-1.1) ) Fri Mar 26 10:18:52 EET 2010
(XEN) Latest ChangeSet: Tue Mar 23 09:35:31 2010 +0000 21056:ec8f2e7dea44
(XEN) Command line:
(XEN) Video information:
(XEN)  VGA is text mode 80x25, font 8x16
...
(XEN) ioapic_guest_write: old_entry=0000a9c8 pirq=21
(XEN) ioapic_guest_write: Attempt to modify IO-APIC pin for in-use IRQ!
(XEN) ioapic_guest_write: apic=0, pin=18, irq=18
(XEN) ioapic_guest_write: new_entry=0001a9b0
(XEN) ioapic_guest_write: old_entry=0000a9b0 pirq=18
(XEN) ioapic_guest_write: Attempt to modify IO-APIC pin for in-use IRQ!
(XEN) ioapic_guest_write: apic=0, pin=22, irq=22
(XEN) ioapic_guest_write: new_entry=0001a9d0
(XEN) ioapic_guest_write: old_entry=0000a9d0 pirq=22
(XEN) ioapic_guest_write: Attempt to modify IO-APIC pin for in-use IRQ!
09:38:25
#xm dmesg | less
/dev/pts/9
09:38:27
#screen -x
/dev/pts/11
09:38:46
#screen -x
/dev/pts/3
09:39:10
#xm dmesg | less
09:39:12
#uname -a
Linux linux10 2.6.31.12 #1 SMP Thu Mar 25 19:41:09 EET 2010 i686 GNU/Linux
09:39:14
#cd /usr/src/

09:40:10
#ls
drbd8-2.6.26-2-686_8.0.14-2+lenny1+2.6.26-21_i386.deb               linux-headers-2.6.26-2-686
drbd8-2.6.26-2-686_8.0.14-2+lenny1+2.6.26-21lenny4_i386.deb         linux-headers-2.6.26-2-common
drbd8-2.6.26-2-xen-686_8.0.14-2+lenny1+2.6.26-21lenny4_i386.deb     linux-headers-2.6.26-2-common-xen
drbd8.tar.bz2                                                       linux-headers-2.6.26-2-xen-686
iscsitarget-module-2.6.26-2-686_0.4.16+svn162-3+2.6.26-21_i386.deb  linux-kbuild-2.6.26
iscsitarget.tar.bz2                                                 linux-OLDVERSION.1269354251
kqemu-modules-2.6.26-2-686_1.3.0~pre11-8+2.6.26-21lenny4_i386.deb   linux-OLDVERSION.1269518845
kqemu.tar.bz2                                                       linux-OLDVERSION.1269518881
kvm.tar.bz2                                                         modules
linux                                                               xen-unstable.hg
09:40:11
#cd xen-unstable.hg/

09:40:15
#ls
buildconfigs                  config     COPYING  docs    install.sh           Makefile  stubdom  unmodified_drivers
build-linux-2.6-pvops_x86_32  Config.mk  dist     extras  linux-2.6-pvops.git  README    tools    xen
09:40:16
#ls dist/
check  COPYING  install  install.sh  README
09:40:45
#cd build-linux-2.6-pvops_x86_32/

09:40:55
#ls
arch    drivers   include   ipc     Makefile        modules.order   scripts   source      virt
block   firmware  include2  kernel  mm              Module.symvers  security  System.map  vmlinux
crypto  fs        init      lib     Module.markers  net             sound     usr         vmlinux.o
09:40:55
#make menuconfig
  | |                                                                                                                     | |
  | |                                                                                                                     | |
  | |                                                                                                                     | |
  | |                                                                                                                     | |
                                General setup  --->
  | |                                                                                                                     | |
  | |                                                                                                                     | |
  | |                                                                                                                     | |
  | |                                                                                                                     | |
  | |                                                                                                                     | |
...
  | |                                                                                                                     | |
  | |                                                                                                                     | |
  | |                                                                                                                     | |
  | |                                                                                                                     | |
  | +---------------------------------------------------------------------------------------------------------------------+ |
  +-------------------------------------------------------------------------------------------------------------------------+
  |                                                                                                                         |
  +-------------------------------------------------------------------------------------------------------------------------+
*** End of Linux kernel configuration.
*** Execute 'make' to build the kernel or try 'make help'.
09:42:38
#grep -i DRBD .config

09:42:45
#xm create linux1
Error: Unable to open config file: linux1
Usage: xm create <ConfigFile> [options] [vars]
Create a domain based on <ConfigFile>.
Options:
-h, --help           Print this help.
--help_config        Print the available configuration variables (vars)
                     for the configuration script.
-q, --quiet          Quiet.
--path=PATH          Search path for configuration scripts. The value of
                     PATH is a colon-separated directory list.
...
                     Connect to the console after the domain is created.
--vncviewer          Connect to the VNC display after the domain is
                     created.
--vncviewer-autopass Pass VNC password to viewer via stdin and -autopass.
[options] [vars]
Create a domain.
Domain creation parameters can be set by command-line switches, from
a python configuration script or an SXP config file. See documentation
for --defconfig, --config. Configuration variables can be set using
VAR=VAL on the command line. For example vmid=3 sets vmid to 3.
09:44:20
#xm create linux10
Using config file "/etc/xen/linux10".
Error: Device 0 (vif) could not be connected. Could not find bridge device eth0
09:44:28
#brctl addbr eth0

09:44:38
#ip set link eth0 up
Object "set" is unknown, try "ip help".
09:44:42
#ip set eth0 link up
Object "set" is unknown, try "ip help".
09:44:48
#ip link eth0 set up
Command "eth0" is unknown, try "ip link help".
09:44:57
#ip link set eth0 up

09:45:03
#xm create linux10
Using config file "/etc/xen/linux10".
^C
/dev/tty1
09:45:29
#xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  6950     2     r-----    686.9
linux10                                      2   128     1     --p---      0.0
09:45:32
#tail -f /var/log/messages
Mar 26 10:34:22 linux10 kernel: [   40.354266] EXT3 FS on sda1, internal journal
Mar 26 10:34:22 linux10 rsyslogd: [origin software="rsyslogd" swVersion="3.18.6" x-pid="3277" x-info="http://www.rsyslog.com"] restart
Mar 26 10:34:32 linux10 dhcdbd: Started up.
Mar 26 10:34:35 linux10 kernel: [   58.618362] mtrr: type mismatch for c0000000,10000000 old: write-back new: write-combining
Mar 26 10:38:04 linux10 kernel: [  267.722939] ADDRCONF(NETDEV_UP): eth1: link is not ready
Mar 26 10:38:04 linux10 kernel: [  267.723384] e1000: eth1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Mar 26 10:38:04 linux10 kernel: [  267.723963] ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
Mar 26 10:45:10 linux10 kernel: [  693.163528] device vif2.0 entered promiscuous mode
Mar 26 10:45:10 linux10 kernel: [  693.167342] eth0: port 1(vif2.0) entering learning state
Mar 26 10:45:25 linux10 kernel: [  708.167262] eth0: port 1(vif2.0) entering forwarding state
^C
09:45:43
#tail -f /var/log/xen/
domain-builder-ng.log  qemu-dm-5.log          xend-debug.log
qemu-dm-1.log          qemu-dm-6.log          xend.log
qemu-dm-2.log          qemu-dm-7.log          xen-hotplug.log
qemu-dm-3.log          qemu-dm-8.log
qemu-dm-4.log          qemu-dm-9.log
/dev/pts/3
09:46:02
#cat /etc/xen/linu10
cat: /etc/xen/linu10: No such file or directory
09:46:06
#cat /etc/xen/linux10
kernel = "/boot/vmlinuz-2.6.18-6-xen-686"
ramdisk = "/boot/initrd.img-2.6.18-6-xen-686"
name = "linux10"
vif = [ 'bridge=eth0' ]
disk = [ 'phy:/dev/drbd2,hda1,w' ]
root = "/dev/hda1 ro"
extra = "mem=512M"
memory = 128
maxmem = 512
#pci=['03:00.0']
09:46:07
#ls /dev/DATA/
drbdmeta  linux1  lv3  lv4  winxp1  winxp2
09:46:16
#sed -i s@/dev/drbd2@/dev/DATA/linux1@ /etc/xen/linux10

09:46:42
#xm destroy linux10

09:46:46
#xm create linux10
Using config file "/etc/xen/linux10".
Started domain linux10 (id=3)
09:46:51
#xm console linux10
Linux version 2.6.18-6-xen-686 (Debian 2.6.18.dfsg.1-24) (dannf@debian.org) (gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)) #1 SMP Sat Dec 27 13:17:00 UTC 2008
BIOS-provided physical RAM map:
 Xen: 0000000000000000 - 0000000020800000 (usable)
user-defined physical RAM map:
 user: 0000000000000000 - 0000000020000000 (usable)
0MB HIGHMEM available.
512MB LOWMEM available.
NX (Execute Disable) protection: active
ACPI in unprivileged domain disabled
Built 1 zonelists.  Total pages: 131072
...
Configuring network interfaces...done.
Setting console screen modes and fonts.
INIT: Entering runlevel: 2
Starting enhanced syslogd: rsyslogd.
Starting OpenBSD Secure Shell server: sshdNET: Registered protocol family 10
lo: Disabled Privacy Extensions
IPv6 over IPv4 tunneling driver
.
Starting periodic command scheduler: crond.
Debian GNU/Linux 5.0 linux10 tty1
09:47:09
#xm shutdown linux10

09:47:15
#ls /dev/DATA/
drbdmeta  linux1  lv3  lv4  winxp1  winxp2
09:47:46
#cat /etc/xen/winxp10
#  -*- mode: python; -*-
#============================================================================
# Python configuration setup for 'xm create'.
# This script sets the parameters used when a domain is created using 'xm create'.
# You use a separate script for each domain you want to create, or
# you can set the parameters for the domain on the xm command line.
#============================================================================
#----------------------------------------------------------------------------
# Kernel image file.
kernel = "hvmloader"
...
#                       monitor window)
#usb=1
#   Enable USB mouse support (only enable one of the following, `mouse' for
#                             PS/2 protocol relative mouse, `tablet' for
#                             absolute mouse)
#usbdevice='mouse'
usbdevice='tablet'
#-----------------------------------------------------------------------------
#   Set keyboard layout, default is en-us keyboard.
#keymap='ja'
09:47:51
#cat /etc/xen/winxp10 | grep disk
# Define the disk devices you want the domain to have access to, and
# Each disk entry is of the form phy:UNAME,DEV,MODE
#disk = [ 'phy:hda1,hda1,r' ]
disk = [ 'phy:/dev/drbd4,hda,w', 'file:/root/wxp-sp2.iso,hdc:cdrom,r' ]
# boot on floppy (a), hard disk (c), Network (n) or CD-ROM (d)
# default: hard disk, cd-rom, floppy
#  write to temporary files instead of disk image files
09:47:55
#sed -i s@/dev/drbd4@/dev/DATA/winxp2@ /etc/xen/winxp10

09:48:25
#xm create winxp10
Using config file "/etc/xen/winxp10".
Error: Domain 'winxp10' does not exist.
09:48:32
#less /var/log/xen/xend.log
09:48:58
#less /var/log/xen/qemu-dm-

Файлы

  • /etc/xen/linux10
  • /etc/xen/winxp10
  • /proc/drbd
  • /etc/xen/linux10
    >
    kernel = "/boot/vmlinuz-2.6.18-6-xen-686"
    ramdisk = "/boot/initrd.img-2.6.18-6-xen-686"
    name = "linux10"
    vif = [ 'bridge=eth0' ]
    disk = [ 'phy:/dev/drbd2,hda1,w' ]
    root = "/dev/hda1 ro"
    extra = "mem=512M"
    memory = 128
    maxmem = 512
    #pci=['03:00.0']
    
    /etc/xen/winxp10
    >
    #  -*- mode: python; -*-
    #============================================================================
    # Python configuration setup for 'xm create'.
    # This script sets the parameters used when a domain is created using 'xm create'.
    # You use a separate script for each domain you want to create, or
    # you can set the parameters for the domain on the xm command line.
    #============================================================================
    #----------------------------------------------------------------------------
    # Kernel image file.
    kernel = "hvmloader"
    # The domain build function. HVM domain uses 'hvm'.
    builder='hvm'
    # Initial memory allocation (in megabytes) for the new domain.
    #
    # WARNING: Creating a domain with insufficient memory may cause out of
    #          memory errors. The domain needs enough memory to boot kernel
    #          and modules. Allocating less than 32MBs is not recommended.
    memory = 1024
    # Shadow pagetable memory for the domain, in MB.
    # If not explicictly set, xend will pick an appropriate value.
    # Should be at least 2KB per MB of domain memory, plus a few MB per vcpu.
    # shadow_memory = 8
    # A name for your domain. All domains must have different names.
    name = "winxp10"
    # 128-bit UUID for the domain.  The default behavior is to generate a new UUID
    # on each call to 'xm create'.
    #uuid = "06ed00fe-1162-4fc4-b5d8-11993ee4a8b9"
    #-----------------------------------------------------------------------------
    # The number of cpus guest platform has, default=1
    #vcpus=1
    # Enable/disable HVM guest PAE, default=1 (enabled)
    #pae=1
    # Enable/disable HVM guest ACPI, default=1 (enabled)
    #acpi=1
    # Enable/disable HVM APIC mode, default=1 (enabled)
    # Note that this option is ignored if vcpus > 1
    #apic=1
    # List of which CPUS this domain is allowed to use, default Xen picks
    #cpus = ""         # leave to Xen to pick
    #cpus = "0"        # all vcpus run on CPU0
    #cpus = "0-3,5,^1" # run on cpus 0,2,3,5
    # Optionally define mac and/or bridge for the network interfaces.
    # Random MACs are assigned if not given.
    #vif = [ 'type=ioemu, mac=00:16:3e:00:00:11, bridge=xenbr0, model=ne2k_pci' ]
    # type=ioemu specify the NIC is an ioemu device not netfront
    vif = [ 'type=ioemu, bridge=eth0' ]
    #----------------------------------------------------------------------------
    # Define the disk devices you want the domain to have access to, and
    # what you want them accessible as.
    # Each disk entry is of the form phy:UNAME,DEV,MODE
    # where UNAME is the device, DEV is the device name the domain will see,
    # and MODE is r for read-only, w for read-write.
    #disk = [ 'phy:hda1,hda1,r' ]
    disk = [ 'phy:/dev/drbd4,hda,w', 'file:/root/wxp-sp2.iso,hdc:cdrom,r' ]
    #----------------------------------------------------------------------------
    # Configure the behaviour when a domain exits.  There are three 'reasons'
    # for a domain to stop: poweroff, reboot, and crash.  For each of these you
    # may specify:
    #
    #   "destroy",        meaning that the domain is cleaned up as normal;
    #   "restart",        meaning that a new domain is started in place of the old
    #                     one;
    #   "preserve",       meaning that no clean-up is done until the domain is
    #                     manually destroyed (using xm destroy, for example); or
    #   "rename-restart", meaning that the old domain is not cleaned up, but is
    #                     renamed and a new domain started in its place.
    #
    # The default is
    #
    #   on_poweroff = 'destroy'
    #   on_reboot   = 'restart'
    #   on_crash    = 'restart'
    #
    # For backwards compatibility we also support the deprecated option restart
    #
    # restart = 'onreboot' means on_poweroff = 'destroy'
    #                            on_reboot   = 'restart'
    #                            on_crash    = 'destroy'
    #
    # restart = 'always'   means on_poweroff = 'restart'
    #                            on_reboot   = 'restart'
    #                            on_crash    = 'restart'
    #
    # restart = 'never'    means on_poweroff = 'destroy'
    #                            on_reboot   = 'destroy'
    #                            on_crash    = 'destroy'
    #on_poweroff = 'destroy'
    #on_reboot   = 'restart'
    #on_crash    = 'restart'
    #============================================================================
    # New stuff
    device_model = 'qemu-dm'
    #-----------------------------------------------------------------------------
    # boot on floppy (a), hard disk (c), Network (n) or CD-ROM (d)
    # default: hard disk, cd-rom, floppy
    #boot="cda"
    boot="d"
    #-----------------------------------------------------------------------------
    #  write to temporary files instead of disk image files
    #snapshot=1
    #----------------------------------------------------------------------------
    # enable SDL library for graphics, default = 0
    sdl=0
    #----------------------------------------------------------------------------
    # enable VNC library for graphics, default = 1
    vnc=1
    #----------------------------------------------------------------------------
    # address that should be listened on for the VNC server if vnc is set.
    # default is to use 'vnc-listen' setting from /etc/xen/xend-config.sxp
    #vnclisten="127.0.0.1"
    #----------------------------------------------------------------------------
    # set VNC display number, default = domid
    #vncdisplay=1
    #----------------------------------------------------------------------------
    # try to find an unused port for the VNC server, default = 1
    #vncunused=1
    #----------------------------------------------------------------------------
    # enable spawning vncviewer for domain's console
    # (only valid when vnc=1), default = 0
    #vncconsole=0
    #----------------------------------------------------------------------------
    # set password for domain's VNC console
    # default is depents on vncpasswd in xend-config.sxp
    vncpasswd=''
    #----------------------------------------------------------------------------
    # no graphics, use serial port
    #nographic=0
    #----------------------------------------------------------------------------
    # enable stdvga, default = 0 (use cirrus logic device model)
    stdvga=0
    #-----------------------------------------------------------------------------
    #   serial port re-direct to pty deivce, /dev/pts/n
    #   then xm console or minicom can connect
    serial='pty'
    #-----------------------------------------------------------------------------
    #   Qemu Monitor, default is disable
    #   Use ctrl-alt-2 to connect
    monitor=1
    #-----------------------------------------------------------------------------
    #   enable sound card support, [sb16|es1370|all|..,..], default none
    #soundhw='sb16'
    #-----------------------------------------------------------------------------
    #    set the real time clock to local time [default=0 i.e. set to utc]
    #localtime=1
    #-----------------------------------------------------------------------------
    #    set the real time clock offset in seconds [default=0 i.e. same as dom0]
    #rtc_timeoffset=3600
    #-----------------------------------------------------------------------------
    #    start in full screen
    #full-screen=1
    #-----------------------------------------------------------------------------
    #   Enable USB support (specific devices specified at runtime through the
    #                       monitor window)
    #usb=1
    #   Enable USB mouse support (only enable one of the following, `mouse' for
    #                             PS/2 protocol relative mouse, `tablet' for
    #                             absolute mouse)
    #usbdevice='mouse'
    usbdevice='tablet'
    #-----------------------------------------------------------------------------
    #   Set keyboard layout, default is en-us keyboard.
    #keymap='ja'
    
    /proc/drbd
    >
    version: 8.0.14 (api:86/proto:86)
    GIT-hash: bb447522fc9a87d0069b7e14f0234911ebdab0f7 build by phil@fat-tyre, 2008-11-12 16:40:33
     1: cs:Connected st:Secondary/Primary ds:UpToDate/UpToDate C r---
        ns:0 nr:920 dw:920 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0
            resync: used:0/61 hits:0 misses:0 starving:0 dirty:0 changed:0
            act_log: used:0/127 hits:0 misses:0 starving:0 dirty:0 changed:0
     2: cs:Connected st:Secondary/Secondary ds:UpToDate/UpToDate C r---
        ns:588 nr:0 dw:0 dr:588 al:0 bm:14 lo:0 pe:0 ua:0 ap:0
            resync: used:0/61 hits:0 misses:0 starving:0 dirty:0 changed:0
            act_log: used:0/127 hits:0 misses:0 starving:0 dirty:0 changed:0
     3: cs:Connected st:Primary/Primary ds:UpToDate/UpToDate C r---
        ns:0 nr:370464 dw:1728900 dr:22368 al:149 bm:127 lo:0 pe:0 ua:0 ap:0
            resync: used:0/61 hits:47 misses:13 starving:0 dirty:0 changed:13
            act_log: used:0/127 hits:12148 misses:149 starving:0 dirty:0 changed:149
     4: cs:Connected st:Primary/Secondary ds:UpToDate/UpToDate C r---
        ns:2054864 nr:0 dw:2054864 dr:1777140 al:1767 bm:0 lo:0 pe:0 ua:0 ap:0
            resync: used:0/61 hits:0 misses:0 starving:0 dirty:0 changed:0
            act_log: used:0/127 hits:511949 misses:1781 starving:0 dirty:14 changed:1767
    

    Статистика

    Время первой команды журнала16:59:53 2010- 3-25
    Время последней команды журнала09:48:58 2010- 3-26
    Количество командных строк в журнале101
    Процент команд с ненулевым кодом завершения, % 9.90
    Процент синтаксически неверно набранных команд, % 0.99
    Суммарное время работы с терминалом *, час 1.05
    Количество командных строк в единицу времени, команда/мин 1.60
    Частота использования команд
    xm21|===================| 19.81%
    ls13|============| 12.26%
    screen9|========| 8.49%
    cat6|=====| 5.66%
    make5|====| 4.72%
    less5|====| 4.72%
    ip4|===| 3.77%
    vi4|===| 3.77%
    cd3|==| 2.83%
    apt-get2|=| 1.89%
    sed2|=| 1.89%
    mii-tool2|=| 1.89%
    tail2|=| 1.89%
    drbdadm2|=| 1.89%
    grep2|=| 1.89%
    ssh2|=| 1.89%
    apt-cache2|=| 1.89%
    ifconfig1|| 0.94%
    brctl1|| 0.94%
    menu.lst1|| 0.94%
    reboot1|| 0.94%
    watch1|| 0.94%
    #make1|| 0.94%
    #hg1|| 0.94%
    ping1|| 0.94%
    top1|| 0.94%
    ifup1|| 0.94%
    >1|| 0.94%
    /etc/init.d/xend1|| 0.94%
    scp1|| 0.94%
    sh1|| 0.94%
    11|| 0.94%
    mkisofs1|| 0.94%
    version:1|| 0.94%
    uname1|| 0.94%
    #drbdadm1|| 0.94%
    ьм1|| 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$