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

Содержание

Журнал

Вторник (04/05/11)

/dev/pts/4
12:01:23
#pvdisplay
  --- Physical volume ---
  PV Name               /dev/md0
  VG Name               VG01
  PV Size               63.09 GB / not usable 448.00 KB
  Allocatable           yes
  PE Size (KByte)       4096
  Total PE              16150
  Free PE               10774
  Allocated PE          5376
  PV UUID               gYusyq-m1PB-bzPd-dw5v-1E9b-2Qsu-XjneLH
12:01:33
#vgdisplay
  --- Volume group ---
  VG Name               VG01
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  10
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               63.09 GB
  PE Size               4.00 MB
  Total PE              16150
  Alloc PE / Size       5376 / 21.00 GB
  Free  PE / Size       10774 / 42.09 GB
  VG UUID               9Wyvuh-41It-Wcxj-c8In-B2Eg-5qR7-eB8jbJ
12:01:45
#lvdisplay
  --- Logical volume ---
  LV Name                /dev/VG01/vol1
  VG Name                VG01
  LV UUID                Chl7E7-Sr7O-tYBa-kD6I-7WUR-VohG-SMSZYY
  LV Write Access        read/write
  LV snapshot status     source of
                         /dev/VG01/voll-snap [INACTIVE]
  LV Status              NOT available
  LV Size                15.00 GB
  Current LE             3840
...
  LV snapshot status     INACTIVE destination for /dev/VG01/vol1
  LV Status              NOT available
  LV Size                15.00 GB
  Current LE             3840
  COW-table size         1.00 GB
  COW-table LE           256
  Snapshot chunk size    4.00 KB
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
12:02:33
#mount -U Chl7E7-Sr7O-tYBa-kD6I-7WUR-VohG-SMSZYY /lvdir
mount: no such partition found
12:03:11
#mount Chl7E7-Sr7O-tYBa-kD6I-7WUR-VohG-SMSZYY /lvdir
mount: special device Chl7E7-Sr7O-tYBa-kD6I-7WUR-VohG-SMSZYY does not exist
12:03:17
#lvcreate
  Please provide a volume group name
  Run `lvcreate --help' for more information.
12:03:31
#lvcreate /dev/VG01
  Please specify either size or extents (not both)
  Run `lvcreate --help' for more information.
