memo


※上記の広告は60日以上更新のないWIKIに表示されています。更新することで広告が下部へ移動します。

Memo

メモである。

ぃぬxめも

andromalius:/home/yoshi# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Pentium(R) 4 CPU 3.80GHz
stepping : 10
cpu MHz : 3818.552
cache size : 2048 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu tsc msr pae mce cx8 apic mtrr mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 cid cx16 xtpr lahf_lm
bogomips : 7640.29

processor : 1
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Pentium(R) 4 CPU 3.80GHz
stepping : 10
cpu MHz : 3818.552
cache size : 2048 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu tsc msr pae mce cx8 apic mtrr mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc up pni monitor ds_cpl vmx est tm2 cid cx16 xtpr lahf_lm
bogomips : 7640.29

andromalius:/home/yoshi# uname -a
Linux andromalius 2.6.18-xen #7 SMP Sun Jun 3 18:28:38 JST 2007 i686 GNU/Linux
andromalius:/home/yoshi# lspci
00:00.0 Host bridge: Intel Corporation 945G/GZ/P/PL Express Memory Controller Hub (rev 81)
00:01.0 PCI bridge: Intel Corporation 945G/GZ/P/PL Express PCI Express Root Port (rev 81)
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 01)
00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 01)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #3 (rev 01)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #4 (rev 01)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1)
00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01)
00:1f.2 IDE interface: Intel Corporation 82801GB/GR/GH (ICH7 Family) Serial ATA Storage Controller IDE (rev 01)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 01)
01:00.0 VGA compatible controller: nVidia Corporation NV44 [GeForce 6200 TurboCache(TM)] (rev a1)
03:00.0 Ethernet controller: Broadcom Corporation NetLink BCM5789 Gigabit Ethernet PCI Express (rev 11)
04:00.0 Ethernet controller: 3Com Corporation 3c905C-TX/TX-M [Tornado] (rev 78)
04:06.0 RAID bus controller: <pci_lookup_name: buffer too small> (rev 13)
04:07.0 FireWire (IEEE 1394): Texas Instruments TSB82AA2 IEEE-1394b Link Layer Controller (rev 01)


9/20
makeでエラー

make -C lilyvm
make[1]: ディレクトリ `/home/yoshi/xen-3.1.0-src/extras/mini-os/lilyvm' に入ります
rm -f ../liblilyvm.a
ar r ../liblilyvm.a lilyvm.o parseargs.o sysdep_linux.o timer.o memaccess.o loadkernel.o code.o images.o
ar: creating ../liblilyvm.a
make[1]: ディレクトリ `/home/yoshi/xen-3.1.0-src/extras/mini-os/lilyvm' から出ます
ld -r -m elf_i386 arch/x86/x86_32.o events.o gnttab.o hypervisor.o kernel.o mm.o netfront.o sched.o lib/math.o lib/printf.o lib/string.o lib/xmalloc.o xenbus/xenbus.o console/console.o console/xencons_ring.o -Larch/x86 -lx86_32 -llilyvm -o mini-os.o
ld: cannot find -llilyvm
make: *** [mini-os] エラー 1

svn diff

yoshi@andromalius:~/work/xen-3.1-minios$ svn diff -r 3:4 Makefile
Index: Makefile
===================================================================
      • Makefile (リビジョン 3)
      1. Makefile (リビジョン 4)
@@ -3,6 +3,8 @@
# Every architecture directory below mini-os/arch has to have a
# Makefile and a arch.mk.
#
  1. # for lilyvm
  2. LILYVM = y

XEN_ROOT = ../..
include $(XEN_ROOT)/Config.mk
@@ -51,8 +53,11 @@
include minios.mk

# Define some default flags for linking.
  • LDLIBS :=
  • LDARCHLIB := -L$(TARGET_ARCH_DIR) -l$(ARCH_LIB_NAME)
  1. ifeq ($(LILYVM),y)
  2. LDARCHLIB := -L$(TARGET_ARCH_DIR) -l$(ARCH_LIB_NAME) -llilyvm
  3. else
  4. LDARCHLIB := -L$(TARGET_ARCH_DIR) -l$(ARCH_LIB_NAME)
  5. endif
LDFLAGS_FINAL := -N -T $(TARGET_ARCH_DIR)/minios-$(TARGET_ARCH).lds

