/l3/users/igor-public/nt-scale-2010-03/linux10.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 :18 |
|
#cat /mnt/etc/ld.so.conf.d/libc6-xen.conf
# This directive teaches ldconfig to search in nosegneg subdirectories # and cache the DSOs there with extra bit 1 set in their hwcap match # fields. In Xen guest kernels, the vDSO tells the dynamic linker to # search in nosegneg subdirectories and to match this extra hwcap bit # in the ld.so.cache file. hwcap 1 nosegneg |
#sed -i 's/cap 1/cap 0/'
sed: no input files |
#sed -i 's/cap 1/cap 0/' /mnt/etc/ld.so.conf.d/libc6-xen.conf
|
#xm lsit
Error: Subcommand lsit not found! Usage: xm <subcommand> [args] Control, list, and manipulate Xen guest instances. Common 'xm' commands: console Attach to <Domain>'s console. create Create a domain based on <ConfigFile>. new Adds a domain to Xend domain management delete Remove a domain from Xend domain management. destroy Terminate a domain immediately. dump-core Dump core for a specific domain. ... suspend Suspend a Xend managed domain top Monitor a host and the domains in real time. unpause Unpause a paused domain. uptime Print uptime for all/some domains. vcpu-set Set the number of active VCPUs for allowed for the domain. <Domain> can either be the Domain Name or Id. For more help on 'xm' see the xm(1) man page. For more help on 'xm create' see the xmdomain.cfg(5) man page. For a complete list of subcommands run 'xm help'. |
#xm list
Name ID Mem VCPUs State Time(s) Domain-0 0 7979 2 r----- 1691.9 |
#xm create linux1-2.6.18 -c
Using config file "/etc/xen/linux1-2.6.18". Error: Device 769 (vbd) could not be connected. Device /dev/DATA/linux1 is mounted in the privileged domain, and so cannot be mounted by a guest. |
#umount /mnt
|
#xm create linux1-2.6.18 -c
Using config file "/etc/xen/linux1-2.6.18". Started domain linux1 Calibrating delay using timer specific routine.. 4679.32 BogoMIPS (lpj=9358648) Security Framework v1.0.0 initialized SELinux: Disabled at boot. Capability LSM initialized Mount-cache hash table entries: 512 CPU: L1 I cache: 32K, L1 D cache: 32K CPU: L2 cache: 4096K Checking 'hlt' instruction... OK. ... 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. linux10:~# free total used free shared buffers cached Mem: 131220 28088 103132 0 968 9632 -/+ buffers/cache: 17488 113732 Swap: 0 0 0 |
#xm mem-set linux1 200
|
#xm mem-set linux1 64
|
#xm console linux1
linux10:~# linux10:~# free total used free shared buffers cached Mem: 65536 27596 37940 0 996 9644 -/+ buffers/cache: 16956 48580 Swap: 0 0 0 |
#xm mem-set linux1 100
|
#xm console linux1
linux10:~# linux10:~# free total used free shared buffers cached Mem: 102400 28128 74272 0 1004 9644 -/+ buffers/cache: 17480 84920 Swap: 0 0 0 |
#xm mem-set linux1 150
|
#xm console linux1
linux10:~# free total used free shared buffers cached Mem: 130048 27680 102368 0 1016 9696 -/+ buffers/cache: 16968 113080 Swap: 0 0 0 |
#cat /etc/xen/linux1-2.6.18
kernel = "/boot/vmlinuz-2.6.18-6-xen-686" ramdisk = "/boot/initrd.img-2.6.18-6-xen-686" name = "linux1" vif = [ 'bridge=eth0' ] disk = [ 'phy:/dev/DATA/linux1,hda1,w' ] root = "/dev/hda1 ro" extra = "mem=512M" memory = 128 maxmem = 512 |
#xm console linux1
free total used free shared buffers cached Mem: 65536 27524 38012 0 1032 9696 -/+ buffers/cache: 16796 48740 Swap: 0 0 0 linux10:~# linux10:~# uname -a Linux linux10 2.6.18-6-xen-686 #1 SMP Sat Dec 27 13:17:00 UTC 2008 i686 GNU/Linux linux10:~# apt-get install htop Reading package lists... Done ... htop Install these packages without verification [y/N]? Y Get:1 http://10.0.35.1 lenny/main htop 0.7-1 [46.8kB] Fetched 46.8kB in 0s (3237kB/s) Selecting previously deselected package htop. (Reading database ... 9411 files and directories currently installed.) Unpacking htop (from .../archives/htop_0.7-1_i386.deb) ... Processing triggers for man-db ... Setting up htop (0.7-1) ... linux10:~# htop |
#xm mem-set linux1 100
|
#xm console linux1
0 1 29 linux10:~# htop |
# Mem[|||||||||||||||||| 17/100MB] Load average: 0.15 0.04 0.01
|
#grep etch /etc/apt/sources.list
deb http://10.0.35.1:9999/debian/ etch main |
##apt-get install linux-image-2.6.18-6-xen-686
|
#cat /etc/xen/linux1-2.6.18
kernel = "/boot/vmlinuz-2.6.18-6-xen-686" ramdisk = "/boot/initrd.img-2.6.18-6-xen-686" name = "linux1" vif = [ 'bridge=eth0' ] disk = [ 'phy:/dev/DATA/linux1,hda1,w' ] root = "/dev/hda1 ro" extra = "mem=512M" memory = 128 maxmem = 512 |
#xm lsit
Error: Subcommand lsit not found! Usage: xm <subcommand> [args] Control, list, and manipulate Xen guest instances. Common 'xm' commands: console Attach to <Domain>'s console. create Create a domain based on <ConfigFile>. new Adds a domain to Xend domain management delete Remove a domain from Xend domain management. destroy Terminate a domain immediately. dump-core Dump core for a specific domain. ... suspend Suspend a Xend managed domain top Monitor a host and the domains in real time. unpause Unpause a paused domain. uptime Print uptime for all/some domains. vcpu-set Set the number of active VCPUs for allowed for the domain. <Domain> can either be the Domain Name or Id. For more help on 'xm' see the xm(1) man page. For more help on 'xm create' see the xmdomain.cfg(5) man page. For a complete list of subcommands run 'xm help'. |
#xm list
Name ID Mem VCPUs State Time(s) Domain-0 0 7979 2 r----- 2824.6 linux1 7 100 1 -b---- 7.6 |
#xm shutdown linux1
|
#xm list
Name ID Mem VCPUs State Time(s) Domain-0 0 7979 2 r----- 2834.4 linux1 7 100 1 -b---- 9.7 |
#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) procbususb on /proc/bus/usb type usbfs (rw) 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) configfs on /sys/kernel/config type configfs (rw) ocfs2_dlmfs on /dlm type ocfs2_dlmfs (rw) |
#mount /dev/DATA/linux1 /mnt
|
#cp -R /lib/modules/2.6.18-6-xen-686 /mnt/lib/modules/
|
#xm create linux1-2.6.18 -c
Using config file "/etc/xen/linux1-2.6.18". Error: Device 769 (vbd) could not be connected. Device /dev/DATA/linux1 is mounted in the privileged domain, and so cannot be mounted by a guest. |
#umount /mnt
|
#xm create linux1-2.6.18 -c
Using config file "/etc/xen/linux1-2.6.18". Started domain linux1 Calibrating delay using timer specific routine.. 4667.95 BogoMIPS (lpj=9335912) Security Framework v1.0.0 initialized SELinux: Disabled at boot. Capability LSM initialized Mount-cache hash table entries: 512 CPU: L1 I cache: 32K, L1 D cache: 32K CPU: L2 cache: 4096K Checking 'hlt' instruction... OK. ... 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 |
#ionice
none: prio 0 |
#ionice -h
Usage: ionice [OPTIONS] [COMMAND [ARG]...] Sets or gets process io scheduling class and priority. -n Class data (typically 0-7, lower being higher prio) -c Scheduling class 1: realtime, 2: best-effort, 3: idle -p Process pid -h This help page Jens Axboe <axboe@suse.de> (C) 2005 |
#df -h
Filesystem Size Used Avail Use% Mounted on /dev/sda1 19G 14G 3.5G 81% / tmpfs 3.9G 0 3.9G 0% /lib/init/rw udev 10M 812K 9.3M 8% /dev tmpfs 3.9G 0 3.9G 0% /dev/shm |
#dd if=/dev/zero of=/tmp/disk bs=1024k count=2048 &
[1] 11500 |
#dd if=/dev/zero of=/tmp/disk2 bs=1024k count=200
200+0 records in 200+0 records out 209715200 bytes (210 MB) copied, 5.49312 s, 38.2 MB/s |
#dd if=/dev/zero of=/tmp/disk bs=1024k count=2048 &
[1] 11545 |
#dd if=/dev/zero of=/tmp/disk2 bs=1024k count=20
20+0 records in 20+0 records out 20971520 bytes (21 MB) copied, 0.368214 s, 57.0 MB/s |
#xm create linux1-2.6.18
Using config file "/etc/xen/linux1-2.6.18". Started domain linux1 |
#xm list
Name ID Mem VCPUs State Time(s) Domain-0 0 7979 2 r----- 128.3 linux1 1 128 1 -b---- 1.7 |
#ps aux | less
|
#xm list
Name ID Mem VCPUs State Time(s) Domain-0 0 7979 2 r----- 164.3 linux1 1 128 1 -b---- 6.8 |
#ionice -p 4034
none: prio 0 |
#ionice -p 4034 -c 3
|
#ionice -h
Usage: ionice [OPTIONS] [COMMAND [ARG]...] Sets or gets process io scheduling class and priority. -n Class data (typically 0-7, lower being higher prio) -c Scheduling class 1: realtime, 2: best-effort, 3: idle -p Process pid -h This help page Jens Axboe <axboe@suse.de> (C) 2005 |
#ionice -p 4034 -c 2 -n 2
|
#apt-cache search db-ioband
|
#lspci
00:00.0 Host bridge: Intel Corporation 82P965/G965 Memory Controller Hub (rev 02) 00:02.0 VGA compatible controller: Intel Corporation 82G965 Integrated Graphics Controller (rev 02) 00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 (rev 02) 00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 02) 00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 02) 00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02) 00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 02) 00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 02) 00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 02) 00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 02) 00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 02) 00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 02) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev f2) 00:1f.0 ISA bridge: Intel Corporation 82801HB/HR (ICH8/R) LPC Interface Controller (rev 02) 00:1f.2 IDE interface: Intel Corporation 82801H (ICH8 Family) 4 port SATA IDE Controller (rev 02) 00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 02) 00:1f.5 IDE interface: Intel Corporation 82801H (ICH8 Family) 2 port SATA IDE Controller (rev 02) 01:00.0 IDE interface: JMicron Technologies, Inc. JMB368 IDE controller 02:00.0 Ethernet controller: Attansic Technology Corp. L1 Gigabit Ethernet Adapter (rev b0) 03:00.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02) |
#screen -x
|
#ifconfig -a | less
|
#lspci
00:00.0 Host bridge: Intel Corporation 82P965/G965 Memory Controller Hub (rev 02) 00:02.0 VGA compatible controller: Intel Corporation 82G965 Integrated Graphics Controller (rev 02) 00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 (rev 02) 00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 02) 00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 02) 00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02) 00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 02) 00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 02) 00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 02) 00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 02) 00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 02) 00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 02) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev f2) 00:1f.0 ISA bridge: Intel Corporation 82801HB/HR (ICH8/R) LPC Interface Controller (rev 02) 00:1f.2 IDE interface: Intel Corporation 82801H (ICH8 Family) 4 port SATA IDE Controller (rev 02) 00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 02) 00:1f.5 IDE interface: Intel Corporation 82801H (ICH8 Family) 2 port SATA IDE Controller (rev 02) 01:00.0 IDE interface: JMicron Technologies, Inc. JMB368 IDE controller 02:00.0 Ethernet controller: Attansic Technology Corp. L1 Gigabit Ethernet Adapter (rev b0) 03:00.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02) |
#find /sys -name \*03:00.0\*
/sys/devices/pci0000:00/0000:00:1e.0/0000:03:00.0 /sys/bus/pci/devices/0000:03:00.0 /sys/bus/pci/drivers/e1000/0000:03:00.0 |
#ls -l /sys/bus/pci/drivers/e1000/
total 0 lrwxrwxrwx 1 root root 0 2010-03-25 12:46 0000:03:00.0 -> ../../../../devices/pci0000:00/0000:00:1e.0/0000:03:00.0 --w------- 1 root root 4096 2010-03-25 12:47 bind lrwxrwxrwx 1 root root 0 2010-03-25 12:47 module -> ../../../../module/e1000 --w------- 1 root root 4096 2010-03-25 12:47 new_id --w------- 1 root root 4096 2010-03-25 14:37 uevent --w------- 1 root root 4096 2010-03-25 12:47 unbind |
#echo -n 0000:03:00.0 > /sys/bus/pci/drivers/e1000/unbind
|
#ls -l /sys/bus/pci/drivers/pciback/
total 0 --w------- 1 root root 4096 2010-03-25 12:48 bind lrwxrwxrwx 1 root root 0 2010-03-25 12:46 module -> ../../../../module/pciback --w------- 1 root root 4096 2010-03-25 12:48 new_id --w------- 1 root root 4096 2010-03-25 12:48 new_slot -rw------- 1 root root 4096 2010-03-25 12:48 permissive -rw------- 1 root root 4096 2010-03-25 12:48 quirks --w------- 1 root root 4096 2010-03-25 12:48 remove_slot -r-------- 1 root root 4096 2010-03-25 12:48 slots --w------- 1 root root 4096 2010-03-25 14:37 uevent --w------- 1 root root 4096 2010-03-25 12:48 unbind |
#echo -n 0000:03:00.0 > /sys/bus/pci/drivers/pciback/bind
|
#xm list
Name ID Mem VCPUs State Time(s) Domain-0 0 7979 2 r----- 581.8 linux1 1 128 1 -b---- 6.9 |
#xm shutdown linux1
|
#vi /etc/xen/linux1-2.6.18
--- /tmp/l3-saved-3718.10382.5904 2010-03-25 12:49:09.000000000 +0200 +++ /etc/xen/linux1-2.6.18 2010-03-25 12:49:23.000000000 +0200 @@ -7,4 +7,4 @@ extra = "mem=512M" memory = 128 maxmem = 512 - +pci=['03:00.0'] |
#xm list
Name ID Mem VCPUs State Time(s) Domain-0 0 7979 2 r----- 606.3 |
#xm create linux1
Using config file "/etc/xen/linux1". Started domain linux1 |
#xm destroy linux1
|
#xm create linux1-2.6.18
Using config file "/etc/xen/linux1-2.6.18". Started domain linux1 |
#xm console linux1 -c
Error: option -c not recognized Usage: xm console [-q|--quiet] <Domain> Attach to <Domain>'s console. -q, --quiet Do not print an error message if the domain does not exist |
#xm console linux1
pcifront pci-0: Creating PCI Frontend Bus 0000:00 IP route cache hash table entries: 16384 (order: 4, 65536 bytes) TCP established hash table entries: 65536 (order: 7, 524288 bytes) TCP bind hash table entries: 32768 (order: 6, 262144 bytes) TCP: Hash tables configured (established 65536 bind 32768) TCP reno registered audit: initializing netlink socket (disabled) audit(1269521381.346:1): initialized VFS: Disk quotas dquot_6.5.1 Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) ... Selecting previously deselected package libpci3. (Reading database ... 9423 files and directories currently installed.) Unpacking libpci3 (from .../libpci3_1%3a3.0.0-6_i386.deb) ... Selecting previously deselected package pciutils. Unpacking pciutils (from .../pciutils_1%3a3.0.0-6_i386.deb) ... Processing triggers for man-db ... Setting up libpci3 (1:3.0.0-6) ... Setting up pciutils (1:3.0.0-6) ... linux10:~# lspci 00:00.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02) |
#m-a a-i drbd
âââââââââââââââââââââ⤠Updating cached package data âââââââââââââââââââââââ â .. â â â â â â 0% â â â âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ Updated infos about 1 packages |
#m-a a-i drbd8
â â â â â â â â â â â â â â â â â â â â â â â 100% â â â âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ Done with /usr/src/drbd8-2.6.26-2-xen-686_8.0.14-2+lenny1+2.6.26-21lenny4_i386.deb . dpkg -Ei /usr/src/drbd8-2.6.26-2-xen-686_8.0.14-2+lenny1+2.6.26-21lenny4_i386.deb Selecting previously deselected package drbd8-2.6.26-2-xen-686. (Reading database ... 116493 files and directories currently installed.) Unpacking drbd8-2.6.26-2-xen-686 (from .../drbd8-2.6.26-2-xen-686_8.0.14-2+lenny1+2.6.26-21lenny4_i386.deb) ... Setting up drbd8-2.6.26-2-xen-686 (2:8.0.14-2+lenny1+2.6.26-21lenny4) ... |
#modprobe drbd
|
#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 |
#/etc/init.d/drbd restart
Restarting all DRBD resources. |
#cd /etc/rc2.d/
|
#ls
README S14avahi-daemon S20iscsitarget S20xend s26network-manager S89anacron S99stop-bootlogd S05loadcpufreq S16ssh S20kerneloops S21xendomains S26network-manager-dispatcher S89atd S10rsyslog S19cpufrequtils S20kvm S24dhcdbd S30gdm S89cron S12acpid S20cups S20nfs-common S24hal S30system-tools-backends S99rc.local S12dbus S20exim4 S20openbsd-inetd S25mdadm S70drbd S99rmnologin |
#ls *ocfs*
ls: cannot access *ocfs*: No such file or directory |
#ls *o2b*
ls: cannot access *o2b*: No such file or directory |
#vi /etc/fstab
--- /tmp/l3-saved-3718.3242.24141 2010-03-25 14:10:29.000000000 +0200 +++ /etc/fstab 2010-03-25 14:10:36.000000000 +0200 @@ -8,5 +8,5 @@ /dev/fd0 /media/floppy0 auto rw,user,noauto 0 0 LABEL=LV4 /data/lv4 ext3 defaults 0 0 -/dev/drbd1 /ocfs/vol1 ocfs2 defaults 0 0 -/dev/drbd2 /ocfs/vol2 ocfs2 defaults 0 0 +#/dev/drbd1 /ocfs/vol1 ocfs2 defaults 0 0 +#/dev/drbd2 /ocfs/vol2 ocfs2 defaults 0 0 |
#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:WFConnection st:Secondary/Unknown ds:UpToDate/DUnknown C r--- ns:0 nr:0 dw:0 dr:0 al:0 bm:45 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:WFConnection st:Secondary/Unknown ds:UpToDate/DUnknown C r--- ns:0 nr:0 dw:0 dr:0 al:0 bm:38 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 |
#less /var/log/messages
|
#drbdadm secondary all
|
#drbdadm -- --discard-my-data connect all
|
#/etc/init.d/drbd restart
Restarting all DRBD resources. |
#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:SyncTarget st:Secondary/Secondary ds:Inconsistent/UpToDate C r--- ns:0 nr:95360 dw:95360 dr:0 al:0 bm:50 lo:0 pe:0 ua:0 ap:0 [=>..................] sync'ed: 11.2% (818048/913408)K finish: 0:01:16 speed: 10,592 (10,592) K/sec resync: used:0/61 hits:5954 misses:6 starving:0 dirty:0 changed:6 act_log: used:0/127 hits:0 misses:0 starving:0 dirty:0 changed:0 2: cs:SyncTarget st:Secondary/Secondary ds:Inconsistent/UpToDate C r--- ns:0 nr:97280 dw:97280 dr:0 al:0 bm:47 lo:0 pe:0 ua:0 ap:0 [=>..................] sync'ed: 10.0% (922624/1019904)K finish: 0:01:25 speed: 10,808 (10,808) K/sec resync: used:0/61 hits:6070 misses:10 starving:0 dirty:0 changed:10 act_log: used:0/127 hits:0 misses:0 starving:0 dirty:0 changed:0 |
#drbdadm primary r2
|
#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:SyncTarget st:Secondary/Secondary ds:Inconsistent/UpToDate C r--- ns:0 nr:577664 dw:577664 dr:0 al:0 bm:86 lo:0 pe:0 ua:0 ap:0 [===========>........] sync'ed: 63.9% (335744/913408)K finish: 0:00:30 speed: 10,852 (10,312) K/sec resync: used:0/61 hits:36062 misses:42 starving:0 dirty:0 changed:42 act_log: used:0/127 hits:0 misses:0 starving:0 dirty:0 changed:0 2: cs:SyncTarget st:Primary/Secondary ds:Inconsistent/UpToDate C r--- ns:0 nr:579072 dw:579072 dr:0 al:0 bm:80 lo:1 pe:16 ua:0 ap:0 [==========>.........] sync'ed: 57.2% (440832/1019904)K finish: 0:00:40 speed: 10,832 (10,340) K/sec resync: used:1/61 hits:36165 misses:43 starving:0 dirty:0 changed:43 act_log: used:0/127 hits:0 misses:0 starving:0 dirty:0 changed:0 |
#mkfs.ext3 /dev/drbd2
mke2fs 1.41.3 (12-Oct-2008) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 327680 inodes, 1310720 blocks 65536 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=1342177280 40 block groups 32768 blocks per group, 32768 fragments per group 8192 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736 Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 20 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. |
#mount /dev/drbd2 /mnt
|
#mkdir /mnt2
|
#xm list
Name ID Mem VCPUs State Time(s) Domain-0 0 7979 2 r----- 5173.3 linux1 3 128 1 -b---- 8.4 |
#xm shutdown linux1
|
#mount /dev/DATA/linux1 /mnt2/
|
#apt-get install rsync
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: rsync 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 328kB of archives. After this operation, 602kB of additional disk space will be used. Get:1 http://10.0.35.1 lenny/main rsync 3.0.3-2 [328kB] Fetched 328kB in 0s (5745kB/s) Selecting previously deselected package rsync. (Reading database ... 116498 files and directories currently installed.) Unpacking rsync (from .../rsync_3.0.3-2_i386.deb) ... Processing triggers for man-db ... Setting up rsync (3.0.3-2) ... |
#rsync -a /mnt2/ /mnt/
|
#umount /mnt2
|
kernel = "/boot/vmlinuz-2.6.18-6-xen-686" ramdisk = "/boot/initrd.img-2.6.18-6-xen-686" name = "linux1" vif = [ 'bridge=eth0' ] disk = [ 'phy:/dev/DATA/linux1,hda1,w' ] root = "/dev/hda1 ro" extra = "mem=512M" memory = 128 maxmem = 512
# This directive teaches ldconfig to search in nosegneg subdirectories # and cache the DSOs there with extra bit 1 set in their hwcap match # fields. In Xen guest kernels, the vDSO tells the dynamic linker to # search in nosegneg subdirectories and to match this extra hwcap bit # in the ld.so.cache file. hwcap 1 nosegneg
version: 8.0.14 (api:86/proto:86) GIT-hash: bb447522fc9a87d0069b7e14f0234911ebdab0f7 build by phil@fat-tyre, 2008-11-12 16:40:33 1: cs:SyncTarget st:Secondary/Secondary ds:Inconsistent/UpToDate C r--- ns:0 nr:577664 dw:577664 dr:0 al:0 bm:86 lo:0 pe:0 ua:0 ap:0 [===========>........] sync'ed: 63.9% (335744/913408)K finish: 0:00:30 speed: 10,852 (10,312) K/sec resync: used:0/61 hits:36062 misses:42 starving:0 dirty:0 changed:42 act_log: used:0/127 hits:0 misses:0 starving:0 dirty:0 changed:0 2: cs:SyncTarget st:Primary/Secondary ds:Inconsistent/UpToDate C r--- ns:0 nr:579072 dw:579072 dr:0 al:0 bm:80 lo:1 pe:16 ua:0 ap:0 [==========>.........] sync'ed: 57.2% (440832/1019904)K finish: 0:00:40 speed: 10,832 (10,340) K/sec resync: used:1/61 hits:36165 misses:43 starving:0 dirty:0 changed:43 act_log: used:0/127 hits:0 misses:0 starving:0 dirty:0 changed:0
Время первой команды журнала | 11:06:34 2010- 3-25 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 13:18:49 2010- 3-25 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 8.91 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 0.92 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.82 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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