12:03:43
#lvcreate /dev/VG01/vol1
  Volume group name expected (no slash)
  Run `lvcreate --help' for more information.
12:03:49
#lvcreate --help
  lvcreate: Create a logical volume
lvcreate
        [-A|--autobackup {y|n}]
        [--addtag Tag]
        [--alloc AllocationPolicy]
        [-C|--contiguous {y|n}]
        [-d|--debug]
        [-h|-?|--help]
        [-i|--stripes Stripes [-I|--stripesize StripeSize]]
        {-l|--extents LogicalExtentsNumber |
...
         -L|--size LogicalVolumeSize[bBsSkKmMgGtTpPeE]}
        [-M|--persistent {y|n}] [--major major] [--minor minor]
        [-n|--name LogicalVolumeName]
        [--noudevsync]
        [-p|--permission {r|rw}]
        [-r|--readahead ReadAheadSectors|auto|none]
        [-t|--test]
        [-v|--verbose]
        [--version]
        [PhysicalVolumePath...]
12:03:59
#partprobe

12:04:42
#mount Chl7E7-Sr7O-tYBa-kD6I-7WUR-VohG-SMSZYY /lvdir
mount: special device Chl7E7-Sr7O-tYBa-kD6I-7WUR-VohG-SMSZYY does not exist
12:04:47
#clear

12:05:44
#lvcreate -l
lvcreate: option requires an argument -- l
  Error during parsing of command line.
12:05:47
#df -l
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1              5078628    866456   3950032  18% /
/dev/sda5             10157320    418604   9214432   5% /var
/dev/sda3             10157328    796664   8836380   9% /home
/dev/sda2             20314668   2775888  16490208  15% /usr
tmpfs                  1829080         0   1829080   0% /dev/shm
/dev/sda7             65112396    184272  61620580   1% /root/APRIL
none                   1829080       104   1828976   1% /var/lib/xenstored
12:05:51
#mount
/dev/sda1 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda5 on /var type ext3 (rw)
/dev/sda3 on /home type ext3 (rw)
/dev/sda2 on /usr type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda7 on /root/APRIL type ext3 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
none on /var/lib/xenstored type tmpfs (rw)
12:06:00
#lvdisplay | less
12:06:58
#mkfs.ext3 /dev/VG01/vol1
mke2fs 1.39 (29-May-2006)
Could not stat /dev/VG01/vol1 --- No such file or directory
The device apparently does not exist; did you specify it correctly?
/dev/pts/1
12:10:01
#lvdisplay
  --- Logical volume ---
  LV Name                /dev/VG01/vol1
  VG Name                VG01
  LV UUID                Chl7E7-Sr7O-tYBa-kD6I-7WUR-VohG-SMSZYY
  LV Write Access        read/write
  LV snapshot status     source of
                         /dev/VG01/voll-snap [INACTIVE]
  LV Status              NOT available
  LV Size                15.00 GB
  Current LE             3840
...
  LV snapshot status     INACTIVE destination for /dev/VG01/vol1
  LV Status              NOT available
  LV Size                15.00 GB
  Current LE             3840
  COW-table size         1.00 GB
  COW-table LE           256
  Snapshot chunk size    4.00 KB
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
12:10:23
#. /etc/bash_completion

12:10:36
#mkfs.ext3
!!/                            filecal                        .lilalo/
16:46:16/                      fotki.tar                      lvdir/
anaconda-ks.cfg                .gconf/                        .mc/
APRIL/                         .gconfd/                       .metacity/
backups/                       .gimp-2.2/                     .mozilla/
.bash_history                  .gnome/                        .nautilus/
.bash_logout                   .gnome2/                       .openoffice.org/
.bash_profile                  .gnome2_private/               .redhat/
.bashrc                        .gstreamer-0.10/               .sane/
c                              .gtkrc-1.2-gnome2              .ssh/
.config/                       .ICEauthority                  .tcshrc
.cshrc                         ifcfg-eth0                     -test10
d                              ifcfg-eth02                    .Trash/
Desktop/                       ifcfg-eth0:3                   Tue Mar 29 16:47:44 ALMT 2011/
.dmrc                          install.log                    .viminfo
e                              install.log.syslog             .xauthdl8MdG
.eggcups/                      .l3rc
.esd_auth                      .lesshst
12:10:36
#mkfs.ext3 /dev/
Display all 212 possibilities? (y or n)
12:10:36
#lvdisplay
  --- Logical volume ---
  LV Name                /dev/VG01/vol1
  VG Name                VG01
  LV UUID                Chl7E7-Sr7O-tYBa-kD6I-7WUR-VohG-SMSZYY
  LV Write Access        read/write
  LV snapshot status     source of
                         /dev/VG01/voll-snap [INACTIVE]
  LV Status              NOT available
  LV Size                15.00 GB
  Current LE             3840
...
  LV snapshot status     INACTIVE destination for /dev/VG01/vol1
  LV Status              NOT available
  LV Size                15.00 GB
  Current LE             3840
  COW-table size         1.00 GB
  COW-table LE           256
  Snapshot chunk size    4.00 KB
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
12:10:53
#yum list bash-completion
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.space.kz
 * base: mirror.space.kz
 * extras: mirror.space.kz
 * rpmforge: fr2.rpmfind.net
 * updates: mirror.space.kz
Available Packages
bash-completion.noarch                         20060301-1.el5.rf                          rpmforge
12:11:08
#mv /etc/bash_completion
bash_completion    bash_completion.d/
12:11:08
#mv /etc/bash_completion.d /etc/bash_completion.d.1

12:11:37
#mv /etc/bash_completion /etc/bash_completion.1

12:12:05
#yum install bash-completion.noarch
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.neolabs.kz
 * base: mirror.neolabs.kz
 * extras: mirror.neolabs.kz
 * rpmforge: fr2.rpmfind.net
 * updates: mirror.neolabs.kz
Setting up Install Process
Resolving Dependencies
--> Running transaction check
...
bash-completion-20060301-1.el5.rf.noarch.rpm                               | 129 kB     00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : bash-completion                                                            1/1
Installed:
  bash-completion.noarch 0:20060301-1.el5.rf
Complete!
12:12:30
#. /etc/bash_completion

12:12:51
#ls /dev/VG0
ls: /dev/VG0: No such file or directory
12:12:55
#ls /dev/VG0*
ls: /dev/VG0*: No such file or directory
12:12:56
#/etc/init.d/lvm2-monitor restart
Stopping monitoring for VG VG01:                           [  OK  ]
Starting monitoring for VG VG01:                           [  OK  ]
12:13:02
#vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "VG01" using metadata type lvm2
12:13:12
#vgchange -a y n
  Volume group "n" not found
12:13:20
#vgchange -a y
  3 logical volume(s) in volume group "VG01" now active
12:13:21
#mkfs.ext3 /dev/VG01/vol[root@linux1:~]# vgchange -a y
mkfs.ext3: invalid option -- a
Usage: mkfs.ext3 [-c|-t|-l filename] [-b block-size] [-f fragment-size]
        [-i bytes-per-inode] [-j] [-J journal-options] [-N number-of-inodes]
        [-m reserved-blocks-percentage] [-o creator-os] [-g blocks-per-group]
        [-L volume-label] [-M last-mounted-directory] [-O feature[,...]]
        [-r fs-revision] [-R options] [-qvSV] device [blocks-count]
12:13:57
#lvdisplay | less
/dev/pts/4
12:16:06
#mount /dev/VG01/vol1 /lvdir

12:16:34
#cp /etc/xen/xmexample.hvm /etc/xen/winxp

прошло 22 минуты
/dev/pts/2
12:39:04
#clear

12:39:08
#brctl show
bridge name     bridge id               STP enabled     interfaces
virbr0          8000.000000000000       yes
12:39:18
#xen xtl
bash: xen: command not found
12:39:42
#xn xtl
bash: xn: command not found
/dev/pts/2
12:40:32
#xm list
ERROR Internal error: Could not obtain handle on privileged command interface (2 = No such file or directory)
Error: Unable to connect to xend: No such file or directory. Is xend running?
12:40:36
#init 6

/dev/pts/2
12:45:41
#clear

12:45:44
#vim /etc/xen/winxp
12:49:05
#on_crash = 'destroy'
total 72
drwxr-xr-x 2 root root 4096 Jul 29  2010 auto
-rwxr-xr-x 1 root root  156 May 18  2007 qemu-ifup
drwxr-xr-x 2 root root 4096 Apr  5 14:57 scripts
-rw-r--r-- 1 root root 7264 Apr  5 16:17 winxp
-rw-r--r-- 1 root root 6458 Jul 29  2010 xend-config.sxp
-rw-r--r-- 1 root root 1256 Jul 29  2010 xend-pci-permissive.sxp
-rw-r--r-- 1 root root 4129 Jul 29  2010 xend-pci-quirks.sxp
-rw-r--r-- 1 root root 5463 Jul 29  2010 xmexample1
-rw-r--r-- 1 root root 6746 Jul 29  2010 xmexample2
-rw-r--r-- 1 root root 7264 Jul 29  2010 xmexample.hvm
-rw-r--r-- 1 root root 5315 Jul 29  2010 xmexample.vti
12:49:21
#chmod 766 winxp
chmod: cannot access `winxp': No such file or directory
12:50:09
#chmod 766 /etc/xen/winxp