# Prefix for global API names. All other symbols are localised before
@@ -91,6 +96,9 @@
       $(MAKE) --directory=$(TARGET_ARCH_DIR) || exit 1;

$(TARGET): links $(OBJS) arch_lib
  1. ifeq ($(LILYVM),y)
  2. make -C lilyvm
  3. endif
       $(LD) -r $(LDFLAGS) $(HEAD_OBJ) $(OBJS) $(LDARCHLIB) -o $@.o
       $(OBJCOPY) -w -G $(GLOBAL_PREFIX)* -G _start $@.o $@.o
       $(LD) $(LDFLAGS) $(LDFLAGS_FINAL) $@.o $(EXTRA_OBJS) -o $@

ANTLR

startRule:
               {System.out.println("this is ,"+expr.getText());}
       ;

       public final void startRule() throws RecognitionException, TokenStreamException {


               try {      // for error handling
                       System.out.println("this is ,"+expr.getText());
               }
               catch (RecognitionException ex) {
                       reportError(ex);
                       recover(ex,_tokenSet_3);
               }
       }

ddとかのメモ

メモです。
ddして作ったファイルをコピーする時間を計測します。
for i in `seq 1 400`; do dd if=/dev/urandom of=1k.$i.dat bs=1K count=1; done
まず↑で1KiBのランダムな内容のファイルを1k.1.dat~1k.400.datまで作成します。
time for i in `seq 1 400`; do cp 1k.$i.dat 1k.$i.dat-copy; done
次に↑でcopyを行って、それをtimeコマンドで計測します。
timeコマンドについてはシェル組み込みのものと、そうでないものがあるので気をつけます。


memo

pcnet32.c:v1.32 18.Mar.2006 tsbogend@alpha.franken.de
PCI: Enabling device 0000:00:04.0 (0000 -> 0003)
ACPI: PCI Interrupt 0000:00:04.0[A] -> Link [LNKD] -> GSI 9 (level, low) -> IRQ 9
wrcount = 1 inw(49684)
wrcount = 2 outw(0,49682)
wrcount = 3 inw(49680)
wrcount = 4 outw(88,49682)
wrcount = 5 inw(49682)
wio
wrcount = 6 outw(88,49682)
wrcount = 7 inw(49680)
wrcount = 8 outw(89,49682)
wrcount = 9 inw(49680)
pcnet32: PCnet/PCI II 79C970A at 0xc200,wrcount = 10 outw(12,49682)
wrcount = 11 inw(49680)
wrcount = 12 outw(13,49682)
wrcount = 13 inw(49680)
wrcount = 14 outw(14,49682)
wrcount = 15 inw(49680)
52 54 00 12 34 57wrcount = 16 outw(20,49682)
wrcount = 17 outw(2,49686)
wrcount = 18 outw(1,49682)
wrcount = 19 outw(1,49682)
wrcount = 20 outw(53248,49680)
wrcount = 21 outw(2,49682)
wrcount = 22 outw(2,49682)
wrcount = 23 outw(1988,49680)
assigned IRQ 9.
wrcount = 24 inw(49682)
wrcount = 25 outw(112,49682)
wrcount = 26 inw(49680)
wrcount = 27 outw(2,49682)
eth0: registered as PCnet/PCI II 79C970A
wrcount = 28 outw(2,49682)
wrcount = 29 inw(49686)
wrcount = 30 outw(2,49682)
wrcount = 31 outw(4098,49686)
pcnet32: 1 cards_found.
wrcount = 32 inw(49682)
wrcount = 33 outw(112,49682)
wrcount = 34 inw(49680)
wrcount = 35 outw(2,49682)
wrcount = 36 outw(4,49682)
wrcount = 37 inw(49686)
wrcount = 38 inw(49682)
wrcount = 39 outw(112,49682)
:

memo[ 4] local 192.168.83.99 port 5001 connected with 192.168.83.214 port 59417

