我在一台旧 PC 上安装了 FreeBSD 11.1 32 位,Asus eeePC 900 用于测试目的。
该机器工作得很好,只是它在关闭时挂起,无论是使用 shutdown -r 还是halt。奇怪的是,如果我按随机键,它就会继续,所以我怀疑这是缺乏熵的问题。
关闭时,它说:
Stopping devd
Writing entropy file: .
Writing early boot: .
Terminated
. Aug 6 16:08:55 xxxxx syslogd: exiting on signal 15
通常它会在这里停止,有时几秒钟后它会继续。我经常要在这里按shift。
然后它继续并显示:
Waiting (max 60 seconds) for system process vnlru to stop... done
Waiting (max 60 seconds) for system process bufdaemon to stop...
(除非我按下某个键,否则会永远挂在这里)。然后也继续
Waiting (max 60 seconds) for system process syncer to stop...
Syncing disks, vnodes remaining... 3 1
我也经常锁在这里......当我按下按键时,它就会继续并完成重新启动。
(关于暂停,我已经等待了超过 5-10 分钟的暂停......)
我已经安装了 hs-entropy,没有明显的变化。 (它到底有什么作用吗?)我还能做什么?
机器本身的负载并不大;它正在运行 Apache、两个用于路由测试的 wifi 卡、ipfw、apache、hostapd、unbound、dnsmasq、ntpd、sshd。
vmstat 输出
procs memory page disks faults cpu
r b w avm fre flt re pi po fr sr ad0 da0 in sy cs us sy id
0 0 0 195M 405M 1225 0 13 0 1485 5 0 0 321 10138 2221 8 17 74
正常运行时间
$ uptime
4:57PM up 3 mins, 1 users, load averages: 0.97, 0.70, 0.33
消息
# dmesg
Copyright (c) 1992-2017 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 04:10:47 UTC 2017
[email protected]:/usr/obj/usr/src/sys/GENERIC i386
FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0)
VT(vga): resolution 640x480
CPU: Intel(R) Celeron(R) M processor 900MHz (630.08-MHz 686-class CPU)
Origin="GenuineIntel" Id=0x6d8 Family=0x6 Model=0xd Stepping=8
Features=0xafe9fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,TM,PBE>
AMD Features=0x100000<NX>
real memory = 536870912 (512 MB)
avail memory = 485584896 (463 MB)
Event timer "LAPIC" quality 100
ACPI APIC Table: <A M I OEMAPIC >
random: unblocking device.
ioapic0 <Version 2.0> irqs 0-23 on motherboard
Timecounter "TSC" frequency 630080304 Hz quality 800
taskqgroup_adjust failed cnt: 1 stride: 1 mp_ncpus: 1 smp_started: 0
taskqgroup_adjust failed cnt: 1 stride: 1 mp_ncpus: 1 smp_started: 0
random: entropy device external interface
kbd1 at kbdmux0
module_register_init: MOD_LOAD (vesa, 0xc10123d0, 0) error 19
nexus0
vtvga0: <VT VGA driver> on motherboard
cryptosoft0: <software crypto> on motherboard
acpi0: <A M I OEMRSDT> on motherboard
acpi0: Power Button (fixed)
cpu0: <ACPI CPU> on acpi0
attimer0: <AT timer> port 0x40-0x43 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
atrtc0: <AT realtime clock> port 0x70-0x71 irq 8 on acpi0
Event timer "RTC" frequency 32768 Hz quality 0
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
acpi_ec0: <Embedded Controller: GPE 0x18> port 0x62,0x66 on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
vgapci0: <VGA-compatible display> port 0xec00-0xec07 mem 0xf7f00000-0xf7f7ffff,0xd0000000-0xdfffffff,0xf7ec0000-0xf7efffff irq 16 at device 2.0 on pci0
agp0: <Intel 82915GM (915GM GMCH) SVGA controller> on vgapci0
agp0: aperture size is 256M, detected 7932k stolen memory
vgapci0: Boot video device
vgapci1: <VGA-compatible display> mem 0xf7f80000-0xf7ffffff at device 2.1 on pci0
hdac0: <Intel 82801F HDA Controller> mem 0xf7eb8000-0xf7ebbfff irq 16 at device 27.0 on pci0
pcib1: <ACPI PCI-PCI bridge> irq 16 at device 28.0 on pci0
pci1: <ACPI PCI bus> on pcib1
pcib2: <ACPI PCI-PCI bridge> irq 17 at device 28.1 on pci0
pci2: <ACPI PCI bus> on pcib2
ae0: <Attansic Technology Corp, L2 FastEthernet> mem 0xfbfc0000-0xfbffffff irq 17 at device 0.0 on pci2
ae0: Using MSI messages.
miibus0: <MII bus> on ae0
atphy0: <Atheros F2 10/100 PHY> PHY 0 on miibus0
atphy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
ae0: Ethernet address: 00:22:15:30:0b:54
pcib3: <ACPI PCI-PCI bridge> irq 18 at device 28.2 on pci0
pci3: <ACPI PCI bus> on pcib3
ath0: <Atheros 5424/2424> mem 0xfbef0000-0xfbefffff irq 18 at device 0.0 on pci3
ath0: AR2425 mac 14.2 RF5424 phy 7.0
ath0: 2GHz radio: 0x0000; 5GHz radio: 0x00a2
uhci0: <Intel 82801FB/FR/FW/FRW (ICH6) USB controller USB-A> port 0xe400-0xe41f irq 23 at device 29.0 on pci0
uhci0: LegSup = 0x2f00
usbus0 on uhci0
uhci1: <Intel 82801FB/FR/FW/FRW (ICH6) USB controller USB-B> port 0xe480-0xe49f irq 19 at device 29.1 on pci0
uhci1: LegSup = 0x2f00
usbus1 on uhci1
uhci2: <Intel 82801FB/FR/FW/FRW (ICH6) USB controller USB-C> port 0xe800-0xe81f irq 18 at device 29.2 on pci0
uhci2: LegSup = 0x2f00
usbus2 on uhci2
uhci3: <Intel 82801FB/FR/FW/FRW (ICH6) USB controller USB-D> port 0xe880-0xe89f irq 16 at device 29.3 on pci0
uhci3: LegSup = 0x2f00
usbus3 on uhci3
ehci0: <Intel 82801FB (ICH6) USB 2.0 controller> mem 0xf7eb7c00-0xf7eb7fff irq 23 at device 29.7 on pci0
usbus4: EHCI version 1.0
usbus4 on ehci0
pcib4: <ACPI PCI-PCI bridge> at device 30.0 on pci0
pci4: <ACPI PCI bus> on pcib4
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel ICH6M SATA150 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xffa0-0xffaf at device 31.2 on pci0
ata0: <ATA channel> at channel 0 on atapci0
ata1: <ATA channel> at channel 1 on atapci0
acpi_lid0: <Control Method Lid Switch> on acpi0
acpi_button0: <Sleep Button> on acpi0
acpi_button1: <Power Button> on acpi0
acpi_tz0: <Thermal Zone> on acpi0
battery0: <ACPI Control Method Battery> on acpi0
acpi_acad0: <AC Adapter> on acpi0
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: model Generic PS/2 mouse, device ID 0
pmtimer0 on isa0
orm0: <ISA Option ROM> at iomem 0xc0000-0xcf7ff pnpid ORM0000 on isa0
ppc0: parallel port not found.
Timecounters tick every 1.000 msec
nvme cam probe device init
usbus0: 12Mbps Full Speed USB v1.0
usbus1: 12Mbps Full Speed USB v1.0
hdacc0: <Realtek ALC662 HDA CODEC> at cad 0 on hdac0
hdaa0: <Realtek ALC662 Audio Function Group> at nid 1 on hdacc0
pcm0: <Realtek ALC662 (Analog 2.0+HP/2.0)> at nid 20,27 and 24,25 on hdaa0
ugen0.1: <Intel UHCI root HUB> at usbus0
uhub0: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
ugen1.1: <Intel UHCI root HUB> at usbus1
uhub1: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1
usbus2: 12Mbps Full Speed USB v1.0
usbus3: 12Mbps Full Speed USB v1.0
ugen2.1: <Intel UHCI root HUB> at usbus2
uhub2: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus2
ugen3.1: <Intel UHCI root HUB> at usbus3
uhub3: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus3
usbus4: 480Mbps High Speed USB v2.0
ugen4.1: <Intel EHCI root HUB> at usbus4
uhub4: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus4
uhub0: 2 ports with 2 removable, self powered
uhub1: 2 ports with 2 removable, self powered
uhub2: 2 ports with 2 removable, self powered
uhub3: 2 ports with 2 removable, self powered
ada0 at ata1 bus 0 scbus1 target 0 lun 0
ada0: <SILICONMOTION SM223AC > ATA-4 device
ada0: Serial Number 56423912022817071094
ada0: 66.700MB/s transfers (UDMA4, PIO 512bytes)
ada0: 3815MB (7815024 512 byte sectors)
Trying to mount root from ufs:/dev/ada0s1a [rw]...
wlan0: Ethernet address: 00:15:af:c6:9e:9b
uhub4: 8 ports with 8 removable, self powered
ugen4.2: <Ralink 802.11 n WLAN> at usbus4
ugen4.3: <ENE UB6225> at usbus4
umass0 on uhub4
umass0: <ENE UB6225, class 0/0, rev 2.00/1.00, addr 3> on usbus4
umass0: SCSI over Bulk-Only; quirks = 0xc100
umass0:2:0: Attached to scbus2
da0 at umass-sim0 bus 0 scbus2 target 0 lun 0
da0: <USB2.0 CardReader SD0 0100> Removable Direct Access SCSI device
da0: Serial Number 146030377350
da0: 40.000MB/s transfers
da0: 1876MB (3842048 512 byte sectors)
da0: quirks=0x2<NO_6_BYTE>
wlan0: link state changed to UP
ae0: link state changed to DOWN
run0 on uhub4
run0: <1.0> on usbus4
run0: MAC/BBP RT5592 (rev 0x0222), RF RT5592 (MIMO 2T2R), address 7c:dd:90:a5:f5:1a
wlan1: Ethernet address: 7c:dd:90:a5:f5:1a
run0: firmware RT3071 ver. 0.33 loaded
wlan1: ieee80211_new_state_locked: pending INIT -> SCAN transition lost
ipfw2 (+ipv6) initialized, divert loadable, nat loadable, default to deny, logging disabled
run0: firmware RT3071 ver. 0.33 loaded
斧头
# ps ax
PID TT STAT TIME COMMAND
0 - DLs 0:00.41 [kernel]
1 - ILs 0:00.01 /sbin/init --
2 - DL 0:00.00 [crypto]
3 - DL 0:00.00 [crypto returns]
4 - DL 0:00.04 [cam]
5 - DL 0:00.00 [sctp_iterator]
6 - DL 0:00.01 [rand_harvestq]
7 - DL 0:00.00 [soaiod1]
8 - DL 0:00.00 [soaiod2]
9 - DL 0:00.00 [soaiod3]
10 - DL 0:00.00 [audit]
11 - RL 0:37.74 [idle]
12 - WL 0:01.07 [intr]
13 - DL 0:00.03 [geom]
14 - DL 0:00.22 [usb]
15 - DL 0:00.01 [acpi_thermal]
16 - DL 0:00.00 [soaiod4]
17 - DL 0:00.00 [pagedaemon]
18 - DL 0:00.00 [vmdaemon]
19 - DL 0:00.00 [pagezero]
20 - DL 0:00.01 [bufdaemon]
21 - DL 0:00.00 [bufspacedaemon]
22 - DL 0:00.01 [syncer]
23 - DL 0:00.00 [vnlru]
121 - Is 0:00.00 adjkerntz -i
301 - Ss 0:00.01 /usr/sbin/wpa_supplicant -s -B -i wlan0 -c /etc/wpa_suppli
445 - Is 0:00.00 dhclient: wlan0 [priv] (dhclient)
491 - Is 0:00.00 dhclient: wlan0 (dhclient)
576 - Is 0:00.00 /sbin/devd
642 - Is 0:00.00 /sbin/natd -dynamic -n wlan0
756 - Ss 0:00.03 /usr/sbin/syslogd -s
775 - Is 0:00.08 /usr/local/sbin/unbound
780 - I 0:00.01 /usr/local/sbin/dnsmasq -x /var/run/dnsmasq.pid -C /usr/lo
879 - Is 0:00.01 /usr/sbin/sshd
884 - Ss 0:00.02 /usr/local/sbin/httpd -DNOHTTPACCEPT
891 - I 0:00.00 /usr/local/sbin/httpd -DNOHTTPACCEPT
892 - S 0:00.00 /usr/local/sbin/httpd -DNOHTTPACCEPT
893 - I 0:00.00 /usr/local/sbin/httpd -DNOHTTPACCEPT
894 - I 0:00.00 /usr/local/sbin/httpd -DNOHTTPACCEPT
895 - I 0:00.00 /usr/local/sbin/httpd -DNOHTTPACCEPT
906 - Ss 0:00.01 /usr/sbin/cron -s
939 - Ss 0:00.00 /usr/sbin/hostapd -P /var/run/hostapd.pid -B /etc/hostapd.
970 - Is 0:00.08 sshd: rui [priv] (sshd)
973 - S 0:00.04 sshd: rui@pts/0 (sshd)
955 v0- I 0:00.00 sh /etc/rc autoboot
956 v0- I 0:00.00 logger -p daemon.notice -t fsck
958 v0- I 0:00.00 sleep 60
962 v0 Is+ 0:00.01 /usr/libexec/getty Pc ttyv0
963 v1 Is+ 0:00.01 /usr/libexec/getty Pc ttyv1
964 v2 Is+ 0:00.01 /usr/libexec/getty Pc ttyv2
965 v3 Is+ 0:00.01 /usr/libexec/getty Pc ttyv3
966 v4 Is+ 0:00.01 /usr/libexec/getty Pc ttyv4
967 v5 Is+ 0:00.01 /usr/libexec/getty Pc ttyv5
968 v6 Is+ 0:00.01 /usr/libexec/getty Pc ttyv6
969 v7 Is+ 0:00.01 /usr/libexec/getty Pc ttyv7
974 0 Is 0:00.02 -sh (sh)
976 0 I 0:00.08 su
977 0 S 0:00.04 _su (csh)
984 0 R+ 0:00.01 ps ax