12:50:19
#vi /etc/xen/winxp
--- /tmp/l3-saved-4015.2449.30533	2011-04-05 16:50:29.000000000 +0600
+++ /etc/xen/winxp	2011-04-05 16:52:26.000000000 +0600
@@ -25,14 +25,14 @@
 # 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 = 128
+memory = 1024
 
 # Shadow pagetable memory for the domain, in MB.
 # 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 = "ExampleHVMDomain"
+name = "WinXP"
 
 # 128-bit UUID for the domain.  The default behavior is to generate a new UUID
 # on each call to 'xm create'.
@@ -118,6 +118,7 @@
 # boot on floppy (a), hard disk (c) or CD-ROM (d) 
 # default: hard disk, cd-rom, floppy
 #boot="cda"
+boot="d"
 
 #-----------------------------------------------------------------------------
 #  write to temporary files instead of disk image files
/dev/pts/2
12:58:49
#xenbr0 8000.feffffffffff no peth0
bash: xenbr0: command not found
12:59:19
#cp cat /tmp/winxp /etc/xen/winxp
cp: target `/etc/xen/winxp' is not a directory
/dev/pts/5
13:00:04
#ls /
bin   etc   lib64       lvdir1  mnt  proc  selinux  sys  var
boot  home  lost+found  media   net  root  snapdir  tmp
dev   lib   lvdir       misc    opt  sbin  srv      usr
13:00:07
#ls /root
!!               c        fotki.tar     install.log.syslog
16:46:16         d        ifcfg-eth0    lvdir
anaconda-ks.cfg  Desktop  ifcfg-eth02   -test10
APRIL            e        ifcfg-eth0:3  Tue Mar 29 16:47:44 ALMT 2011
backups          filecal  install.log
13:00:11
#ls /root/lvdir

13:00:23
#ls -l /root/lvdir
total 0
13:00:27
#ls -l /etc/xen
total 72
drwxr-xr-x 2 root root 4096 Jul 29  2010 auto
-rwxr-xr-x 1 root root  156 May 18  2007 qemu-ifup
drwxr-xr-x 2 root root 4096 Apr  5 14:57 scripts
-rwxrw-rw- 1 root root 7263 Apr  5 16:52 winxp
-rw-r--r-- 1 root root 6458 Jul 29  2010 xend-config.sxp
-rw-r--r-- 1 root root 1256 Jul 29  2010 xend-pci-permissive.sxp
-rw-r--r-- 1 root root 4129 Jul 29  2010 xend-pci-quirks.sxp
-rw-r--r-- 1 root root 5463 Jul 29  2010 xmexample1
-rw-r--r-- 1 root root 6746 Jul 29  2010 xmexample2
-rw-r--r-- 1 root root 7264 Jul 29  2010 xmexample.hvm
-rw-r--r-- 1 root root 5315 Jul 29  2010 xmexample.vti
13:00:52
#vim /etc/xen/winxp
/dev/pts/2
13:01:08
#cp cat /tmp/winxp /etc/xen/
cp: cannot stat `cat': No such file or directory
cp: overwrite `/etc/xen/winxp'?
13:01:22
#cp /tmp/winxp /etc/xen/
cp: overwrite `/etc/xen/winxp'? y
13:01:28
#xrn create winxp
bash: xrn: command not found
13:01:55
#xm create winxp
Using config file "/etc/xen/winxp".
Error: Device 0 (vif) could not be connected. Could not find bridge device xenbr1
13:02:11
#brctl show
bridge name     bridge id               STP enabled     interfaces
virbr0          8000.000000000000       yes
xenbr0          8000.feffffffffff       no              peth0
                                                        vif0.0
