/l3/users/igor-public/nt-scale/debian5.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 |
|
#apt-get install rsync
Reading package lists... Done Building dependency tree Reading state information... Done rsync is already the newest version. rsync set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded. |
#xm list
Name ID Mem VCPUs State Time(s) Domain-0 0 7365 2 r----- 2416.3 knoppix1 10 500 1 -b---- 635.2 |
#xm destroy knoppix1
|
#xm list
Name ID Mem VCPUs State Time(s) Domain-0 0 7365 2 r----- 2434.2 |
#less /etc/xen/dom1
|
#vim /etc/xen/dom1
--- /tmp/l3-saved-5707.4010.28472 2012-02-24 11:03:00.000000000 +0200 +++ /etc/xen/dom1 2012-02-24 11:03:06.000000000 +0200 @@ -8,11 +8,9 @@ #---------------------------------------------------------------------------- # Kernel image file. -kernel = "/boot/vmlinuz-2.6.39-bpo.2-686-pae" kernel = "/boot/vmlinuz-3.2.7" # Optional ramdisk. -ramdisk = "/boot/initrd.img-2.6.39-bpo.2-686-pae-xen-front" ramdisk = "/boot/initrd.img-3.2.7" # The domain build function. Default is 'linux'. |
#grep -xv ^# /etc/xen/dom1 | grep -xv ''
# -*- 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 = "/boot/vmlinuz-3.2.7" ... # - /dev/sdxx or sdx # - /dev/stxx or stx # - /dev/sgxx or sgx # - result of 'scsi_id -gu -s'. # ex. # scsi_id -gu -s /block/sdb # 36000b5d0006a0000006a0257004c0000 # VDEV gives virtual SCSI device by 4-tuples (XX:XX:XX:XX) as # which the specified guest domain recognize. #vscsi = [ '/dev/sdx, 0:0:0:0' ] #============================================================================ |
#grep -v ^# /etc/xen/dom1 | grep -xv ''
kernel = "/boot/vmlinuz-3.2.7" ramdisk = "/boot/initrd.img-3.2.7" builder='linux' memory = 128 name = "dom1" vif = [ 'bridge=eth0' ] disk = [ 'phy:/dev/VG0/vol1,ioemu:sda1,w' ] root = "/dev/xvda1 ro" extra = "" |
#mount /dev/VG0/vol1 /mnt
|
#ls /mnt/lib/modules/
2.6.32-5-686 2.6.39-bpo.2-686-pae |
#cp -R /lib/modules/3.2.7 /mnt/lib/modules/
|
#vgdisplay
--- Volume group --- VG Name VG0 System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 38 VG Access read/write VG Status resizable MAX LV 0 Cur LV 3 Open LV 1 Max PV 0 Cur PV 2 Act PV 2 VG Size 97.79 GiB PE Size 4.00 MiB Total PE 25034 Alloc PE / Size 1561 / 6.10 GiB Free PE / Size 23473 / 91.69 GiB VG UUID 1shb9G-HVgI-8P40-8jqi-D92G-rkmk-tnth3W |
#pvdisplay
--- Physical volume --- PV Name /dev/md0 VG Name VG0 PV Size 4.66 GiB / not usable 260.00 KiB Allocatable yes PE Size 4.00 MiB Total PE 1192 Free PE 399 Allocated PE 793 PV UUID EO3JYK-SH1x-FKhg-Q28x-0IEz-350u-94jgIR --- Physical volume --- PV Name /dev/sda7 VG Name VG0 PV Size 93.13 GiB / not usable 2.22 MiB Allocatable yes PE Size 4.00 MiB Total PE 23842 Free PE 23074 Allocated PE 768 PV UUID 5ErgJk-6Qlz-dZ0z-Hxqe-p622-0UjM-sff4rT |
#fs
fs fsck.cramfs fsck.ext4 fsck.msdos fslsfonts fstopgm fsadm fsck.ext2 fsck.ext4dev fsck.nfs fstab-decode fsck fsck.ext3 fsck.minix fsck.vfat fstobdf |
#which fsadm
/sbin/fsadm |
#dpkg -S `!!`
dpkg -S `which fsadm ` lvm2: /sbin/fsadm |
#fsadm
fsadm: Utility to resize or check the filesystem on a device fsadm [options] check device - Check the filesystem on device using fsck fsadm [options] resize device [new_size[BKMGTPE]] - Change the size of the filesystem on device to new_size Options: -h | --help Show this help message -v | --verbose Be verbose -e | --ext-offline unmount filesystem before ext2/ext3/ext4 resize -f | --force Bypass sanity checks -n | --dry-run Print commands without running them -l | --lvresize Resize given device (if it is LVM device) -y | --yes Answer "yes" at any prompts new_size - Absolute number of filesystem blocks to be in the filesystem, or an absolute size using a suffix (in powers of 1024). If new_size is not supplied, the whole device is used. |
#vim /mnt/etc/inittab
|
#mount
/dev/sda1 on / type ext3 (rw,errors=remount-ro) tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) udev on /dev type tmpfs (rw,mode=0755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) fusectl on /sys/fs/fuse/connections type fusectl (rw) xenfs on /proc/xen type xenfs (rw) binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev) /dev/mapper/VG0-vol1 on /mnt type ext3 (rw) |
#brctl show
bridge name bridge id STP enabled interfaces eth0 8000.000ffee6dd33 no peth0 |
#xm list
Name ID Mem VCPUs State Time(s) Domain-0 0 7365 2 r----- 2999.1 |
#vim /etc/xen/xend-config.sxp
--- /tmp/l3-saved-5707.26352.7433 2012-02-24 11:56:45.000000000 +0200 +++ /etc/xen/xend-config.sxp 2012-02-24 11:56:55.000000000 +0200 @@ -146,7 +146,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=eth0') # # The bridge is named xenbr0, by default. To rename the bridge, use # |
#(vif-script vif-route)
# and how to activate them. For more information, see interfaces(5). # The loopback network interface auto eth0.10 eth0.20 auto lo iface lo inet loopback address 10.0.35.45 netmask 255.255.255.0 #auto e network 10.0.35.0 broadcast 10.0.35.255 gateway 10.0.35.1 ... ~ ~ ~ ~ ~ ~ ~ ~ ~ "/etc/network/interfaces" 30L, 696C written |
#reboot
|
#brctl addif br10 eth0.10
|
#ifconfig eth0.10
eth0.10 Link encap:Ethernet HWaddr 00:0f:fe:e6:dd:33 inet addr:192.168.10.5 Bcast:192.168.10.255 Mask:255.255.255.0 inet6 addr: fe80::20f:feff:fee6:dd33/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:35 errors:0 dropped:0 overruns:0 frame:0 TX packets:37 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:6213 (6.0 KiB) TX bytes:6316 (6.1 KiB) |
#ifconfig br10 192.168.10.5
|
#ifconfig et0.10 0.0.0.0
SIOCSIFADDR: No such device et0.10: ERROR while getting interface flags: No such device |
#ifconfig eth0.10 0.0.0.0
|
#cat /etc/modules
# /etc/modules: kernel modules to load at boot time. # # This file contains the names of kernel modules that should be loaded # at boot time, one per line. Lines beginning with "#" are ignored. # Parameters can be specified after the module name. loop |
#ping 192.168.10.1
PING 192.168.10.1 (192.168.10.1) 56(84) bytes of data. 64 bytes from 192.168.10.1: icmp_req=1 ttl=64 time=0.694 ms ^X^[[A64 bytes from 192.168.10.1: icmp_req=2 ttl=64 time=0.506 ms ^C --- 192.168.10.1 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.506/0.600/0.694/0.094 ms |
#brctl show
bridge name bridge id STP enabled interfaces br10 8000.000ffee6dd33 no eth0.10 |
#vim /etc/xen/dom1
--- /tmp/l3-saved-2453.780.14325 2012-02-24 12:02:59.000000000 +0200 +++ /etc/xen/dom1 2012-02-24 12:03:08.000000000 +0200 @@ -55,7 +55,7 @@ # # vif = [ '', 'bridge=xenbr1' ] -vif = [ 'bridge=eth0' ] +vif = [ 'bridge=br10' ] #vif = [ ] #---------------------------------------------------------------------------- |
#xm console dom1
[ 0.000000] Reserving virtual address space above 0xf5800000 [ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Linux version 3.2.7 (root@debian5) (gcc version 4.4.5 (Debian 4.4.5-8) ) #1 SMP Thu Feb 23 17:56:02 EET 2012 [ 0.000000] ACPI in unprivileged domain disabled [ 0.000000] Released 0 pages of unused memory [ 0.000000] Set 0 page(s) to 1-1 mapping [ 0.000000] BIOS-provided physical RAM map: [ 0.000000] Xen: 0000000000000000 - 00000000000a0000 (usable) [ 0.000000] Xen: 00000000000a0000 - 0000000000100000 (reserved) ... iface eth0 inet static ~ ~ ~ ~ root@debian5:~# ping 10.0.35.1 PING 10.0.35.1 (10.0.35.1) 56(84) bytes of data. ^C --- 10.0.35.1 ping statistics --- 3 packets transmitted, 0 received, 100% packet loss, time 2015ms |
#brctl show
bridge name bridge id STP enabled interfaces br10 8000.000ffee6dd33 no eth0.10 vif1.0 |
#xm console dom1
root@debian5:~# root@debian5:~# root@debian5:~# root@debian5:~# ifconfig eth0 Link encap:Ethernet HWaddr 00:16:3e:6d:23:d7 inet addr:192.168.10.15 Bcast:192.168.10.255 Mask:255.255.255.0 inet6 addr: fe80::216:3eff:fe6d:23d7/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:55 errors:0 dropped:0 overruns:0 frame:0 TX packets:16 errors:0 dropped:0 overruns:0 carrier:0 ... From 192.168.10.15 icmp_seq=61 Destination Host Unreachable From 192.168.10.15 icmp_seq=62 Destination Host Unreachable From 192.168.10.15 icmp_seq=63 Destination Host Unreachable From 192.168.10.15 icmp_seq=64 Destination Host Unreachable From 192.168.10.15 icmp_seq=65 Destination Host Unreachable From 192.168.10.15 icmp_seq=66 Destination Host Unreachable ^C --- 192.168.10.1 ping statistics --- 68 packets transmitted, 0 received, +66 errors, 100% packet loss, time 66999ms pipe 4 |
#xm console dom1
root@debian5:~# root@debian5:~# root@debian5:~# ping 192.168.10.1 PING 192.168.10.1 (192.168.10.1) 56(84) bytes of data. From 192.168.10.15 icmp_seq=1 Destination Host Unreachable From 192.168.10.15 icmp_seq=2 Destination Host Unreachable From 192.168.10.15 icmp_seq=3 Destination Host Unreachable From 192.168.10.15 icmp_seq=4 Destination Host Unreachable From 192.168.10.15 icmp_seq=5 Destination Host Unreachable From 192.168.10.15 icmp_seq=6 Destination Host Unreachable ... --- 192.168.10.1 ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1007ms root@debian5:~# ping 192.168.10.203 PING 192.168.10.203 (192.168.10.203) 56(84) bytes of data. 64 bytes from 192.168.10.203: icmp_req=1 ttl=64 time=4.25 ms 64 bytes from 192.168.10.203: icmp_req=2 ttl=64 time=0.742 ms ^C --- 192.168.10.203 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1001ms rtt min/avg/max/mdev = 0.742/2.498/4.255/1.757 ms |
#tcpdump -i eth0.10
tcpdump: WARNING: eth0.10: no IPv4 address assigned tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0.10, link-type EN10MB (Ethernet), capture size 65535 bytes 12:06:55.126630 ARP, Request who-has linux1.unix.nt tell 192.168.10.15, length 28 12:06:55.230520 IP6 fe80::20f:feff:fee6:dd33.mdns > ff02::fb.mdns: 0 PTR (QM)? 15.10.168.192.in-addr.arpa. (44) 12:06:55.230585 IP debian5.local.mdns > 224.0.0.251.mdns: 0 PTR (QM)? 15.10.168.192.in-addr.arpa. (44) 12:06:55.230636 IP6 fe80::20f:feff:fee6:dd33.mdns > ff02::fb.mdns: 0 PTR (QM)? 15.10.168.192.in-addr.arpa. (44) 12:06:56.126185 ARP, Request who-has linux1.unix.nt tell 192.168.10.15, length 28 12:06:56.231608 IP6 fe80::20f:feff:fee6:dd33.mdns > ff02::fb.mdns: 0 PTR (QM)? 15.10.168.192.in-addr.arpa. (44) 12:06:56.231660 IP debian5.local.mdns > 224.0.0.251.mdns: 0 PTR (QM)? 15.10.168.192.in-addr.arpa. (44) ... 12:07:05.887823 IP debian5.local.mdns > 224.0.0.251.mdns: 0*- [0q] 1/0/0 (Cache flush) PTR debian5.local. (64) 12:07:06.126192 ARP, Request who-has linux1.unix.nt tell 192.168.10.15, length 28 12:07:07.126281 ARP, Request who-has linux1.unix.nt tell 192.168.10.15, length 28 12:07:08.126237 ARP, Request who-has linux1.unix.nt tell 192.168.10.15, length 28 12:07:09.126180 ARP, Request who-has linux1.unix.nt tell 192.168.10.15, length 28 12:07:10.126266 ARP, Request who-has linux1.unix.nt tell 192.168.10.15, length 28 ^C 38 packets captured 38 packets received by filter 0 packets dropped by kernel |
#tcpdump -i eth0 -n
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes 12:07:20.775108 IP 10.0.35.45.22 > 10.0.35.40.56453: Flags [P.], seq 399888402:399888514, ack 146349581, win 2177, options [nop,nop,TS val 47338 ecr 766197969], length 112 12:07:20.775203 IP 10.0.35.45.22 > 10.0.35.40.56453: Flags [P.], seq 112:160, ack 1, win 2177, options [nop,nop,TS val 47338 ecr 766197969], length 48 12:07:20.775310 IP 10.0.35.45.22 > 10.0.35.40.56453: Flags [P.], seq 160:272, ack 1, win 2177, options [nop,nop,TS val 47338 ecr 766197969], length 112 12:07:20.775399 IP 10.0.35.45.22 > 10.0.35.40.56453: Flags [P.], seq 272:320, ack 1, win 2177, options [nop,nop,TS val 47338 ecr 766197969], length 48 12:07:20.775644 IP 10.0.35.40.56453 > 10.0.35.45.22: Flags [.], ack 112, win 3914, options [nop,nop,TS val 766198005 ecr 47338], length 0 12:07:20.775657 IP 10.0.35.40.56453 > 10.0.35.45.22: Flags [.], ack 160, win 3914, options [nop,nop,TS val 766198005 ecr 47338], length 0 12:07:20.775660 IP 10.0.35.40.56453 > 10.0.35.45.22: Flags [.], ack 272, win 3914, options [nop,nop,TS val 766198005 ecr 47338], length 0 12:07:20.775661 IP 10.0.35.45.22 > 10.0.35.40.56453: Flags [P.], seq 320:528, ack 1, win 2177, options [nop,nop,TS val 47338 ecr 766198005], length 208 ... 12:07:24.054351 IP 10.0.35.40.22 > 10.0.35.45.41038: Flags [.], seq 4262384:4265280, ack 1105, win 1435, options [nop,nop,TS val 766198823 ecr 48157], length 2896 12:07:24.054357 IP 10.0.35.45.41038 > 10.0.35.40.22: Flags [.], ack 4265280, win 24656, options [nop,nop,TS val 48158 ecr 766198823], length 0 12:07:24.054602 IP 10.0.35.40.22 > 10.0.35.45.41038: Flags [.], seq 4265280:4268176, ack 1105, win 1435, options [nop,nop,TS val 766198823 ecr 48157], length 2896 12:07:24.054608 IP 10.0.35.45.41038 > 10.0.35.40.22: Flags [.], ack 4268176, win 24837, options [nop,nop,TS val 48158 ecr 766198823], length 0 12:07:24.054851 IP 10.0.35.40.22 > 10.0.35.45.41038: Flags [.], seq 4268176:4271072, ack 1105, win 1435, options [nop,nop,TS val 766198823 ecr 48157], length 2896 12:07:24.054859 IP 10.0.35.45.41038 > 10.0.35.40.22: Flags [.], ack 4271072, win 25018, options [nop,nop,TS val 48158 ecr 766198823], length 0 ^C^C^C^C^C^C^C^C^C^C^C^C^C 25277 packets captured 26379 packets received by filter 1098 packets dropped by kernel |
#^C
|
#tcpdump -i eth0 -n not port 22
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes 12:07:28.422274 ARP, Request who-has 10.0.1.81 tell 10.0.1.19, length 46 12:07:28.424431 ARP, Request who-has 10.0.3.4 tell 10.0.10.34, length 46 12:07:28.530300 IP6 :: > ff02::1:ff0c:4511: ICMP6, neighbor solicitation, who has fe80::207:e9ff:fe0c:4511, length 24 12:07:28.548868 ARP, Request who-has 10.0.1.4 tell 10.0.34.1, length 46 12:07:28.550460 ARP, Request who-has 10.0.34.1 tell 10.0.1.4, length 46 12:07:28.568029 ARP, Request who-has 10.0.1.35 tell 10.0.27.1, length 46 12:07:28.607112 ARP, Request who-has 10.0.13.2 (ff:ff:ff:ff:ff:ff) tell 10.0.13.2, length 46 12:07:28.625674 IP 10.0.35.1.53 > 10.0.35.43.57500: 17480 3/9/13 AAAA 2002:d5b3:e406::1, AAAA 2a01:d0:1d:200::6, AAAA 2001:470:28:140::5 (493) ... 12:07:32.450255 IP 10.0.55.1.137 > 10.255.255.255.137: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST 12:07:32.457988 IP 10.0.1.82.137 > 10.255.255.255.137: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST 12:07:32.556568 ARP, Request who-has 10.0.40.75 tell 10.0.1.19, length 46 12:07:32.563585 ARP, Request who-has 10.0.3.4 tell 10.0.10.47, length 46 12:07:32.606734 ARP, Request who-has 10.0.13.2 (ff:ff:ff:ff:ff:ff) tell 10.0.13.2, length 46 12:07:32.667422 STP 802.1w, Rapid STP, Flags [Forward, Agreement], bridge-id 8000.00:14:c2:fd:f3:80.8004, length 43 ^C 97 packets captured 97 packets received by filter 0 packets dropped by kernel |
#tcpdump -i eth0 -n not port 22 and host 192.168.10.15
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes 12:07:44.126317 ARP, Request who-has 192.168.10.1 tell 192.168.10.15, length 28 12:07:45.126093 ARP, Request who-has 192.168.10.1 tell 192.168.10.15, length 28 12:07:46.126355 ARP, Request who-has 192.168.10.1 tell 192.168.10.15, length 28 12:07:47.126255 ARP, Request who-has 192.168.10.1 tell 192.168.10.15, length 28 12:07:48.126159 ARP, Request who-has 192.168.10.1 tell 192.168.10.15, length 28 12:07:49.126413 ARP, Request who-has 192.168.10.1 tell 192.168.10.15, length 28 12:07:50.126220 ARP, Request who-has 192.168.10.1 tell 192.168.10.15, length 28 12:07:51.126257 ARP, Request who-has 192.168.10.1 tell 192.168.10.15, length 28 ... 12:07:57.126133 ARP, Request who-has 192.168.10.1 tell 192.168.10.15, length 28 12:07:58.126132 ARP, Request who-has 192.168.10.1 tell 192.168.10.15, length 28 12:07:59.126108 ARP, Request who-has 192.168.10.1 tell 192.168.10.15, length 28 12:08:00.126130 ARP, Request who-has 192.168.10.1 tell 192.168.10.15, length 28 12:08:01.126107 ARP, Request who-has 192.168.10.1 tell 192.168.10.15, length 28 12:08:02.126198 ARP, Request who-has 192.168.10.1 tell 192.168.10.15, length 28 ^C 19 packets captured 19 packets received by filter 0 packets dropped by kernel |
#brctl show
bridge name bridge id STP enabled interfaces br10 8000.000ffee6dd33 no eth0.10 vif1.0 |
#tcpdump -i eth0 -n not port 22 and host 192.168.10.15
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes ^C 0 packets captured 0 packets received by filter 0 packets dropped by kernel |
#tcpdump -i eth0 -n not port 22 and host 10.0.35.55
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes 12:08:54.222203 ARP, Request who-has 10.0.35.1 tell 10.0.35.55, length 28 12:08:55.239373 ARP, Request who-has 10.0.35.1 tell 10.0.35.55, length 28 12:08:56.238119 ARP, Request who-has 10.0.35.1 tell 10.0.35.55, length 28 12:08:57.238176 ARP, Request who-has 10.0.35.1 tell 10.0.35.55, length 28 12:08:58.255397 ARP, Request who-has 10.0.35.1 tell 10.0.35.55, length 28 12:08:59.254219 ARP, Request who-has 10.0.35.1 tell 10.0.35.55, length 28 12:09:00.254257 ARP, Request who-has 10.0.35.1 tell 10.0.35.55, length 28 12:09:01.271489 ARP, Request who-has 10.0.35.1 tell 10.0.35.55, length 28 ... 12:09:16.351449 ARP, Request who-has 10.0.35.1 tell 10.0.35.55, length 28 12:09:17.350175 ARP, Request who-has 10.0.35.1 tell 10.0.35.55, length 28 12:09:18.350258 ARP, Request who-has 10.0.35.1 tell 10.0.35.55, length 28 12:09:19.367468 ARP, Request who-has 10.0.35.1 tell 10.0.35.55, length 28 12:09:20.366285 ARP, Request who-has 10.0.35.1 tell 10.0.35.55, length 28 12:09:21.366172 ARP, Request who-has 10.0.35.1 tell 10.0.35.55, length 28 ^C 28 packets captured 28 packets received by filter 0 packets dropped by kernel |
#ping 192.168.10.1
PING 192.168.10.1 (192.168.10.1) 56(84) bytes of data. ^C --- 192.168.10.1 ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1008ms |
#ping 192.168.10.1
PING 192.168.10.1 (192.168.10.1) 56(84) bytes of data. From 192.168.10.5 icmp_seq=1 Destination Host Unreachable From 192.168.10.5 icmp_seq=2 Destination Host Unreachable From 192.168.10.5 icmp_seq=3 Destination Host Unreachable ^C --- 192.168.10.1 ping statistics --- 6 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4999ms pipe 3 |
#ping 192.168.10.1
PING 192.168.10.1 (192.168.10.1) 56(84) bytes of data. From 192.168.10.5 icmp_seq=1 Destination Host Unreachable ^C --- 192.168.10.1 ping statistics --- 3 packets transmitted, 0 received, +1 errors, 100% packet loss, time 2009ms |
#ifconfig
br10 Link encap:Ethernet HWaddr 00:0f:fe:e6:dd:33 inet addr:192.168.10.5 Bcast:192.168.10.255 Mask:255.255.255.0 inet6 addr: fe80::20f:feff:fee6:dd33/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:263 errors:0 dropped:0 overruns:0 frame:0 TX packets:84 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:12911 (12.6 KiB) TX bytes:10036 (9.8 KiB) eth0 Link encap:Ethernet HWaddr 00:0f:fe:e6:dd:33 inet addr:10.0.35.45 Bcast:10.0.35.255 Mask:255.255.255.0 ... TX packets:22 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1920 (1.8 KiB) TX bytes:1920 (1.8 KiB) vif1.0 Link encap:Ethernet HWaddr fe:ff:ff:ff:ff:ff inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1 RX packets:234 errors:0 dropped:0 overruns:0 frame:0 TX packets:103 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:32 RX bytes:7498 (7.3 KiB) TX bytes:13174 (12.8 KiB) |
#ping 192.168.10.1
PING 192.168.10.1 (192.168.10.1) 56(84) bytes of data. From 192.168.10.5 icmp_seq=1 Destination Host Unreachable From 192.168.10.5 icmp_seq=2 Destination Host Unreachable From 192.168.10.5 icmp_seq=3 Destination Host Unreachable ^C --- 192.168.10.1 ping statistics --- 5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3999ms pipe 3 |
#ssh debian1
Linux debian1 3.2.7 #1 SMP Thu Feb 23 17:56:02 EET 2012 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: Thu Feb 23 11:29:01 2012 from debian4.unix.nt l3-agent is already running: pid=2677; pidfile=/root/.lilalo/l3-agent.pid |
#grep -xv '' /etc/xen/dom1 | grep -v ^#
kernel = "/boot/vmlinuz-3.2.7" ramdisk = "/boot/initrd.img-3.2.7" memory = 128 name = "dom1" vif = [ 'bridge=br10' ] disk = [ 'phy:/dev/VG0/vol1,ioemu:sda1,w' ] root = "/dev/xvda1" extra = "" |
#brctl show
bridge name bridge id STP enabled interfaces br10 8000.000ffe7eb8fb no eth0.10 |
#vim /etc/xen/dom1
|
#xm list
Name ID Mem VCPUs State Time(s) Domain-0 0 7365 2 r----- 97.6 dom1 2 128 1 --p--- 0.0 |
#xm destroy dom1
|
#xm create dom1
Using config file "/etc/xen/dom1". Started domain dom1 (id=3) |
#xm list
Name ID Mem VCPUs State Time(s) Domain-0 0 7365 2 r----- 100.8 dom1 3 128 1 -b---- 1.6 |
#xm console dom1
[ 0.000000] Reserving virtual address space above 0xf5800000 [ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Linux version 3.2.7 (root@debian5) (gcc version 4.4.5 (Debian 4.4.5-8) ) #1 SMP Thu Feb 23 17:56:02 EET 2012 [ 0.000000] ACPI in unprivileged domain disabled [ 0.000000] Released 0 pages of unused memory [ 0.000000] Set 0 page(s) to 1-1 mapping [ 0.000000] BIOS-provided physical RAM map: [ 0.000000] Xen: 0000000000000000 - 00000000000a0000 (usable) [ 0.000000] Xen: 00000000000a0000 - 0000000000100000 (reserved) ... root@debian1virt:~# ping 10.0.35.1 PING 10.0.35.1 (10.0.35.1) 56(84) bytes of data. ^C --- 10.0.35.1 ping statistics --- 4 packets transmitted, 0 received, 100% packet loss, time 3023ms root@debian1virt:~# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.10.1 0.0.0.0 UG 0 0 0 eth0 192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 |
#cat /proc/sys/net/ipv4/ip_forward
0 |
#echo 1 > /proc/sys/net/ipv4/ip_forward
|
#grep forward /etc/sysctl.conf
# Uncomment the next line to enable packet forwarding for IPv4 #net.ipv4.ip_forward=1 # Uncomment the next line to enable packet forwarding for IPv6 #net.ipv6.conf.all.forwarding=1 |
#sed -i s/#net.ipv4.
sed: -e expression #1, char 12: unterminated `s' command |
#sed -i s/#net.ipv4.ip_forward/net.ipv4.ip_forward/ /etc/sysctl.conf
|
#exit
exit Connection to debian1 closed. |
#ssh debian3
Linux debian3 3.2.7 #1 SMP Thu Feb 23 17:56:02 EET 2012 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: Thu Feb 23 11:31:12 2012 from debian4.unix.nt l3-agent is already running: pid=2605; pidfile=/root/.lilalo/l3-agent.pid |
#xm list
Name ID Mem VCPUs State Time(s) Domain-0 0 7365 2 r----- 132.9 dom1 1 128 1 -b---- 2.1 |
#xm console dom1
root@debian13:~# root@debian13:~# root@debian13:~# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.30.3 0.0.0.0 UG 0 0 0 eth0 192.168.30.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 |
#brctl show
bridge name bridge id STP enabled interfaces br30 8000.0007e90c4511 no eth0.30 vif1.0 |
#ifconfig eth0.30
eth0.30 Link encap:Ethernet HWaddr 00:07:e9:0c:45:11 inet6 addr: fe80::207:e9ff:fe0c:4511/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:103 errors:0 dropped:0 overruns:0 frame:0 TX packets:162 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:12828 (12.5 KiB) TX bytes:21568 (21.0 KiB) |
#ifconfig br30
br30 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 inet6 addr: fe80::207:e9ff:fe0c:4511/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:111 errors:0 dropped:0 overruns:0 frame:0 TX packets:62 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:13402 (13.0 KiB) TX bytes:10315 (10.0 KiB) |
#xm console dom1
root@debian13:~# root@debian13:~# root@debian13:~# root@debian13:~# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.30.3 0.0.0.0 UG 0 0 0 eth0 192.168.30.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 |
#exit
exit Connection to debian3 closed. |
#ssh debian2
Linux debian2 3.2.7 #1 SMP Thu Feb 23 17:56:02 EET 2012 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: Thu Feb 23 11:29:12 2012 from debian4.unix.nt l3-agent is already running: pid=2681; pidfile=/root/.lilalo/l3-agent.pid |
#grep -v ^# /etc/xen/dom1 | grep -xv ''
kernel = "/boot/vmlinuz-3.2.7" ramdisk = "/boot/initrd.img-3.2.7" memory = 128 name = "dom1" vif = [ 'bridge=eth0' ] disk = [ 'phy:/dev/VG0/vol1,xvda1,w' ] root = "/dev/xvda1 ro" extra = "" |
#brctl show
bridge name bridge id STP enabled interfaces br20 8000.000ffe7eb92f no eth0.20 |
#sed -i s/eth0/br20/ /etc/xen/dom1
|
#exit
exit Connection to debian2 closed. |
#xm list
Name ID Mem VCPUs State Time(s) Domain-0 0 7365 2 r----- 121.0 dom1 1 128 1 -b---- 2.8 |
#xm console dom1
root@debian5:~# root@debian5:~# root@debian5:~# root@debian5:~# Display all 1148 possibilities? (y or n) ! mrd ./ mren 2to3 mshowfat 2to3-2.6 mt : mt-gnu ... 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 139 kB of archives. After this operation, 1057 kB of additional disk space will be used. Get:1 http://10.0.35.1/debian/ squeeze/main bash-completion all 1:1.2-3 [139 kB] Fetched 139 kB in 0s (3503 kB/s) Selecting previously deselected package bash-completion. (Reading database ... 37134 files and directories currently installed.) Unpacking bash-completion (from .../bash-completion_1%3a1.2-3_all.deb) ... Processing triggers for man-db ... Setting up bash-completion (1:1.2-3) ... |
#vim /etc/network/interfaces
--- /tmp/l3-saved-2453.16518.16920 2012-02-24 12:29:51.000000000 +0200 +++ /etc/network/interfaces 2012-02-24 12:31:20.000000000 +0200 @@ -19,12 +19,17 @@ dns-nameservers 10.0.35.1 dns-search unix.nt -iface eth0.10 inet static - address 192.168.10.5 - netmask 255.255.255.0 - broadcast 192.168.10.255 +iface eth0.10 inet manual + up brctl addbr br10 + up brctl addif br10 eth0.10 + up ifconfig br10 192.168.10.5 255.255.255.0 iface eth0.20 inet static address 192.168.20.5 netmask 255.255.255.0 +iface eth0.30 inet manual + up brctl addbr br30 + up brctl addif br30 eth0.30 + up ifconfig br30 192.168.30.5 255.255.255.0 + |
#ifup eth0.30
Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config Added VLAN with VID == 30 to IF -:eth0:- SIOCSIFADDR: Invalid argument Failed to bring up eth0.30. |
#ifup eth0.30
Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config ERROR: trying to add VLAN #30 to IF -:eth0:- error: File exists device br30 already exists; can't create bridge with the same name Failed to bring up eth0.30. |
#brctl show
bridge name bridge id STP enabled interfaces br10 8000.000ffee6dd33 no eth0.10 vif1.0 br30 8000.000ffee6dd33 no eth0.30 |
#ifconfig br30
br30 Link encap:Ethernet HWaddr 00:0f:fe:e6:dd:33 inet addr:192.168.30.5 Bcast:192.168.30.255 Mask:255.255.255.0 UP 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:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) |
#vim /etc/network/interfaces
|
#~
#net.ipv4.ip_forward=1 |
#echo 1 > /proc/sys/net/ipv4/ip_forward
|
#ssh debian2
Linux debian2 3.2.7 #1 SMP Thu Feb 23 17:56:02 EET 2012 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: Fri Feb 24 12:26:06 2012 from debian5.unix.nt l3-agent is already running: pid=2681; pidfile=/root/.lilalo/l3-agent.pid |
#xm list
Name ID Mem VCPUs State Time(s) Domain-0 0 7365 2 r----- 308.5 dom1 2 128 1 -b---- 2.7 |
#brctl show
bridge name bridge id STP enabled interfaces br20 8000.000ffe7eb92f no eth0.20 vif2.0 |
#ifconfig br20
br20 Link encap:Ethernet HWaddr 00:0f:fe:7e:b9:2f 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:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) |
#ifconfig eth0.20
eth0.20 Link encap:Ethernet HWaddr 00:0f:fe:7e:b9:2f inet addr:192.168.20.2 Bcast:192.168.20.255 Mask:255.255.255.0 inet6 addr: fe80::20f:feff:fe7e:b92f/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:83 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:13698 (13.3 KiB) |
#xm console dom1
|
#ls /etc/rc2.d/*ssh*
/etc/rc2.d/S02ssh |
#exit
exit Connection to debian2 closed. |
#ssh debian3
Linux debian3 3.2.7 #1 SMP Thu Feb 23 17:56:02 EET 2012 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: Fri Feb 24 12:25:10 2012 from debian5.unix.nt l3-agent is already running: pid=2605; pidfile=/root/.lilalo/l3-agent.pid |
#cat /etc/network/interfaces
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo eth0.30 eth0.40 iface lo inet loopback # The primary network interface allow-hotplug eth0 eth0.30 eth0.40 iface eth0 inet static address 10.0.35.43 netmask 255.255.255.0 ... dns-search unix.nt iface eth0.30 inet manual up brctl addbr br30 up brctl addif br30 eth0.30 up ifconfig br30 192.168.30.3/24 # address 192.168.30.3 # netmask 255.255.255.0 iface eth0.40 inet static address 192.168.40.3 netmask 255.255.255.0 |
#exit
exit Connection to debian3 closed. |
# /etc/modules: kernel modules to load at boot time. # # This file contains the names of kernel modules that should be loaded # at boot time, one per line. Lines beginning with "#" are ignored. # Parameters can be specified after the module name. loop
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo eth0.30 eth0.40 iface lo inet loopback # The primary network interface allow-hotplug eth0 eth0.30 eth0.40 iface eth0 inet static address 10.0.35.43 netmask 255.255.255.0 network 10.0.35.0 broadcast 10.0.35.255 gateway 10.0.35.1 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 10.0.35.1 dns-search unix.nt iface eth0.30 inet manual up brctl addbr br30 up brctl addif br30 eth0.30 up ifconfig br30 192.168.30.3/24 # address 192.168.30.3 # netmask 255.255.255.0 iface eth0.40 inet static address 192.168.40.3 netmask 255.255.255.0
0
Время первой команды журнала | 09:31:51 2012- 2-24 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 11:40:11 2012- 2-24 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 6.93 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.49 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.13 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ 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 |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008