- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我已经设置了一个使用 busybox 的小型嵌入式 linux。我面临一个问题,我不确定它是由 busybox 还是内核引起的。
问题是,init
进程没有进程 ID 1。这是 ps
的输出:
1 root 0:26 [swapper/0]
2 root 0:00 [kthreadd]
3 root 0:00 [ksoftirqd/0]
4 root 0:00 [kworker/0:0]
5 root 0:00 [kworker/0:0H]
6 root 0:00 [kworker/u4:0]
7 root 0:00 [rcu_preempt]
8 root 0:00 [rcu_sched]
...
549 root 0:00 {linuxrc} init
...
我猜init
之前的其他进程都是内核进程。这是一个问题的原因是孤立进程的父进程 ID 为 1,这应该是 init
进程,但现在这个 swapper
进程正在接收它们。
当我观察到很多僵尸进程时,我注意到出了点问题。
因此,要么必须将 init
强制为 PID 1,要么必须将孤立进程分配给正确的 init
PID。
有人知道怎么做吗?
非常感谢!
目标是带有 Xilinx Zynq 芯片的 ARM 板。我使用的是 Xilinx linux 内核,并自己编译了 busybox (v1.20.2)。
命令行是:
ramdisk_size=65536 console=ttyPS0,115200 earlyprintk
这是启动 init 脚本时的引导日志:
Uncompressing Linux... done, booting the kernel.
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 3.13.0-xilinx (cone@cone-ubuntu) (gcc version 4.8.1 (Sourcery CodeBench Lite 2013.11-53) ) #5 SMP PREEMPT Sun J4
[ 0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine model: Xilinx Zynq
[ 0.000000] bootconsole [earlycon0] enabled
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] PERCPU: Embedded 8 pages/cpu @c101e000 s10176 r8192 d14400 u32768
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
[ 0.000000] Kernel command line: ramdisk_size=65536 console=ttyPS0,115200 earlyprintk
[ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Memory: 501272K/524288K available (4781K kernel code, 307K rwdata, 1692K rodata, 197K init, 5345K bss, 23016K reserved, 0K hi)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] vmalloc : 0xe0800000 - 0xff000000 ( 488 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc065a600 (6474 kB)
[ 0.000000] .init : 0xc065b000 - 0xc068c7c0 ( 198 kB)
[ 0.000000] .data : 0xc068e000 - 0xc06dac78 ( 308 kB)
[ 0.000000] .bss : 0xc06dac84 - 0xc0c13230 (5346 kB)
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] RCU lockdep checking is enabled.
[ 0.000000] Dump stacks of tasks blocking RCU-preempt GP.
[ 0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[ 0.000000] NR_IRQS:16 nr_irqs:16 16
[ 0.000000] ps7-slcr mapped to e0802000
[ 0.000000] zynq_clock_init: clkc starts at e0802100
[ 0.000000] Zynq clock init
[ 0.000000] sched_clock: 32 bits at 325MHz, resolution 3ns, wraps every 13215283196ns
[ 0.000000] ps7-ttc #0 at e0804000, irq=43
[ 0.000000] Console: colour dummy device 80x30
[ 0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[ 0.000000] ... MAX_LOCKDEP_SUBCLASSES: 8
[ 0.000000] ... MAX_LOCK_DEPTH: 48
[ 0.000000] ... MAX_LOCKDEP_KEYS: 8191
[ 0.000000] ... CLASSHASH_SIZE: 4096
[ 0.000000] ... MAX_LOCKDEP_ENTRIES: 16384
[ 0.000000] ... MAX_LOCKDEP_CHAINS: 32768
[ 0.000000] ... CHAINHASH_SIZE: 16384
[ 0.000000] memory used by lock dependency info: 3695 kB
[ 0.000000] per task-struct memory footprint: 1152 bytes
[ 13.207599] Calibrating delay loop... 1292.69 BogoMIPS (lpj=6463488)
[ 13.207606] pid_max: default: 32768 minimum: 301
[ 13.207607] Mount-cache hash table entries: 512
[ 13.207609] CPU: Testing write buffer coherency: ok
[ 13.207610] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 13.207611] Setting up static identity map for 0x489b98 - 0x489bf0
[ 13.207612] L310 cache controller enabled
[ 13.207613] l2x0: 8 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x72760000, Cache size: 512 kB
[ 13.207627] CPU1: Booted secondary processor
[ 13.207641] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[ 13.207642] Brought up 2 CPUs
[ 13.207644] SMP: Total of 2 processors activated.
[ 13.207644] CPU: All CPU(s) started in SVC mode.
[ 13.207646] devtmpfs: initialized
[ 13.207647] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[ 13.207650] regulator-dummy: no parameters
[ 13.207651] NET: Registered protocol family 16
[ 13.207651] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 13.207654] cpuidle: using governor ladder
[ 13.207654] cpuidle: using governor menu
[ 13.207658] syscon f8000000.ps7-slcr: regmap [mem 0xf8000000-0xf8000fff] registered
[ 13.207660] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[ 13.207662] hw-breakpoint: maximum watchpoint size is 4 bytes.
[ 13.207663] zynq-ocm f800c000.ps7-ocmc: ZYNQ OCM pool: 256 KiB @ 0xe0880000
[ 13.207672] bio: create slab <bio-0> at 0
[ 13.207674] vgaarb: loaded
[ 13.207674] SCSI subsystem initialized
[ 13.207675] usbcore: registered new interface driver usbfs
[ 13.207676] usbcore: registered new interface driver hub
[ 13.207677] usbcore: registered new device driver usb
[ 13.207678] media: Linux media interface: v0.10
[ 13.207679] Linux video capture interface: v2.00
[ 13.207680] pps_core: LinuxPPS API ver. 1 registered
[ 13.207681] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 13.207682] PTP clock support registered
[ 13.207683] EDAC MC: Ver: 3.0.0
[ 13.207685] DMA-API: preallocated 4096 debug entries
[ 13.207686] DMA-API: debugging enabled by kernel config
[ 13.207687] Switched to clocksource arm_global_timer
[ 13.207696] NET: Registered protocol family 2
[ 13.207697] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[ 13.207698] TCP bind hash table entries: 4096 (order: 5, 147456 bytes)
[ 13.207699] TCP: Hash tables configured (established 4096 bind 4096)
[ 13.207700] TCP: reno registered
[ 13.207701] UDP hash table entries: 256 (order: 2, 20480 bytes)
[ 13.207702] UDP-Lite hash table entries: 256 (order: 2, 20480 bytes)
[ 13.207703] NET: Registered protocol family 1
[ 13.207704] RPC: Registered named UNIX socket transport module.
[ 13.207705] RPC: Registered udp transport module.
[ 13.207706] RPC: Registered tcp transport module.
[ 13.207707] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 13.207708] Trying to unpack rootfs image as initramfs...
[ 13.207709] rootfs image is not initramfs (no cpio magic); looks like an initrd
[ 13.207717] Freeing initrd memory: 6004K (df551000 - dfb2e000)
[ 13.207718] hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available
[ 13.207722] jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
[ 13.207723] msgmni has been set to 990
[ 13.207724] io scheduler noop registered
[ 13.207724] io scheduler deadline registered
[ 13.207725] io scheduler cfq registered (default)
[ 13.207728] dma-pl330 f8003000.ps7-dma: unable to set the seg size
[ 13.207729] dma-pl330 f8003000.ps7-dma: Loaded driver for PL330 DMAC-2364208
[ 13.207731] dma-pl330 f8003000.ps7-dma: DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
[ 13.207733] e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 82, base_baud = 3125000) is a xuartps
[ 13.207734] console [ttyPS0] enabled
[ 13.207734] console [ttyPS0] enabled
[ 13.207735] bootconsole [earlycon0] disabled
[ 13.207735] bootconsole [earlycon0] disabled
[ 13.207737] xdevcfg f8007000.ps7-dev-cfg: ioremap 0xf8007000 to e0866000
[ 13.207743] brd: module loaded
[ 13.207746] loop: module loaded
[ 13.207748] zynq-qspi e000d000.ps7-qspi: master is unqueued, this is deprecated
[ 13.207749] zynq-qspi e000d000.ps7-qspi: at 0xE000D000 mapped to 0xE0868000, irq=51
[ 13.207752] e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k
[ 13.207753] e1000e: Copyright(c) 1999 - 2013 Intel Corporation.
[ 13.207754] libphy: XEMACPS mii bus: probed
[ 13.207755] xemacps e000b000.ps7-ethernet: pdev->id -1, baseaddr 0xe000b000, irq 54
[ 13.207757] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 13.207758] ehci-pci: EHCI PCI platform driver
[ 13.207759] ULPI transceiver vendor/product ID 0x0424/0x0007
[ 13.207760] Found SMSC USB3320 ULPI transceiver.
[ 13.207761] ULPI integrity check: passed.
[ 13.207761] zynq-ehci zynq-ehci.0: Xilinx Zynq USB EHCI Host Controller
[ 13.207763] zynq-ehci zynq-ehci.0: new USB bus registered, assigned bus number 1
[ 13.207769] zynq-ehci zynq-ehci.0: irq 53, io mem 0x00000000
[ 13.207772] zynq-ehci zynq-ehci.0: USB 2.0 started, EHCI 1.00
[ 13.207773] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 13.207774] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 13.207775] usb usb1: Product: Xilinx Zynq USB EHCI Host Controller
[ 13.207776] usb usb1: Manufacturer: Linux 3.13.0-xilinx ehci_hcd
[ 13.207777] usb usb1: SerialNumber: zynq-ehci.0
[ 13.207779] hub 1-0:1.0: USB hub found
[ 13.207779] hub 1-0:1.0: 1 port detected
[ 13.207781] usbcore: registered new interface driver usb-storage
[ 13.207782] mousedev: PS/2 mouse device common for all mice
[ 13.207783] i2c /dev entries driver
[ 13.207784] cdns-i2c e0004000.ps7-i2c: 400 kHz mmio e0004000 irq 57
[ 13.207787] xadcps f8007100.ps7-xadc: enabled: yes reference: external
[ 13.207788] cdns-wdt f8005000.ps7-wdt: Xilinx Watchdog Timer at e0876000 with timeout 10s
[ 13.207790] zynq-edac f8006000.ps7-ddrc: ecc not enabled
[ 13.207791] Xilinx Zynq CpuIdle Driver started
[ 13.207590] sdhci: Secure Digital Host Controller Interface driver
[ 13.207591] sdhci: Copyright(c) Pierre Ossman
[ 13.207592] sdhci-pltfm: SDHCI platform and OF driver helper
[ 13.207593] sdhci-arasan e0100000.ps7-sdio: dummy supplies not allowed
[ 13.207594] mmc0: no vqmmc regulator found
[ 13.207595] sdhci-arasan e0100000.ps7-sdio: dummy supplies not allowed
[ 13.207596] mmc0: no vmmc regulator found
[ 13.207603] mmc0: SDHCI controller on e0100000.ps7-sdio [e0100000.ps7-sdio] using ADMA
[ 13.207608] usbcore: registered new interface driver usbhid
[ 13.207608] usbhid: USB HID core driver
[ 13.207609] TCP: cubic registered
[ 13.207610] NET: Registered protocol family 17
[ 13.207611] Registering SWP/SWPB emulation handler
[ 13.207612] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[ 13.207614] mmc0: new high speed SDHC card at address 59b4
[ 13.207615] mmcblk0: mmc0:59b4 USD 14.7 GiB
[ 13.207617] mmcblk0: p1 p2
[ 13.207618] RAMDISK: gzip image found at block 0
[ 13.207691] usb 1-1: new high-speed USB device number 2 using zynq-ehci
[ 13.207707] VFS: Mounted root (ext2 filesystem) on device 1:0.
Starting rcS...
@sawdust:我没有/init
文件。我认为 /linuxrc
是第一个被执行的东西,它只是一个指向 busybox 的符号链接(symbolic link)。
最佳答案
我想我解决了这个问题。显然,将 root=/dev/ram
添加到引导参数中就可以了。我在网上看到有人推荐,但我找不到链接了。我不完全确定为什么这是必要的,但它有效:-)
关于linux - busybox 初始化进程的 PID 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24791787/
manpage of reboot()说 Behavior inside PID namespaces Since Linux 3.4, if reboot() is called from a PI
我今天第一次在 Nvidia jetson Xavier 中安装和配置并使用了电视, 但重启后我遇到了这个问题: teamviewerd.service: 启动后无法打开 PID 文件/var/run
我在我的服务器上安装了 hhvm,在我重新启动服务器之前它一直运行良好。在 hhvm 的日志中,我看到了这个错误: Unable to read pid file /var/run/hhvm/pid
我正在尝试为我的应用程序精简,但随后无法生成 pid: $ thin -C /var/www/project_path/current/config/myproject.testing.yml sta
我正在从我的私有(private) git 存储库安装应用程序。我安装了所有依赖项并且我正在使用 Capistrano。我能够在我的本地计算机上成功运行应用程序。我正在使用 rails -v 3.2.
我已按照 DigitalOcean 指南中的步骤进行操作 here和 here使用 nginx 和 Unicorn 设置 Sinatra 服务器。我在倒数第二步: start the Unicorn
我在 C 程序中连续进行了 3 个 fork 。 1.它会以相同的顺序执行吗? (我的猜测是肯定的)。 2. 如果我做 pgrep myexecutable从 shell 中,它会按照启动的顺序给出进
我尝试通过FT_Prog更改FTDI芯片(R232R)中的PID。它可以工作,但之后我发现 Windows 7 自动重新安装 USB 设备的驱动程序,而不是 FTDI 设备。所以我想将PID改回默认值
第一次在这里发表 简单情况:在 PUTTY 中,我必须创建一个名为 admin.pid 的文件,当用户启动我正在创建的“应用程序”时,它会在其中存储 PID。我怎样才能做到这一点?谢谢 最佳答案 使用
我设法为每个单独的进程输出正确的进程 ID 顺序,但我的问题是我无法显示子进程的 PID。 我的程序能够打印 parent 的 PID 和孙子的 PID。我确实看到了 child 的 PID,但它显示
我正在从事一个项目,其中有许多 PID,我必须找出其中哪些是僵尸进程,然后终止它们的父进程以终止初始僵尸进程。我不确定是否有任何方法可以找出给定 PID 的 PPID 是什么。任何帮助将不胜感激。 最
我正在使用 htop,所以看看哪些进程占用了大量内存,以便我可以杀死它们。我有很多 tmux session 和很多类似的过程。如何检查 PID 所在的 tmux Pane ,以便确定我正在杀死我想杀
我正在通过运行跟踪应用程序: strace -f -y -qq -z -etrace=execve,... -o app.trace ./app 有没有办法确定哪个进程产生了哪个 child_proc
在我使用 exec 之后docker 容器内的命令我可以使用 exec inspect 获取 PID .问题是这个 ID 不是容器本地的,而是系统 PID。所以我会得到类似 22620 的东西,而 d
我有一个我开发的用于启动 Java 程序的 System V 初始化脚本。由于某种原因,无论何时创建 PID 文件,它都包含多个 PID 而不是一个。 下面是启动服务并写入PID文件的相关代码: da
我有一个变量 pidfile,它存储进程的 PID。 如何使用 Ruby 以编程方式终止 pidfile 中的 pid,假设我只知道文件名,而不是其中的实际 PID。 最佳答案 Process.kil
我读入了Beej's fork() primer当我调用 pid = fork(); 时,父进程获取子进程的 pid,而在子进程内部 pid = 0。 现在,由于子进程开始执行 在 fork() 语句
我正在尝试从另一个 Python 脚本运行一个 Python 脚本,并获取它的 pid 以便稍后可以终止它。 我尝试使用参数 shell=True' 的 subprocess.Popen(),但是pi
我有一个用 Cygwin 生成的进程shell 脚本,我无法用 kill 杀死它命令。即使与 Cygwin kill与 -f选项,我收到此消息: kill: couldn't open pid 123
我尝试在我的模型中为阀门构建一个 PID Controller ,我计划进行一些过程识别,获得系统对阶跃脉冲的响应和系统的传递函数,然后我可以设计 PID Controller 。但我不确定是否有用于
我是一名优秀的程序员,十分优秀!