13:02:36
#xm create winxp
Using config file "/etc/xen/winxp".
Error: Device creation failed for domain winxp
13:05:40
#df -l
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1              5078628    867392   3949096  19% /
/dev/sda5             10157320    418976   9214060   5% /var
/dev/sda3             10157328    797720   8835324   9% /home
/dev/sda2             20314668   2776252  16489844  15% /usr
tmpfs                  1829080         0   1829080   0% /dev/shm
/dev/sda7             65112396    184272  61620580   1% /root/APRIL
none                   1829080       120   1828960   1% /var/lib/xenstored
/dev/pts/5
13:06:37
#builder='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 = 512
# Shadow pagetable memory for the domain, in MB.
# Should be at least 2KB per MB of domain memory, plus a few MB per vcpu.
#----------------------------------------------------------------------------
...
#disk = [ 'phy:hda1,hda1,r' ]
disk = [ 'phy:/dev/VG0/vol0,hda,w', 'file:/home/user/winda1.iso,hdc:cdrom,r' ]
#----------------------------------------------------------------------------
# Configure the behaviour when a domain exits.  There are three 'reasons'
disk = [ 'phy:/dev/VG01/vol1,hda,w', 'file:/home/user/winda1.iso,hdc:cdrom,r' ]
# 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
-- INSERT --d00fe-1162-4fc4-b5d8-11993ee4a8b9"
/dev/pts/2
13:08:15
#vfdisplay
bash: vfdisplay: command not found
13:08:30
#vgdisplay