[ 4] 0.0-10.0 sec 49.9 MBytes 41.8 Mbits/sec
[ 5] local 192.168.83.99 port 5001 connected with 192.168.83.214 port 59418
[ 5] 0.0-10.0 sec 49.6 MBytes 41.4 Mbits/sec
[ 4] local 192.168.83.99 port 5001 connected with 192.168.83.214 port 42913
[ 4] 0.0-10.0 sec 50.3 MBytes 42.2 Mbits/sec
[ 5] local 192.168.83.99 port 5001 connected with 192.168.83.214 port 42914
[ 5] 0.0-10.0 sec 49.9 MBytes 41.8 Mbits/sec

memo

[ 4] 0.0-10.0 sec 67.1 MBytes 56.2 Mbits/sec
[ 5] local 192.168.83.152 port 5001 connected with 192.168.83.214 port 48021
[ 5] 0.0-10.1 sec 62.8 MBytes 52.2 Mbits/sec
[ 4] local 192.168.83.152 port 5001 connected with 192.168.83.214 port 48022
[ 4] 0.0-10.0 sec 62.7 MBytes 52.6 Mbits/sec
[ 5] local 192.168.83.152 port 5001 connected with 192.168.83.214 port 48023
[ 5] 0.0-10.1 sec 62.6 MBytes 51.8 Mbits/sec

[ 4] 0.0-10.0 sec 41.3 MBytes 34.6 Mbits/sec
[ 5] local 192.168.83.152 port 5001 connected with 192.168.83.214 port 55832
[ 5] 0.0-10.0 sec 41.5 MBytes 34.8 Mbits/sec
[ 4] local 192.168.83.152 port 5001 connected with 192.168.83.214 port 55833
[ 4] 0.0-10.0 sec 40.9 MBytes 34.3 Mbits/sec
[ 5] local 192.168.83.152 port 5001 connected with 192.168.83.214 port 55834
[ 5] 0.0-10.0 sec 41.4 MBytes 34.7 Mbits/sec

[ 4] local 192.168.83.152 port 5001 connected with 192.168.83.214 port 38692
[ 4] 0.0-10.0 sec 47.7 MBytes 40.0 Mbits/sec
[ 5] local 192.168.83.152 port 5001 connected with 192.168.83.214 port 38693
[ 5] 0.0-10.1 sec 47.8 MBytes 39.8 Mbits/sec
[ 4] local 192.168.83.152 port 5001 connected with 192.168.83.214 port 38694
[ 4] 0.0-10.1 sec 49.2 MBytes 40.9 Mbits/sec
[ 5] local 192.168.83.152 port 5001 connected with 192.168.83.214 port 38695
[ 5] 0.0-10.0 sec 48.7 MBytes 40.8 Mbits/sec

[ 4] local 192.168.83.152 port 5001 connected with 192.168.83.214 port 38696
[ 4] 0.0-10.1 sec 81.2 MBytes 67.7 Mbits/sec
[ 5] local 192.168.83.152 port 5001 connected with 192.168.83.214 port 38697
[ 5] 0.0-10.1 sec 77.5 MBytes 64.7 Mbits/sec
[ 4] local 192.168.83.152 port 5001 connected with 192.168.83.214 port 38698
[ 4] 0.0-10.0 sec 82.3 MBytes 69.1 Mbits/sec
[ 5] local 192.168.83.152 port 5001 connected with 192.168.83.214 port 38699
[ 5] 0.0-10.0 sec 77.5 MBytes 65.0 Mbits/sec


memo

[ 303.166694] ACPI: PCI Interrupt 0000:00:03.0[A] -> Link [LNKC] -> GSI 11 (level, high) -> IRQ 11
[ 303.166879] ACPI: PCI interrupt for device 0000:00:03.0 disabled


memo

yoshi@kvm-ubuntu:/sys/devices/pci0000:00$ ls
0000:00:00.0 0000:00:01.1 0000:00:02.0 power
0000:00:01.0 0000:00:01.3 0000:00:03.0 uevent

yoshi@kvm-ubuntu:/sys/devices/pci0000:00/0000:00:03.0$ ls
broken_parity_status device modalias resource0 subsystem_vendor
bus enable msi_bus resource1 uevent
class irq power subsystem vendor
config local_cpus resource subsystem_device

yoshi@kvm-ubuntu:/sys/devices/pci0000:00/0000:00:03.0$ cat vendor
0x1022


0x1022はAMDっぽ。
ツールボックス

下から選んでください:

新しいページを作成する
ヘルプ / FAQ もご覧ください。