/l3/users/silentw/nt-scale/linux1.unix.nt/user |
|
$ls -la
total 168 drwxr-xr-x 18 user user 4096 2011-02-21 14:37 . drwxr-xr-x 3 root root 4096 2011-02-21 12:11 .. -rw------- 1 user user 119 2011-02-21 14:38 .bash_history -rw-r--r-- 1 user user 220 2011-02-21 12:11 .bash_logout -rw-r--r-- 1 user root 19 2011-02-21 14:35 .bash_profile -rw-r--r-- 1 user user 3159 2011-02-21 14:34 .bashrc drwx------ 3 user user 4096 2011-02-21 14:31 .dbus drwxr-xr-x 2 user user 4096 2011-02-21 14:31 Desktop drwx------ 4 user user 4096 2011-02-21 14:32 .gconf ... drwxr-xr-x 2 user root 4096 2011-02-21 14:45 .lilalo drwx------ 3 user user 4096 2011-02-21 14:31 .metacity drwx------ 4 user user 4096 2011-02-21 14:38 .mozilla drwxr-xr-x 3 user user 4096 2011-02-21 14:31 .nautilus -rw-r--r-- 1 user user 675 2011-02-21 12:11 .profile drwx------ 2 user user 4096 2011-02-21 14:31 .ssh drwx------ 2 user user 4096 2011-02-21 14:31 .update-notifier -rw------- 1 user user 1281 2011-02-21 14:35 .viminfo -rw------- 1 user user 100 2011-02-21 14:31 .Xauthority -rw------- 1 user user 56174 2011-02-21 14:45 .xsession-errors |
$grep
Usage: grep [OPTION]... PATTERN [FILE]... Try `grep --help' for more information. |
$cd /etc/
|
$ll
bash: ll: command not found |
$ls -la
total 1164 drwxr-xr-x 109 root root 4096 2011-02-21 14:38 . drwxr-xr-x 21 root root 4096 2011-02-21 14:23 .. drwxr-xr-x 3 root root 4096 2011-02-21 12:03 acpi -rw-r--r-- 1 root root 2986 2011-02-21 12:02 adduser.conf -rw-r--r-- 1 root root 45 2011-02-21 12:11 adjtime -rw-r--r-- 1 root root 196 2011-02-21 12:11 aliases drwxr-xr-x 3 root root 4096 2011-02-21 14:13 alsa drwxr-xr-x 2 root root 4096 2011-02-21 14:38 alternatives drwxr-xr-x 5 root root 4096 2011-02-21 14:13 apm ... drwxr-xr-x 2 root root 4096 2011-02-21 14:17 vga drwxr-xr-x 2 root root 4096 2011-02-21 12:02 vim drwx------ 2 root root 4096 2011-02-21 14:20 vpnc drwxr-xr-x 2 root root 4096 2011-02-21 12:11 w3m -rw-r--r-- 1 root root 4221 2010-05-16 17:55 wgetrc -rw-r--r-- 1 root root 1343 2007-01-09 20:39 wodim.conf drwxr-xr-x 2 root root 4096 2011-02-21 14:20 wpa_supplicant drwxr-xr-x 9 root root 4096 2011-02-21 14:21 X11 drwxr-xr-x 4 root root 4096 2011-02-21 14:13 xdg drwxr-xr-x 2 root root 4096 2011-02-21 14:17 xml |
$ssh user@192.168.15.253
root 31139 0.0 0.0 3120 732 pts/0 R+ 07:46 0:00 grep -i netw root@linux3:~# mv /etc/rc2.d/ README S24dhcdbd S10rsyslog S24hal S12acpid S25bluetooth S12dbus S26network-manager S14avahi-daemon S26network-manager-dispatcher S16openvpn S30gdm S16ssh S30system-tools-backends S20cups S89atd ... Connection to 192.168.15.3 closed. user@book:/tmp$ ssh root@192.168.15.3 root@192.168.15.3's password: Linux linux3 2.6.26-2-686 #1 SMP Thu Jan 27 00:28:05 UTC 2011 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Mon Feb 21 07:46:10 2011 from 192.168.15.253 |
$mv /etc/rc2.d/S2
S20cups S24dhcdbd S20exim4 S24hal S20nfs-common S25bluetooth S20openbsd-inetd S26network-manager S20saned S26network-manager-dispatcher S21fam |
$mv /etc/rc2.d/S2
S20cups S24dhcdbd S20exim4 S24hal S20nfs-common S25bluetooth S20openbsd-inetd S26network-manager S20saned S26network-manager-dispatcher S21fam |
$mv /etc/rc2.d/S2
S20cups S24dhcdbd S20exim4 S24hal S20nfs-common S25bluetooth S20openbsd-inetd S26network-manager S20saned S26network-manager-dispatcher S21fam |
$mv /etc/rc2.d/
mv: missing destination file operand after `/etc/rc2.d/' Try `mv --help' for more information. |
$su
Password: |
#/etc/init.d/network-manager-dispatcher stop
Stopping network events dispatcher: NetworkManagerDispatcher. |
#cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 10.0.35.1 search unix.nt |
#ntpdate ntp.lucky.net
21 Feb 14:58:54 ntpdate[32391]: adjust time server 193.193.193.107 offset 0.031901 sec |
#dpkg-reconfigure tzdata
│ Guernsey ▮ │ │ Helsinki ▒ │ │ Isle of Man ▒ │ │ Istanbul ▒ │ │ Jersey ▒ │ │ Kaliningrad ▒ │ │ Kiev ↓ │ │ │ │ │ │ <Ok> <Cancel> │ │ │ └──────────────────────────────────────────────────────────────┘ Current default timezone: 'Europe/Kiev' Local time is now: Mon Feb 21 14:59:14 EET 2011. Universal Time is now: Mon Feb 21 12:59:14 UTC 2011. |
#apt-get install console-cyrillic
│ Both Windows logo keys ↓ │ │ │ │ │ │ <Ok> <Cancel> │ │ │ └───────────────────────────────────────────────────────────────────────────┘ Selecting previously deselected package console-terminus. (Reading database ... 94072 files and directories currently installed.) Unpacking console-terminus (from .../console-terminus_4.26-2.1_all.deb) ... Selecting previously deselected package console-cyrillic. Unpacking console-cyrillic (from .../console-cyrillic_0.9-15.2_all.deb) ... Processing triggers for man-db ... Setting up console-terminus (4.26-2.1) ... Setting up console-cyrillic (0.9-15.2) ... |
#dpkg-reconfigure locales
│ ru_RU.KOI8-R │ │ ru_UA.UTF-8 │ │ uk_UA.UTF-8 │ │ │ │ │ │ <Ok> <Cancel> │ │ │ └───────────────────────────────────────────────────────────────────────────┘ Generating locales (this might take a while)... en_US.UTF-8... done ru_RU.KOI8-R... done ru_UA.UTF-8... done uk_UA.UTF-8... done en_US.UTF-8... done Generation complete. |
#apt-get install mc
Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: xpdf dbview odt2txt The following NEW packages will be installed: mc 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 2140kB of archives. After this operation, 6402kB of additional disk space will be used. Get:1 http://10.0.35.1 lenny/main mc 2:4.6.2~git20080311-4 [2140kB] Fetched 2140kB in 0s (2381kB/s) Selecting previously deselected package mc. (Reading database ... 94473 files and directories currently installed.) Unpacking mc (from .../mc_2%3a4.6.2~git20080311-4_i386.deb) ... Processing triggers for man-db ... Processing triggers for menu ... Setting up mc (2:4.6.2~git20080311-4) ... Processing triggers for menu ... |
$apt-get install strace
E: Could not open lock file /var/lib/dpkg/lock - open (13 Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root? |
$su
Password: |
#apt-get install strace
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: strace 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 160kB of archives. After this operation, 287kB of additional disk space will be used. Get:1 http://10.0.35.1 lenny/main strace 4.5.17+cvs080723-2 [160kB] Fetched 160kB in 0s (2324kB/s) Selecting previously deselected package strace. (Reading database ... 94667 files and directories currently installed.) Unpacking strace (from .../strace_4.5.17+cvs080723-2_i386.deb) ... Processing triggers for man-db ... Setting up strace (4.5.17+cvs080723-2) ... |
#strace rote
strace: rote: command not found |
#strace route
execve("/sbin/route", ["route"], [/* 33 vars */]) = 0 brk(0) = 0x9b4d000 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7789000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=52224, ...}) = 0 mmap2(NULL, 52224, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb777c000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) ... write(4, "RESOLVE-ADDRESS 192.168.15.253\n"..., 31) = 31 read(4, "-15 Timeout reached\n"..., 4096) = 20 close(4) = 0 munmap(0xb741f000, 4096) = 0 write(1, "default 192.168.15.253 0"..., 77default 192.168.15.253 0.0.0.0 UG 0 0 0 eth0 ) = 77 read(3, ""..., 1024) = 0 close(3) = 0 munmap(0xb7787000, 4096) = 0 exit_group(0) = ? |
#dmesg
[ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Linux version 2.6.26-2-686 (Debian 2.6.26-26lenny2) (dannf@debian.org) (gcc version 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)) #1 SMP Thu Jan 27 00:28:05 UTC 2011 [ 0.000000] BIOS-provided physical RAM map: [ 0.000000] BIOS-e820: 0000000000000000 - 000000000009fc00 (usable) [ 0.000000] BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved) [ 0.000000] BIOS-e820: 00000000000e4000 - 0000000000100000 (reserved) [ 0.000000] BIOS-e820: 0000000000100000 - 00000000bf790000 (usable) [ 0.000000] BIOS-e820: 00000000bf790000 - 00000000bf79e000 (ACPI data) [ 0.000000] BIOS-e820: 00000000bf79e000 - 00000000bf7e0000 (ACPI NVS) ... [ 7821.738685] eth1: no IPv6 routers present [ 7824.921228] lp0: using parport0 (interrupt-driven). [ 7824.943556] ppdev: user-space parallel port driver [ 7888.298748] eth1: no IPv6 routers present [ 8413.763867] [drm] Initialized drm 1.1.0 20060810 [ 8413.767862] ACPI: PCI Interrupt 0000:00:02.0[A] -> GSI 16 (level, low) -> IRQ 16 [ 8413.767862] PCI: Setting latency timer of device 0000:00:02.0 to 64 [ 8413.767862] [drm] Initialized i915 1.6.0 20060119 on minor 0 [ 8413.905353] mtrr: type mismatch for c0000000,10000000 old: write-back new: write-combining [ 8445.949391] mtrr: type mismatch for c0000000,10000000 old: write-back new: write-combining |
#cfdisk
|
#dpkg -S `which cfdisk `
util-linux: /sbin/cfdisk |
#apt-get install apt-file
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libapt-pkg-perl libconfig-file-perl liblist-moreutils-perl The following NEW packages will be installed: apt-file libapt-pkg-perl libconfig-file-perl liblist-moreutils-perl 0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. Need to get 171kB of archives. After this operation, 565kB of additional disk space will be used. ... Selecting previously deselected package liblist-moreutils-perl. Unpacking liblist-moreutils-perl (from .../liblist-moreutils-perl_0.22-1+b1_i386.deb) ... Selecting previously deselected package apt-file. Unpacking apt-file (from .../apt-file_2.1.5_all.deb) ... Processing triggers for man-db ... Setting up libconfig-file-perl (1.42-1) ... Setting up libapt-pkg-perl (0.1.22+b1) ... Setting up liblist-moreutils-perl (0.22-1+b1) ... Setting up apt-file (2.1.5) ... You need to run 'apt-file update' as root to update the cache. |
#apt-file update
|
#apt-get install parted
Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: parted-doc The following NEW packages will be installed: parted 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 64.5kB of archives. After this operation, 176kB of additional disk space will be used. Get:1 http://10.0.35.1 lenny/main parted 1.8.8.git.2008.03.24-11.1 [64.5kB] Fetched 64.5kB in 0s (1455kB/s) Selecting previously deselected package parted. (Reading database ... 94740 files and directories currently installed.) Unpacking parted (from .../parted_1.8.8.git.2008.03.24-11.1_i386.deb) ... Processing triggers for man-db ... Setting up parted (1.8.8.git.2008.03.24-11.1) ... |
#cfdisk
|
#cfdisk /sdb
|
#cfdisk /dev/sdb
|
#file -s /dev/sdb
/dev/sdb: x86 boot sector; partition 1: ID=0x83, starthead 1, startsector 63, 40001787 sectors |
#fdisk -l /dev/sdb
Disk /dev/sdb: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xf7189e91 Device Boot Start End Blocks Id System /dev/sdb1 1 2490 20000893+ 83 Linux |
#mkfs.ext3 /dev/sdb1
mke2fs 1.41.3 (12-Oct-2008) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 1250928 inodes, 5000223 blocks 250011 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=0 153 block groups 32768 blocks per group, 32768 fragments per group 8176 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000 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. |
#fdisk -l /dev/sdb
Disk /dev/sdb: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xf7189e91 Device Boot Start End Blocks Id System /dev/sdb1 1 2490 20000893+ 83 Linux |
#file -s /dev/sdb
/dev/sdb: x86 boot sector; partition 1: ID=0x83, starthead 1, startsector 63, 40001787 sectors |
#file -l /dev/sdb
file: invalid option -- l Usage: file [-bcikLhnNrsvz0] [-e test] [-f namefile] [-F separator] [-m magicfiles] file... file -C -m magicfiles Try `file --help' for more information. |
$ls -la
total 152 drwxr-xr-x 25 user user 4096 Feb 24 17:49 . drwxr-xr-x 3 root root 4096 Feb 24 16:31 .. -rw-r--r-- 1 user user 220 Feb 24 16:31 .bash_logout -rw-r--r-- 1 user root 22 Feb 24 17:49 .bash_profile -rw-r--r-- 1 user user 3227 Feb 24 17:48 .bashrc drwxr-xr-x 6 user user 4096 Feb 24 2011 .config drwx------ 3 user user 4096 Feb 24 16:32 .dbus drwxr-xr-x 2 user user 4096 Feb 24 16:32 Desktop -rw-r--r-- 1 user user 41 Feb 24 2011 .dmrc ... drwxr-xr-x 2 user user 4096 Feb 24 16:32 Pictures drwx------ 3 user user 4096 Feb 25 2011 .pki -rw-r--r-- 1 user user 675 Feb 24 16:31 .profile drwxr-xr-x 2 user user 4096 Feb 24 16:32 Public -rw------- 1 user user 218 Feb 24 17:46 .recently-used.xbel drwxr-xr-x 2 user user 4096 Feb 24 16:32 Templates drwx------ 2 user user 4096 Feb 24 16:32 .update-notifier drwxr-xr-x 2 user user 4096 Feb 24 16:32 Videos -rw------- 1 user user 3639 Feb 24 17:50 .xsession-errors -rw------- 1 user user 2068 Feb 24 2011 .xsession-errors.old |
$ps aux |grep l3
user 17484 0.0 0.0 10056 852 pts/1 S+ 17:51 0:00 grep l3 |
$l3agent
bash: l3agent: command not found |
$ls -la
total 152 drwxr-xr-x 25 user user 4096 Feb 24 17:49 . drwxr-xr-x 3 root root 4096 Feb 24 16:31 .. -rw-r--r-- 1 user user 220 Feb 24 16:31 .bash_logout -rw-r--r-- 1 user root 22 Feb 24 17:49 .bash_profile -rw-r--r-- 1 user user 3227 Feb 24 17:48 .bashrc drwxr-xr-x 6 user user 4096 Feb 24 2011 .config drwx------ 3 user user 4096 Feb 24 16:32 .dbus drwxr-xr-x 2 user user 4096 Feb 24 16:32 Desktop -rw-r--r-- 1 user user 41 Feb 24 2011 .dmrc ... drwxr-xr-x 2 user user 4096 Feb 24 16:32 Pictures drwx------ 3 user user 4096 Feb 25 2011 .pki -rw-r--r-- 1 user user 675 Feb 24 16:31 .profile drwxr-xr-x 2 user user 4096 Feb 24 16:32 Public -rw------- 1 user user 218 Feb 24 17:46 .recently-used.xbel drwxr-xr-x 2 user user 4096 Feb 24 16:32 Templates drwx------ 2 user user 4096 Feb 24 16:32 .update-notifier drwxr-xr-x 2 user user 4096 Feb 24 16:32 Videos -rw------- 1 user user 3639 Feb 24 17:50 .xsession-errors -rw------- 1 user user 2068 Feb 24 2011 .xsession-errors.old |
$l3-agent
|
$less .bash_profile
|
$ls -la
total 152 drwxr-xr-x 25 user user 4096 Feb 24 17:49 . drwxr-xr-x 3 root root 4096 Feb 24 16:31 .. -rw-r--r-- 1 user user 220 Feb 24 16:31 .bash_logout -rw-r--r-- 1 user root 22 Feb 24 17:49 .bash_profile -rw-r--r-- 1 user user 3227 Feb 24 17:48 .bashrc drwxr-xr-x 6 user user 4096 Feb 24 2011 .config drwx------ 3 user user 4096 Feb 24 16:32 .dbus drwxr-xr-x 2 user user 4096 Feb 24 16:32 Desktop -rw-r--r-- 1 user user 41 Feb 24 2011 .dmrc ... drwxr-xr-x 2 user user 4096 Feb 24 16:32 Pictures drwx------ 3 user user 4096 Feb 25 2011 .pki -rw-r--r-- 1 user user 675 Feb 24 16:31 .profile drwxr-xr-x 2 user user 4096 Feb 24 16:32 Public -rw------- 1 user user 218 Feb 24 17:46 .recently-used.xbel drwxr-xr-x 2 user user 4096 Feb 24 16:32 Templates drwx------ 2 user user 4096 Feb 24 16:32 .update-notifier drwxr-xr-x 2 user user 4096 Feb 24 16:32 Videos -rw------- 1 user user 3639 Feb 24 17:50 .xsession-errors -rw------- 1 user user 2068 Feb 24 2011 .xsession-errors.old |
$apt-cache search xen
aide-xen - Advanced Intrusion Detection Environment - static binary for XEN autopkgtest-xenlvm - Xen/LVM2 based testbed snapshot system autopkgtest - automatic as-installed testing for Debian packages claws-mail-themes - Pixmap icon themes for the Claws Mail mailer convirt - A graphical Xen management tool libdoxia-maven-plugin-java - A Maven plugin for Doxia libdoxia-sitetools-java - Extension package of the content generation framework Doxia libdoxia-java-doc - a powerful content generation framework libdoxia-java - a powerful content generation framework dtc-xen-firewall - A small firewall script for your dom0 ... xen-docs-4.0 - Documentation for Xen xen-hypervisor-4.0-amd64 - The Xen Hypervisor on AMD64 xen-utils-4.0 - XEN administrative tools xenstore-utils - Xenstore utilities for Xen libxenomai-dev - Headers and static libs for Xenomai libxenomai1 - Shared libraries for Xenomai linux-patch-xenomai - Linux kernel patches for Xenomai xenomai-doc - Xenomai documentation xenomai-runtime - Xenomai runtime utilities xenwatch - Virtualization utilities, mostly for Xen |
$ps aux |grep l3
user 17510 1.1 0.1 50024 10588 ? Ss 17:52 0:03 l3-agent user 17954 0.0 0.0 10060 856 pts/3 S+ 17:56 0:00 grep l3 |
$ls -la
total 156 drwxr-xr-x 25 user user 4096 Feb 24 18:01 . drwxr-xr-x 3 root root 4096 Feb 24 16:31 .. -rw------- 1 user user 113 Feb 24 18:01 .bash_history -rw-r--r-- 1 user user 220 Feb 24 16:31 .bash_logout -rw-r--r-- 1 user root 22 Feb 24 17:49 .bash_profile -rw-r--r-- 1 user user 3227 Feb 24 17:48 .bashrc drwxr-xr-x 6 user user 4096 Feb 24 2011 .config drwx------ 3 user user 4096 Feb 24 16:32 .dbus drwxr-xr-x 2 user user 4096 Feb 24 16:32 Desktop ... drwxr-xr-x 2 user user 4096 Feb 24 16:32 Pictures drwx------ 3 user user 4096 Feb 25 2011 .pki -rw-r--r-- 1 user user 675 Feb 24 16:31 .profile drwxr-xr-x 2 user user 4096 Feb 24 16:32 Public -rw------- 1 user user 218 Feb 24 17:56 .recently-used.xbel drwxr-xr-x 2 user user 4096 Feb 24 16:32 Templates drwx------ 2 user user 4096 Feb 24 16:32 .update-notifier drwxr-xr-x 2 user user 4096 Feb 24 16:32 Videos -rw------- 1 user user 915 Feb 24 18:01 .xsession-errors -rw------- 1 user user 2395 Feb 24 18:01 .xsession-errors.old |
$vim .profile
--- /tmp/l3-saved-18253.27051.27407 2011-02-24 18:02:18.000000000 +0200 +++ .profile 2011-02-24 18:02:37.000000000 +0200 @@ -20,3 +20,4 @@ if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" fi +l3-agent |
$ps aux |grep l3
user 18470 6.6 0.1 51300 11840 ? Ss 18:03 0:01 l3-agent user 18672 0.0 0.0 10060 856 pts/1 S+ 18:04 0:00 grep l3 |
$pkill l3-agent
|
$ps aux |grep l3
user 18689 0.0 0.0 10056 852 pts/1 S+ 18:04 0:00 grep l3 |
$ps aux |grep l3
user 18791 4.1 0.1 49988 10556 ? Ss 18:04 0:00 l3-agent user 18996 0.0 0.0 10060 856 pts/1 S+ 18:04 0:00 grep l3 |
$ssh user@192.168.15.253
list:x:38:38:Mailing List Manager:/var/list:/bin/sh irc:x:39:39:ircd:/var/run/ircd:/bin/sh gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh nobody:x:65534:65534:nobody:/nonexistent:/bin/sh libuuid:x:100:101::/var/lib/libuuid:/bin/sh Debian-exim:x:101:103::/var/spool/exim4:/bin/false statd:x:102:65534::/var/lib/nfs:/bin/false messagebus:x:103:106::/var/run/dbus:/bin/false avahi:x:104:107:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/bin/false usbmux:x:105:46:usbmux daemon,,,:/home/usbmux:/bin/false [root@linux3:~]# |
#ps aux | grep l3
user 18791 1.5 0.1 51300 11860 ? Ss 18:04 0:10 l3-agent root 19652 0.0 0.0 10060 856 pts/4 S+ 18:15 0:00 grep l3 |
#exit
exit |
$su -
********* misc options ********* -V,V show version L list format codes f ASCII art forest -m,m,-L,-T,H threads S children in sum -y change -l format -M,Z security data c true command name -c scheduling class -w,w wide output n numeric WCHAN,UID -H process hierarchy root@linux1:~# ps aux | grep l3 user 18791 1.6 0.1 51300 11860 ? Ss 18:04 0:11 l3-agent root 19700 2.3 0.1 51244 11812 ? Ss 18:15 0:00 l3-agent root 19718 0.0 0.0 10060 856 pts/3 S+ 18:16 0:00 grep l3 root@linux1:~# exit logout |
$su -
\Password: su: Authentication failure |
$su -
Password: l3-agent is already running: pid=19700; pidfile=/root/.lilalo/l3-agent.pid |
#ps aux | grep l3
user 18791 1.6 0.1 51300 11860 ? Ss 18:04 0:11 l3-agent root 19700 2.3 0.1 51244 11828 ? Ss 18:15 0:00 l3-agent root 19860 0.0 0.0 10060 856 pts/5 S+ 18:16 0:00 grep l3 |
#vim /etc/xen/
|
#vim /etc/xen/xend-config.sxp
|
#/etc/init
init.d/ initramfs-tools/ |
#/etc/init.d/xend
xend xendomains |
#/etc/init.d/xend
xend xendomains |
#/etc/init.d/xend restart
Restarting Xen daemons: xend xend. |
#brctl show
bridge name bridge id STP enabled interfaces eth0 8000.001bfc7dbd0e no peth0 pan0 8000.000000000000 no |
$vncviewer 127.0.0.1:0
Connected to RFB server, using protocol version 3.8 No authentication needed Authentication successful Desktop name "Xen-winxp1" VNC server default format: 32 bits per pixel. Least significant byte first in each pixel. True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0 Using default colormap which is TrueColor. Pixel format: 32 bits per pixel. Least significant byte first in each pixel. True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0 Same machine: preferring raw encoding vncviewer: VNC server closed connection |
$cd /etc/xen/scripts/
|
$ls
blktap network-nat vtpm-common.sh block network-route vtpm-delete block-common.sh qemu-ifup vtpm-hotplug-common.sh block-drbd vif2 vtpm-impl block-enbd vif-bridge vtpm-migration.sh block-nbd vif-common.sh xen-hotplug-cleanup external-device-migrate vif-nat xen-hotplug-common.sh locking.sh vif-route xen-network-common.sh logging.sh vscsi xen-script-common.sh network-bridge vtpm |
$cd ..
|
$ls
scripts winxp1 xend-pci-permissive.sxp xenscreenrc vm-linux1 xend-config.sxp xend-pci-quirks.sxp |
$cat winxp1
# -*- mode: python; -*- #============================================================================ # Python configuration setup for 'xm create'. # This script sets the parameters used when a domain is created using 'xm create'. # You use a separate script for each domain you want to create, or # you can set the parameters for the domain on the xm command line. #============================================================================ #---------------------------------------------------------------------------- # Kernel image file. kernel = "hvmloader" ... # - /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' ] |
$scp --help
usage: scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user@]host1:]file1 ... [[user@]host2:]file2 |
$scp ./winxp1 user@192.168.15.2:/etc/xen/winxp2
The authenticity of host '192.168.15.2 (192.168.15.2)' can't be established. RSA key fingerprint is df:bf:5a:8a:20:50:bd:34:df:a6:ee:37:22:2f:3b:98. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.15.2' (RSA) to the list of known hosts. user@192.168.15.2's password: scp: /etc/xen/winxp2/winxp1: Permission denied |
$scp ./winxp1 root@192.168.15.2:/etc/xen/winxp2
root@192.168.15.2's password: winxp1 100% 14KB 14.5KB/s 00:00 |
$vncviewer 127.0.0.1:0
Connected to RFB server, using protocol version 3.8 No authentication needed Authentication successful Desktop name "Xen-winxp1" VNC server default format: 32 bits per pixel. Least significant byte first in each pixel. True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0 Using default colormap which is TrueColor. Pixel format: 32 bits per pixel. Least significant byte first in each pixel. True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0 Same machine: preferring raw encoding vncviewer: VNC server closed connection |
$cd /etc/xen/
|
$ls
scripts winxp1 xend-pci-permissive.sxp xenscreenrc vm-linux1 xend-config.sxp xend-pci-quirks.sxp |
$cd winxp1
bash: cd: winxp1: Not a directory |
$vncviewer 127.0.0.1:0
Connected to RFB server, using protocol version 3.8 No authentication needed Authentication successful Desktop name "Xen-winxp1" VNC server default format: 32 bits per pixel. Least significant byte first in each pixel. True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0 Using default colormap which is TrueColor. Pixel format: 32 bits per pixel. Least significant byte first in each pixel. True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0 Same machine: preferring raw encoding vncviewer: VNC server closed connection |
$vncviewer 127.0.0.1:0
Connected to RFB server, using protocol version 3.8 No authentication needed Authentication successful Desktop name "Xen-winxp1" VNC server default format: 32 bits per pixel. Least significant byte first in each pixel. True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0 Using default colormap which is TrueColor. Pixel format: 32 bits per pixel. Least significant byte first in each pixel. True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0 Same machine: preferring raw encoding vncviewer: VNC server closed connection |
$vncviewer 127.0.0.1:0
Connected to RFB server, using protocol version 3.8 No authentication needed Authentication successful Desktop name "Xen-winxp1" VNC server default format: 32 bits per pixel. Least significant byte first in each pixel. True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0 Using default colormap which is TrueColor. Pixel format: 32 bits per pixel. Least significant byte first in each pixel. True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0 Same machine: preferring raw encoding vncviewer: VNC server closed connection |
$vncviewer 127.0.0.1:0
Connected to RFB server, using protocol version 3.8 No authentication needed Authentication successful Desktop name "Xen-winxp1" VNC server default format: 32 bits per pixel. Least significant byte first in each pixel. True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0 Using default colormap which is TrueColor. Pixel format: 32 bits per pixel. Least significant byte first in each pixel. True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0 Same machine: preferring raw encoding vncviewer: VNC server closed connection |
$vncviewer 127.0.0.1:0
Connected to RFB server, using protocol version 3.8 No authentication needed Authentication successful Desktop name "Xen-winxp1" VNC server default format: 32 bits per pixel. Least significant byte first in each pixel. True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0 Using default colormap which is TrueColor. Pixel format: 32 bits per pixel. Least significant byte first in each pixel. True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0 Same machine: preferring raw encoding vncviewer: VNC server closed connection |
$vncviewer 127.0.0.1:0
Connected to RFB server, using protocol version 3.8 No authentication needed Authentication successful Desktop name "Xen-winxp1" VNC server default format: 32 bits per pixel. Least significant byte first in each pixel. True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0 Using default colormap which is TrueColor. Pixel format: 32 bits per pixel. Least significant byte first in each pixel. True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0 Same machine: preferring raw encoding vncviewer: VNC server closed connection |
$vncviewer 127.0.0.1:0
Connected to RFB server, using protocol version 3.8 No authentication needed Authentication successful Desktop name "Xen-winxp1" VNC server default format: 32 bits per pixel. Least significant byte first in each pixel. True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0 Using default colormap which is TrueColor. Pixel format: 32 bits per pixel. Least significant byte first in each pixel. True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0 Same machine: preferring raw encoding vncviewer: VNC server closed connection |
$su -
Password: l3-agent is already running: pid=22065; pidfile=/root/.lilalo/l3-agent.pid |
#lvcreate -s -L1G -n winbackup RAID10
Path required for Logical Volume "RAID10" The origin name should include the volume group. Run `lvcreate --help' for more information. |
#lvcreate -s -L1G -n winbackup /dev/RAID10/winxp
Logical volume "winbackup" created |
$vncviewer 127.0.0.1:0
Connected to RFB server, using protocol version 3.8 No authentication needed Authentication successful Desktop name "Xen-winxp1" VNC server default format: 32 bits per pixel. Least significant byte first in each pixel. True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0 Using default colormap which is TrueColor. Pixel format: 32 bits per pixel. Least significant byte first in each pixel. True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0 Same machine: preferring raw encoding |
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 10.0.35.1 search unix.nt
# -*- mode: python; -*- #============================================================================ # Python configuration setup for 'xm create'. # This script sets the parameters used when a domain is created using 'xm create'. # You use a separate script for each domain you want to create, or # you can set the parameters for the domain on the xm command line. #============================================================================ #---------------------------------------------------------------------------- # Kernel image file. kernel = "hvmloader" # The domain build function. HVM domain uses 'hvm'. builder='hvm' # Initial memory allocation (in megabytes) for the new domain. # # WARNING: Creating a domain with insufficient memory may cause out of # memory errors. The domain needs enough memory to boot kernel # and modules. Allocating less than 32MBs is not recommended. memory = 512 # Shadow pagetable memory for the domain, in MB. # If not explicictly set, xend will pick an appropriate value. # Should be at least 2KB per MB of domain memory, plus a few MB per vcpu. # shadow_memory = 8 # Whether to transparently share this domain's memory with other domains. # default = 0 # memory_sharing = 0 # A name for your domain. All domains must have different names. name = "winxp1" # 128-bit UUID for the domain. The default behavior is to generate a new UUID # on each call to 'xm create'. #uuid = "06ed00fe-1162-4fc4-b5d8-11993ee4a8b9" #----------------------------------------------------------------------------- # The number of cpus guest platform has, default=1 #vcpus=1 # Enable/disable HVM guest PAE, default=1 (enabled) #pae=1 # Enable/disable HVM guest ACPI, default=1 (enabled) #acpi=1 # Enable/disable HVM APIC mode, default=1 (enabled) # Note that this option is ignored if vcpus > 1 #apic=1 # Enable/disable extended power management support within HVM guest, i.e., beyond # S3, S4, S5 within guest like exposing battery meter. # 0 (default option, extended power management support disabled) # 1 (pass-through mode; uses pass-through as needed; efficient but limited in scope) # 2 (non pass-through mode; extended scope, likely to work on all applicable environment # but comparitively less efficient than pass-through mode) # xen_extended_power_mgmt=0 # List of which CPUS this domain is allowed to use, default Xen picks #cpus = "" # leave to Xen to pick #cpus = "0" # all vcpus run on CPU0 #cpus = "0-3,5,^1" # all vcpus run on cpus 0,2,3,5 #cpus = ["2", "3"] # VCPU0 runs on CPU2, VCPU1 runs on CPU3 # Optionally define mac and/or bridge for the network interfaces. # Random MACs are assigned if not given. #vif = [ 'type=ioemu, mac=00:16:3e:00:00:11, bridge=xenbr0, model=ne2k_pci' ] # type=ioemu specify the NIC is an ioemu device not netfront vif = [ 'type=ioemu, bridge=eth0'] #---------------------------------------------------------------------------- # Define the disk devices you want the domain to have access to, and # what you want them accessible as. # Each disk entry is of the form phy:UNAME,DEV,MODE # where UNAME is the device, DEV is the device name the domain will see, # and MODE is r for read-only, w for read-write. #disk = [ 'phy:hda1,hda1,r' ] disk = [ 'phy:RAID10/winxp,hda,w', 'file:/iso/winxp3.iso,hdc:cdrom,r' ] #---------------------------------------------------------------------------- # Configure the behaviour when a domain exits. There are three 'reasons' # for a domain to stop: poweroff, reboot, and crash. For each of these you # may specify: # # "destroy", meaning that the domain is cleaned up as normal; # "restart", meaning that a new domain is started in place of the old # one; # "preserve", meaning that no clean-up is done until the domain is # manually destroyed (using xm destroy, for example); or # "rename-restart", meaning that the old domain is not cleaned up, but is # renamed and a new domain started in its place. # # In the event a domain stops due to a crash, you have the additional options: # # "coredump-destroy", meaning dump the crashed domain's core and then destroy; # "coredump-restart', meaning dump the crashed domain's core and the restart. # # The default is # # on_poweroff = 'destroy' # on_reboot = 'restart' # on_crash = 'restart' # # For backwards compatibility we also support the deprecated option restart # # restart = 'onreboot' means on_poweroff = 'destroy' # on_reboot = 'restart' # on_crash = 'destroy' # # restart = 'always' means on_poweroff = 'restart' # on_reboot = 'restart' # on_crash = 'restart' # # restart = 'never' means on_poweroff = 'destroy' # on_reboot = 'destroy' # on_crash = 'destroy' #on_poweroff = 'destroy' #on_reboot = 'restart' #on_crash = 'restart' #============================================================================ # Device Model to be used device_model = 'qemu-dm' #----------------------------------------------------------------------------- # boot on floppy (a), hard disk (c), Network (n) or CD-ROM (d) # default: hard disk, cd-rom, floppy #boot="cda" boot="d" #----------------------------------------------------------------------------- # write to temporary files instead of disk image files #snapshot=1 #---------------------------------------------------------------------------- # enable SDL library for graphics, default = 0 sdl=0 #---------------------------------------------------------------------------- # enable OpenGL for texture rendering inside the SDL window, default = 1 # valid only if sdl is enabled. opengl=1 #---------------------------------------------------------------------------- # enable VNC library for graphics, default = 1 vnc=1 #---------------------------------------------------------------------------- # address that should be listened on for the VNC server if vnc is set. # default is to use 'vnc-listen' setting from # auxbin.xen_configdir() + /xend-config.sxp #vnclisten="127.0.0.1" #---------------------------------------------------------------------------- # set VNC display number, default = domid #vncdisplay=1 #---------------------------------------------------------------------------- # try to find an unused port for the VNC server, default = 1 #vncunused=1 #---------------------------------------------------------------------------- # set password for domain's VNC console # default is depents on vncpasswd in xend-config.sxp vncpasswd='' #---------------------------------------------------------------------------- # no graphics, use serial port #nographic=0 #---------------------------------------------------------------------------- # enable stdvga, default = 0 (use cirrus logic device model) stdvga=0 #----------------------------------------------------------------------------- # serial port re-direct to pty deivce, /dev/pts/n # then xm console or minicom can connect serial='pty' #---------------------------------------------------------------------------- # tsc_mode : TSC mode (0=default, 1=native TSC, 2=never emulate, 3=pvrdtscp) # emulate TSC provides synced TSC for all vcpus, but lose perfomrance. # native TSC leverages hardware's TSC(no perf loss), but vcpu's TSC may lose # sync due to hardware's unreliable/unsynced TSC between CPUs. # default intelligently uses native TSC on machines where it is safe, but # switches to emulated if necessary after save/restore/migration # pvrdtscp is for intelligent apps that use special Xen-only paravirtualized # cpuid instructions to obtain offset/scaling/migration info and maximize # performance within pools of machines that support the rdtscp instruction tsc_mode=0 #----------------------------------------------------------------------------- # Qemu Monitor, default is disable # Use ctrl-alt-2 to connect #monitor=1 #----------------------------------------------------------------------------- # enable sound card support, [sb16|es1370|all|..,..], default none #soundhw='sb16' #----------------------------------------------------------------------------- # set the real time clock to local time [default=0 i.e. set to utc] #localtime=1 #----------------------------------------------------------------------------- # set the real time clock offset in seconds [default=0 i.e. same as dom0] #rtc_timeoffset=3600 #----------------------------------------------------------------------------- # start in full screen #full-screen=1 #----------------------------------------------------------------------------- # Enable USB support (specific devices specified at runtime through the # monitor window) #usb=1 # Enable USB mouse support (only enable one of the following, `mouse' for # PS/2 protocol relative mouse, `tablet' for # absolute mouse) #usbdevice='mouse' usbdevice='tablet' #----------------------------------------------------------------------------- # Set keyboard layout, default is en-us keyboard. #keymap='ja' #----------------------------------------------------------------------------- # Enable/disable xen platform PCI device, default=1 (enabled) #xen_platform_pci=1 #----------------------------------------------------------------------------- # Configure guest CPUID responses: # #cpuid=[ '1:ecx=xxxxxxxxxxx00xxxxxxxxxxxxxxxxxxx, # eax=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' ] # - Unset the SSE4 features (CPUID.1[ECX][20-19]) # - Default behaviour for all other bits in ECX And EAX registers. # # Each successive character represent a lesser-significant bit: # '1' -> force the corresponding bit to 1 # '0' -> force to 0 # 'x' -> Get a safe value (pass through and mask with the default policy) # 'k' -> pass through the host bit value # 's' -> as 'k' but preserve across save/restore and migration # # Expose to the guest multi-core cpu instead of multiple processors # Example for intel, expose a 8-core processor : #cpuid=['1:edx=xxx1xxxxxxxxxxxxxxxxxxxxxxxxxxxx, # ebx=xxxxxxxx00010000xxxxxxxxxxxxxxxx', # '4,0:eax=001111xxxxxxxxxxxxxxxxxxxxxxxxxx'] # - CPUID.1[EDX][HT] : Enable HT # - CPUID.1[EBX] : Number of vcpus * 2 # - CPUID.4,0[EAX] : Number of vcpus * 2 - 1 #vcpus=8 # # Example for amd, expose a 5-core processor : # cpuid = ['1:ebx=xxxxxxxx00001010xxxxxxxxxxxxxxxx, # edx=xxx1xxxxxxxxxxxxxxxxxxxxxxxxxxxx', # '0x80000001:ecx=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1x', # '0x80000008:ecx=xxxxxxxxxxxxxxxxxxxxxxxxxx001001'] # - CPUID.1[EBX] : Threads per Core * Cores per Socket (2 * #vcpus) # - CPUID.1[EDX][HT] : Enable HT # - CPUID.0x80000001[CmpLegacy] : Use legacy method # - CPUID.0x80000008[ECX] : #vcpus * 2 - 1 #vcpus=5 # # Downgrade the cpuid to make a better compatibility for migration : # Look like a generic 686 : # cpuid = [ '0:eax=0x3,ebx=0x0,ecx=0x0,edx=0x0', # '1:eax=0x06b1, # ecx=xxxxxxxxxxx0000xx00xxx0000000xx0, # edx=xxx00000xxxxxxx0xxxxxxxxx0xxxxxx', # '4:eax=0x3,ebx=0x0,ecx=0x0,edx=0x0', # '0x80000000:eax=0x3,ebx=0x0,ecx=0x0,edx=0x0'] # with the highest leaf # - CPUID.0[EAX] : Set the highest leaf # - CPUID.1[EAX] : 686 # - CPUID.1[ECX] : Mask some features # - CPUID.1[EDX] : Mask some features # - CPUID.4 : Reply like the highest leaf, in our case CPUID.3 # - CPUID.0x80000000 : No extension we are on a Pentium III, reply like the # highest leaf (CPUID.3). # # Configure host CPUID consistency checks, which must be satisfied for this # VM to be allowed to run on this host's processor type: #cpuid_check=[ '1:ecx=xxxxxxxxxxxxxxxxxxxxxxxxxx1xxxxx' ] # - Host must have VMX feature flag set # # The format is similar to the above for 'cpuid': # '1' -> the bit must be '1' # '0' -> the bit must be '0' # 'x' -> we don't care (do not check) # 's' -> the bit must be the same as on the host that started this VM #----------------------------------------------------------------------------- # Configure passthrough PCI{,-X,e} devices: # # pci=[ '[SSSS:]BB:DD.F[,option1[,option2[...]]]', ... ] # # [SSSS]:BB:DD.F "bus segment:bus:device.function"(1) of the device to # be assigned, bus segment is optional. All fields are # in hexadecimal and no field should be longer than that # as shown in the pattern. Successful assignment may need # certain hardware support and additional configurations # (e.g. VT-d, see docs/misc/vtd.txt for more details). # # (1) bus segment is sometimes also referred to as the PCI "domain", # not to be confused with Xen domain. # # # optionN per-device options in "key=val" format. Current # available options are: # - msitranslate=0|1 # per-device overriden of pci_msitranslate, see below # - power_mgmt=0|1 # per-device overriden of pci_power_mgmt, see below # #pci=[ '07:00.0', '07:00.1' ] # MSI-INTx translation for MSI capable devices: # # If it's set, Xen will enable MSI for the device that supports it even # if the guest don't use MSI. In the case, an IO-APIC type interrupt will # be injected to the guest every time a corresponding MSI message is # received. # If the guest enables MSI or MSI-X, the translation is automatically # turned off. # #pci_msitranslate=1 # PCI Power Management: # # If it's set, the guest OS will be able to program D0-D3hot states of the # PCI device for the purpose of low power consumption. # #pci_power_mgmt=0 # Enable graphics passthrough: # # If it's set, and specify grapchis device BDF in pci passthrough option, # like pci=['xx:xx.x'], it enables graphics passthrough, default=0 (disabled) #gfx_passthru=0 #----------------------------------------------------------------------------- # Configure PVSCSI devices: # #vscsi=[ 'PDEV, VDEV' ] # # PDEV gives physical SCSI device to be attached to specified guest # domain by one of the following identifier format. # - XX:XX:XX:XX (4-tuples with decimal notation which shows # "host:channel:target:lun") # - /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' ]
Время первой команды журнала | 13:45:56 2011- 2-21 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 14:42:32 2011- 2-25 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 97 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 13.40 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 3.09 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.90 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.56 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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