13:08:35
#pvdisplay

13:08:42
#df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1              5078628    867392   3949096  19% /
/dev/sda5             10157320    418976   9214060   5% /var
/dev/sda3             10157328    797724   8835320   9% /home
/dev/sda2             20314668   2776252  16489844  15% /usr
tmpfs                  1829080         0   1829080   0% /dev/shm
/dev/sda7             65112396    184272  61620580   1% /root/APRIL
none                   1829080       120   1828960   1% /var/lib/xenstored
13:08:46
#tracert www.rambler.ru
                 mdadm
Usage: mdadm --help
  for help
13:09:44
#mdadm --help
mdadm is used for building, managing, and monitoring
Linux md devices (aka RAID arrays)
Usage: mdadm --create device options...
            Create a new array from unused devices.
       mdadm --assemble device options...
            Assemble a previously created array.
       mdadm --build device options...
            Create or assemble an array without metadata.
       mdadm --manage device options...
            make changes to an existing array.
...
            Shorthand for --manage.
Any parameter that does not start with '-' is treated as a device name
or, for --examine-bitmap, a file name.
The first such name is often the name of an md device.  Subsequent
names are often names of component devices.
 For detailed help on the above major modes use --help after the mode
 e.g.
         mdadm --assemble --help
 For general help on options use
         mdadm --help-options
13:09:48
#mdadm --assemble
mdadm: an md device must be given in this mode
13:09:54
#mdadm --monitor
mdadm: Cannot monitor: need --scan or at least one device
13:10:39
#ls -l /tmp
total 129800
-rw-r--r--    1 root root     14432 Apr  5 16:49 133Day4.odt
drwxr-xr-x  106 root root     12288 Apr  4 16:12 etc
-rw-r--r--    1 root root 122255360 Apr  4 15:42 etc.tar
-rw-r--r--    1 root root   5522277 Apr  1 09:49 gcc-4.1.2-48.el5.x86_64.rpm
drwx------    2 root root      4096 Apr  5 16:43 gconfd-root
drwx------    3 user user      4096 Apr  5 16:45 gconfd-user
-rw-r--r--    1 root root   2526827 Apr  1 09:49 glibc-devel-2.5-49.x86_64.rpm
-rw-r--r--    1 root root    605915 Apr  1 09:49 glibc-headers-2.5-49.x86_64.rpm
-rw-r--r--    1 root root      5225 Apr  1 09:49 install
...
-rw-r--r--+   1 root root       121 Apr  2 16:26 privet
-rw-rw-r--    1 user user        50 Apr  1 10:58 privet2
-rw-rw-r--    1 user user        14 Apr  1 10:53 salam
drwx------    2 user user      4096 Apr  5 16:45 ssh-aXAHud3608
drwxr-xr-x    2 root root      4096 Mar 29 10:24 sv3pj.tmp
drwx------    2 root root      4096 Mar 29 10:04 virtual-root.08n9gS
drwx------    2 user user      4096 Apr  5 16:45 virtual-user.pUYWXJ
drwx------    2 user user      4096 Apr  5 15:37 virtual-user.rJnlVg
-rw-r--r--    1 root root      7272 Apr  5 16:50 winxp
prw-r--r--    1 root root         0 Mar 28 15:15 xdev
13:10:55
#mdadm --examine --scan > /etc/mdadm/mdadm.conf

13:12:38
#mdadm --assemble /dev/md0
mdadm: /dev/md0 has been started with 2 drives.
13:12:50
#etc/init.d/lvm2-monitor restart
bash: etc/init.d/lvm2-monitor: No such file or directory
13:13:05
#/etc/init.d/lvm2-monitor restart
Stopping monitoring for VG VG01:                           [  OK  ]
Starting monitoring for VG VG01:                           [  OK  ]
13:13:13
#lvdisplay
  --- Logical volume ---
  LV Name                /dev/VG01/vol1
  VG Name                VG01
  LV UUID                Chl7E7-Sr7O-tYBa-kD6I-7WUR-VohG-SMSZYY
  LV Write Access        read/write
  LV Status              NOT available
  LV Size                15.00 GB
  Current LE             3840
  Segments               1
  Allocation             inherit
...
  LV Name                /dev/VG01/vol3
  VG Name                VG01
  LV UUID                yV8Kp6-KoBV-nYT3-9STy-sgJV-nda4-kbYPao
  LV Write Access        read/write
  LV Status              NOT available
  LV Size                5.00 GB
  Current LE             1280
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
13:13:58
#df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1              5078628    867436   3949052  19% /
/dev/sda5             10157320    419004   9214032   5% /var
/dev/sda3             10157328    797936   8835108   9% /home
/dev/sda2             20314668   2776252  16489844  15% /usr
tmpfs                  1829080         0   1829080   0% /dev/shm
/dev/sda7             65112396    184272  61620580   1% /root/APRIL
none                   1829080       120   1828960   1% /var/lib/xenstored
13:14:01
#xm create winxp
Using config file "/etc/xen/winxp".
Started domain winxp
/dev/pts/7
13:14:10
#grep ^disk /etc/xen/winxp
disk = [ 'phy:/dev/VG0/vol0,hda,w', 'file:/home/user/winda1.iso,hdc:cdrom,r' ]
13:14:19
#vgchange -a y
  2 logical volume(s) in volume group "VG01" now active
13:14:27
#ls /dev/VG01/
vol1  vol3
13:14:35
#xm list
Name                                      ID Mem(MiB) VCPUs State   Time(s)
Domain-0                                   0     3427     2 r-----    203.9
winxp                                      4      519     1 r-----      7.8
/dev/pts/2
13:14:53
#xm list
Name                                      ID Mem(MiB) VCPUs State   Time(s)
Domain-0                                   0     3427     2 r-----    204.0
winxp                                      4      519     1 r-----      8.3
13:15:03
#yum install vnc
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.space.kz
 * base: mirror.space.kz
 * extras: mirror.space.kz
 * rpmforge: fr2.rpmfind.net
 * updates: mirror.space.kz
Setting up Install Process
Resolving Dependencies
--> Running transaction check
...
vnc-4.1.2-14.el5_5.4.x86_64.rpm                                                   | 159 kB     00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : vnc                                                                               1/1
Installed:
  vnc.x86_64 0:4.1.2-14.el5_5.4
Complete!
13:15:53
#xm list
Name                                      ID Mem(MiB) VCPUs State   Time(s)
Domain-0                                   0     3427     2 r-----    214.6
winxp                                      4      519     1 r-----     71.0
13:16:12
#vncviewer 127.0.0.1
VNC Viewer Free Edition 4.1.2 for X - built Jul 27 2010 10:24:13
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Tue Apr  5 17:16:41 2011
 main:        unable to connect to host: Connection refused (111)
13:17:16
#vncviewer 127.0.0.1 4
VNC Viewer Free Edition 4.1.2 for X - built Jul 27 2010 10:24:13
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Tue Apr  5 17:17:18 2011
 main:        unable to connect to host: Invalid argument (22)
13:17:28
#vncviewer 127.0.0.1:4
VNC Viewer Free Edition 4.1.2 for X - built Jul 27 2010 10:24:13
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Tue Apr  5 17:17:37 2011
 CConn:       connected to host 127.0.0.1 port 5904
 CConnection: Server supports RFB protocol version 3.8
 CConnection: Using RFB protocol version 3.8
Tue Apr  5 17:17:38 2011
 TXImage:     Using default colormap and visual, TrueColor, depth 24.
 CConn:       Using pixel format depth 6 (8bpp) rgb222
 CConn:       Using ZRLE encoding
Tue Apr  5 17:17:41 2011
 CConn:       Throughput 20156 kbit/s - changing to hextile encoding
 CConn:       Throughput 20156 kbit/s - changing to full colour
 CConn:       Using pixel format depth 24 (32bpp) little-endian rgb888
 CConn:       Using hextile encoding
Tue Apr  5 17:23:16 2011
 main:        read: Connection reset by peer (104)
13:23:18
#vncviewer 127.0.0.1:4
VNC Viewer Free Edition 4.1.2 for X - built Jul 27 2010 10:24:13
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Tue Apr  5 17:24:39 2011
 main:        unable to connect to host: Connection refused (111)
13:24:45
#vncviewer 127.0.0.1:4
VNC Viewer Free Edition 4.1.2 for X - built Jul 27 2010 10:24:13
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Tue Apr  5 17:24:48 2011
 main:        unable to connect to host: Connection refused (111)
13:24:51
#xm list
Name                                      ID Mem(MiB) VCPUs State   Time(s)
Domain-0                                   0     3427     2 r-----    344.3
winxp                                      5      519     1 ------     27.7
13:24:56
#vncviewer 127.0.0.1:5
VNC Viewer Free Edition 4.1.2 for X - built Jul 27 2010 10:24:13
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Tue Apr  5 17:25:05 2011
 CConn:       connected to host 127.0.0.1 port 5905
 CConnection: Server supports RFB protocol version 3.8
 CConnection: Using RFB protocol version 3.8
 TXImage:     Using default colormap and visual, TrueColor, depth 24.
 CConn:       Using pixel format depth 6 (8bpp) rgb222
 CConn:       Using ZRLE encoding
 CConn:       Throughput 20000 kbit/s - changing to hextile encoding
 CConn:       Throughput 20000 kbit/s - changing to full colour
 CConn:       Using pixel format depth 24 (32bpp) little-endian rgb888
 CConn:       Using hextile encoding
Tue Apr  5 17:25:57 2011
 CConn:       Throughput 20000 kbit/s - changing to raw encoding
 CConn:       Using raw encoding
Tue Apr  5 17:42:39 2011
 main:        End of stream
прошло 23 минуты
13:48:05
#vncviewer 127.0.0.1:6
VNC Viewer Free Edition 4.1.2 for X - built Jul 27 2010 10:24:13
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Tue Apr  5 17:48:09 2011
 CConn:       connected to host 127.0.0.1 port 5906
 CConnection: Server supports RFB protocol version 3.8
 CConnection: Using RFB protocol version 3.8
 TXImage:     Using default colormap and visual, TrueColor, depth 24.
 CConn:       Using pixel format depth 6 (8bpp) rgb222
 CConn:       Using ZRLE encoding
 CConn:       Throughput 20000 kbit/s - changing to hextile encoding
 CConn:       Throughput 20000 kbit/s - changing to full colour
 CConn:       Using pixel format depth 24 (32bpp) little-endian rgb888
 CConn:       Using hextile encoding
Tue Apr  5 17:51:07 2011
 CConn:       Throughput 20000 kbit/s - changing to raw encoding
 CConn:       Using raw encoding
прошло 13 минут
14:01:33
#vncviewer 127.0.0.1:6
VNC Viewer Free Edition 4.1.2 for X - built Jul 27 2010 10:24:13
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Tue Apr  5 18:01:36 2011
 CConn:       connected to host 127.0.0.1 port 5906
 CConnection: Server supports RFB protocol version 3.8
 CConnection: Using RFB protocol version 3.8
 TXImage:     Using default colormap and visual, TrueColor, depth 24.
 CConn:       Using pixel format depth 6 (8bpp) rgb222
 CConn:       Using ZRLE encoding
 CConn:       Throughput 20000 kbit/s - changing to hextile encoding
 CConn:       Throughput 20000 kbit/s - changing to full colour
 CConn:       Using pixel format depth 24 (32bpp) little-endian rgb888
 CConn:       Using hextile encoding
Tue Apr  5 18:07:24 2011
 CConn:       Throughput 20000 kbit/s - changing to raw encoding
 CConn:       Using raw encoding
/dev/pts/9
14:05:55
#ping -f 192.168.15.11
PING 192.168.15.11 (192.168.15.11) 56(84) bytes of data.
/dev/pts/5
14:09:06
#yum install rdesktop
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.space.kz
 * base: mirror.space.kz
 * extras: mirror.space.kz
 * rpmforge: fr2.rpmfind.net
 * updates: mirror.space.kz
Setting up Install Process
Resolving Dependencies
--> Running transaction check
...
rdesktop-1.6.0-3.x86_64.rpm                              | 163 kB     00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : rdesktop                                                 1/1
Installed:
  rdesktop.x86_64 0:1.6.0-3
Complete!
14:10:03
#rdesktop -f 192.168.15.11
Autoselected keyboard map en-us
WARNING: Remote desktop does not support colour depth 24; falling back to 16

Статистика

Время первой команды журнала12:01:23 2011- 4- 5
Время последней команды журнала14:10:03 2011- 4- 5
Количество командных строк в журнале101
Процент команд с ненулевым кодом завершения, %28.71
Процент синтаксически неверно набранных команд, % 5.94
Суммарное время работы с терминалом *, час 2.14
Количество командных строк в единицу времени, команда/мин 0.78
Частота использования команд
ls9|========| 8.65%
xm8|=======| 7.69%
vncviewer8|=======| 7.69%
lvdisplay6|=====| 5.77%
mount5|====| 4.81%
mdadm5|====| 4.81%
lvcreate5|====| 4.81%
yum4|===| 3.85%
cp4|===| 3.85%
mkfs.ext34|===| 3.85%
df4|===| 3.85%
mv3|==| 2.88%
vgchange3|==| 2.88%
clear3|==| 2.88%
brctl2|=| 1.92%
chmod2|=| 1.92%
/etc/init.d/lvm2-monitor2|=| 1.92%
pvdisplay2|=| 1.92%
.2|=| 1.92%
vim2|=| 1.92%
less2|=| 1.92%
vgdisplay2|=| 1.92%
xen1|| 0.96%
tracert1|| 0.96%
vfdisplay1|| 0.96%
rdesktop1|| 0.96%
/etc/mdadm/mdadm.conf1|| 0.96%
on_crash1|| 0.96%
ping1|| 0.96%
xrn1|| 0.96%
builder='hvm'1|| 0.96%
xenbr01|| 0.96%
xn1|| 0.96%
vgscan1|| 0.96%
vi1|| 0.96%
partprobe1|| 0.96%
grep1|| 0.96%
init1|| 0.96%
lvm2-monitor1|| 0.96%
____
*) Интервалы неактивности длительностью 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$