date int64 1,220B 1,719B | question_description stringlengths 28 29.9k | accepted_answer stringlengths 12 26.4k | question_title stringlengths 14 159 |
|---|---|---|---|
1,445,774,632,000 |
I am a student working on a moon rover for CMU and need to work with a TUN interface communication between two devices on the rover. I can create a TUN interface, but am unable to assign its IP addresses in C.
Here is the current state right after making the TUN device:
41: tun11: <POINTOPOINT,MULTICAST,NOARP> mtu 150... |
If you haven't got one already, create a test tun:
# ip tuntap add mode tun dev tun0
# ip address show dev tun0
5: tun0: <POINTOPOINT,MULTICAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 500
link/none
This looks pretty similar to what's in the question. Now to see what code we need...
// uptun.c - s... | How to set the IP address and Peer IP Address of a TUN interface in C |
1,445,774,632,000 |
Today I ran into some code that's writing a newline character explicitly into a sysctl file. See moby/docker source code. My first thought is that the author has diligently copied the shell's behaviour into go despite the newline being redundant.
But then I started to look for documentation on the subject and found ... |
In most cases it shouldn’t make any difference either way, at least at the end of an input string. In all cases, only written data is processed — the kernel knows how long the supplied buffer is (1 byte for 1 with no newline, 2 for 1 with a newline) and will only process that many bytes.
sysctl entries using the stand... | Does writing a newline character into a sysctl (/proc/sys) file have any effect? |
1,445,774,632,000 |
I'm writing an article about swapfiles. I decided to check how many swapfiles can I create and use. According to man 2 swapon, I know that it should be 29 - https://man7.org/linux/man-pages/man2/swapon.2.html. I checked my kernel configuration options with grep CONFIG_MIGRATION /boot/config-$(uname -r) and grep CONFIG... |
Absolutely nothing wrong with the docs.
Your misunderstanding simply comes from the fact you are basing your calculus on definitions found in swap.h taken from Linus' git, that is the swap.h related to the master branch, in other words, nowadays ahead of 5.17-rc-1
While making your experiments under RHEL 8 which, AFAI... | Maximum number of swapfiles - kernel documentation bug? |
1,445,774,632,000 |
From my understanding, in systems without bus support for discovery/enumeration (mostly embedded systems), the dtb files are used to describe the hardware and allow the kernel to use it once it has been loaded into to memory.
So, assuming we just want to update the kernel for such a system, do we need to also update t... |
Mainly, kernel and device tree are supposed to be independent from each other, so yes: Usually you can use a freshly compiled kernel along with the old dtb and vice versa.
Of course, this stops being true if the device tree relies on certain versions of device drivers or the new kernel expects different device tree a... | with a static hardware, do I need to recompile the dtb every time I update the kernel? |
1,445,774,632,000 |
I need to install the linux-header-* package for other kernel versions in order to compile a kernel module locally for a different system.
Say, I want to compile for Debian 10, with a kernel version of 4.19.0-13-amd64, using Ubuntu 20.10, with a kernel version of 5.8.0-43-generic.
In that case, is it possible to insta... |
You can't install the debian linux-headers on Ubuntu but you can download the source:
Add only the debian sources , it doesn't harm ubuntu:
printf "%s\n" "deb-src http://deb.debian.org/debian buster main" |\
sudo tee /etc/apt/sources.list.d/debian-src.list
Add the gpg keys:
sudo apt-key adv --recv-keys --keyserver ke... | How to obtain linux-headers-* for other kernel versions than the most current using `apt-get`? |
1,603,138,374,000 |
I'm not extremely familiar with systems programming or operating systems, so this is probably a stupid question. But I was trying to get a game running in Wine recently that implements an anti-cheat system. After much frustration I learned that it wasn't possible because the anti-cheat system needs to run in kernel mo... |
x86 ring 0 = supervisor mode = kernel mode
x86 ring 3 = user mode
Docker containers and the docker daemon run in user mode. The containers share the kernel with the host system. Docker uses new features in the kernel, in the same way that other programs use old features in the kernel.
If you run code in supervisor m... | Why can't Wine run kernel-mode (ring 0) drivers in a container? |
1,603,138,374,000 |
I want to reserve a large amount (~1 gigabyte) of contiguous memory for DMA from a device. The entire purpose of this particular Linux box is to run a single application which uses the device. The device does large transfers of ~10-200MB per operation.
To be clear, put up this question for the next guy. Expect to have... |
I don't think you'll be able to. Instead, you'll have to "fake it" as described here.
The last time I checked (it's been a while), the CMA hadn't been ported to x86 from ARM yet. Even then, that big a buffer is unlikely to work out for you.
| How do I reserve a large block of memory from the Linux kernel for device/DMA use? |
1,603,138,374,000 |
I am digging into calculation of LA. So, what have I found:
LA calculates as exponential moving average every five seconds:
LA(t) = LA(t-1) + EXP_R * (n(t) - LA(t-1))
where
LA(t-1) - is the LA recorded on the previous iteration
EXP_R - are three predefined constants for 1, 5, and 15 minutes
n(t) - number of R (run... |
Thank to @muru, he has found error in the formula I use. Here is the correct one and the results are pretty accurate:
#!/usr/bin/env bash
set -euo pipefail
LA_1=0
LA_5=0
LA_15=0
EXP_1=0.9200
EXP_5=0.9835
EXP_15=0.9945
count() {
echo $(ps -eostat | grep -E "R|D" | wc -l)
}
echo "1 min 5 min 15... | Reproduce load average calculation |
1,603,138,374,000 |
The KDE Neon FAQ mentions it's build on Ubuntu LTS 18.04. It doesn't mention which point release of Ubuntu LTS it's using.
I would like to try out KDE Neon, but I know my laptop doesn't work well (or at all) on kernel versions before 4.19. Default LTS comes with kernel 4.5 and is not an option. According to the Ubuntu... |
You can get the requisite information by visiting https://files.kde.org/neon/images/user/current/.
In particular, https://files.kde.org/neon/images/user/current/neon-user-20200213-1120.manifest has
linux-generic-hwe-18.04 5.3.0.28.96
linux-headers-5.3.0-28 5.3.0-28.30~18.04.1
linux-headers-5.3.0-28-generic 5.3.0-28.... | Does KDE Neon use Ubunu LTS point releases? |
1,603,138,374,000 |
I know KConfig serves to tune the C preprocessor, at the start of the Linux kernel compilation. And that the device tree is used to give a compiled kernel a description about hardware at runtime.
How do these two configurability features overlap?
Both give information about intrinsic CPU details and drivers for extern... |
A compile-time kernel configuration can specify whether or not include each of the standard drivers included in the kernel source tree, how those drivers will be included (as built-in or as loadable modules), and a number of other parameters related to e.g. what kind of optimizations and other choices will be used in ... | How does kbuild compare to the device tree? |
1,603,138,374,000 |
I have Samsung SSD 970 EVO Plus NVMe M.2 500GB mounted on the motherboard and it works fine, but when I open for example gnome-disks or parted to get more info about disk, system doesn't recognise model of the disk. SMART data & Self-Tests are also disabled.
This only happens on the M.2 disk. Normal SSD works fine.
I... |
I just noticed that in the newer version of gnome-disks the model is already displayed correctly.
| System doesn't recognise model of my SSD disk |
1,603,138,374,000 |
It is possible to install Devuan/Debian stable and then editing /etc/apt/sources.list upgrade to a testing/unstable branch (ref).
However on my laptop I have an AMD Ryzen 7 2700U processor, which does not support Linux kernels before 4.10, so I just cannot install the stable versions (kernel 4.9) to start from.
Where ... |
# /etc/apt/sources.list.d/devuan-ceres.list
deb http://deb.devuan.org/merged ceres main
deb-src http://deb.devuan.org/merged ceres main
| How to install Devuan/Debian testing/unstable without starting from a stable release? |
1,603,138,374,000 |
I am not a driver programmer, I don't have a clear picture of how linux assign irq number for pcie devices.
From an NIC driver example, it seems Linux already know which irq number should be used before the function of 'probe' or 'open' was executed.
ex: https://github.com/torvalds/linux/blob/4608f064532c28c0ea3c03fe2... |
for legacy interrupt, the irq value was read from the configuration space, however, the irq value was mostly assigned by BIOS.
more info for this part:
http://tldp.org/HOWTO/Plug-and-Play-HOWTO-7.html
For MSI/MSI-X interrupt, it is done by allocation.
ex:
pci_alloc_irq_vectors()
https://www.kernel.org/doc/Documentatio... | How linux know which irq number should be used? |
1,603,138,374,000 |
I've experienced a few kernel page fault (fatal trap 12) on my FreeBSD 10.3-RELEASE server. They occur anywhere from milliseconds of uptime to days of uptime. The current process is always different (pagedaemon, pkg, find).
After reading online, the answer seems to point towards failing hardware. My question is how ex... |
A kernel panic is either a software detected error, or some hardware trap that has been sprung and detected by the kernel as being in kernel code. The only safe thing for the kernel to do is panic (i.e. voluntarily halt). This could be caused by bad memory, which causes the kernel to execute bad memory contents as cod... | How does failing hardware cause a kernel page fault (fatal trap 12)? |
1,603,138,374,000 |
For example:
Where does the lshw - list hardware program read the info out?
(I mean on a software level, that there are probably some ROM chips here and there is of course the case)
Basically everything, (the user could potentially want to know) about the machine and system internals, is provided to the user by the ke... |
On x86 hardware, it gets a lot of its information from DMI, an API to get information from the BIOS. More details at github : lshw
| Where does system information come from |
1,603,138,374,000 |
I have been experimenting with trying to apply Ingo Molnar's reatime patch and came into a situation where I get a blank screen and no message at all.
i.e. Kernel panic, or otherwise.
Given, that I want to get involved into understanding the kernel better and the real time patch in particular, is there a set of meth... |
One way of being sure of not missing any message from the kernel is to debug it in a virtual machine.
For example, the following script uses qemu to start a virtual machine with a custom kernel:
qemu-system-x86_64\
-kernel arch/x86/boot/bzImage\
-drive file=/home/lgeorget/VM/image.qcow2,if=virtio\
-append ... | How to troubleshoot a kernel not booting without producing a message on screen |
1,603,138,374,000 |
For example: I have a kernel 3.16 from my embedded support, but I want to have some network wireless drivers from 3.19. What is the best way to merge only this drivers (not full kernel)?
I tried merge, but it results in many conflicts.
Copying files from 3.19 to 3.16 is a lot of work and results in many missing funct... |
Finally the best option for me was :
Copy drivers files from 3.19 into 3.16 directly.
Before commit, thanks to git difftool check every change with previous code.
If change uses newer kernel function then get back to older function or add newer function files from 3.19 kernel
Compile - if errors then get back to 2.... | Merging part of kernel - best way? |
1,603,138,374,000 |
I'm working on one of amazon's linux distros (4.4.11-23.53.amzn1.x86_64). (1gb ram)on that instance
I am running node.js with the forever module. (It makes sure to restart the node.js process if it crashes).
My experience is:
The web server works for about 2-3 hours then the process just disappears.
Before running th... |
To get an idea of why your process dies, make its parent process print the exit status. The exit status indicates whether the program due to a signal and includes an 8-bit exit code from the process. The 8-bit exit code is conventionally 0 for success and 1..125 to indicate an error.
In a C/Perl/… program, you can que... | how do I know if and why linux is killing my processes? |
1,603,138,374,000 |
I'm writing a script to scrape some data from this. I'm wondering if this file changes often or is different between distros.
|
The Linux kernel strives to have stable interfaces for everything that applications use. This includes not only system calls but also files under /proc and under select parts of /sys (some parts of /sys are officially unstable and do change, refer to the documentation for details).
/proc/net/dev is documented so it's ... | Does the format or columns of /proc/dev/net change often? |
1,603,138,374,000 |
I've been debugging an issue in my linux kernel and have found a fix for the issue. Checking cross reference, I can see that the fix was applied to that file between kernel version A and kernel version B.
What is the best way to find the patch the exact patch that this fix got checked in with? I would like to see if t... |
You might get somewhere browsing the torvalds git tree, eg for the file time/hrtimer.c. Click on blame and for each line number you see the last patch applied. You can also browse the history for older patches.
| How to find a specific patch for a kernel file |
1,603,138,374,000 |
I see some empty functions in the Linux kernel file exec.c here:
http://lxr.free-electrons.com/source/fs/exec.c#L235
But, some functions like free_arg_pages is again declared below here (with same protoype):
http://lxr.free-electrons.com/source/fs/exec.c#L322
I am wondering why we have empty function and filled functi... |
You cannot have the same function twice in a c file, so you need to look
at what cpp might be doing to manipulate the source. In this case, one version of the function is inside
#ifdef CONFIG_MMU
and the other is in the #else part.
| What's the use of this empty function declaration in exec.c kernel source? |
1,444,276,466,000 |
I have a server running on Debian Wheezy 3.2.68-1+deb7u1 x86_64. Lately strange records in /var/log/messages appeared. First messages of this log starts just after server reboot.
6.222.18 LEN=44 TOS=0x00 PREC=0x00 TTL=58 ID=61546 PROTO=TCP SPT=80 DPT=42918 WINDOW=16384 RES=0x00 ACK SYN URGP=0
Jun 6 08:02:49 s02 kern... |
After reading this article: Linux kernel bug delivers corrupt TCP/IP, I thought these issues might be connected. Original veth driver appeared in kernel 2.6.24-rc1, the bug was introduced in 2010 with this patch (v2.6.37-rc8). Now a fix for this issue should be backported into kernels 3.14+, thus upgrading to one of t... | How to explain strange kernel messages? |
1,444,276,466,000 |
Can someone explain step by step how to install a module on a kernel with headers installed? I have Debian with Kernel 3.19.0 for banana pi from http://www.igorpecovnik.com/2014/09/07/banana-pi-debian-sd-image/comment-page-2/#comment-4729 and would like to install the smi2021 module needed for somagic easycap from htt... |
If you can go with full kernel source tree, here are the steps I have followed in order to compile and install a driver on the source tree:
Lets say you have the kernel sources extracted at /sources/linux-3.19
cd /sources/linux-3.19
make mrproper
make menuconfig
Here make sure to select your driver with "m" label. F... | How to install/compile module in Debian without using Full Kernel, only by using the already installed kernel headers |
1,444,276,466,000 |
This one is pretty much a straightfoward question/answer I just can't locate the information.
I'm trying to automate the re-installation of VMWare tools based off when a new kernel is installed. I seem to remember there being a directory somewhere underneath /etc and whenever new-kernel-pkg installs a new kernel and g... |
From here, I see that /etc/kernel/postinst.d is the place where scripts are placed when they need to be executed during the kernel installation time. This requires that DKMS is available on your system (many distributions, including RHEL, support it).
Since you had mentioned automating the re-installation of VMWare to... | What directory houses the scripts that get executed with new kernel installations? |
1,444,276,466,000 |
After looking at the package description and using kernel-wedge help, I'm not really sure what it does. Does it take a .deb kernel package and split it into smaller packages? Does it compile a kernel and turn it into a .deb package? Both? Something else?
|
From the manpage:
kernel-wedge is used to generate kernel module udebs for the debian installer.
What it does is take a regular kernel image deb and then split it out into udebs.
udebs are packages used by the Debian installer and are like regular deb packages except that things that are not needed for bootstrappi... | What does kernel-wedge do? |
1,444,276,466,000 |
I got diff text from lkml how do I patch it into a kernel source? I am using debian
|
kernel.org has some excellent documentation on Applying Patches to the Linux Kernel.
Essentially, you use the patch command. Once you have acquired the patch (here called patchfile), place it in your build directory and then issue the command:
patch -p <num> < patchfile
where <num> is the number of leading slashes to ... | How do you patch a kernel? [duplicate] |
1,444,276,466,000 |
To build the kernel, I do
make menuconfig
make
make modules
For step3, where do the files go? What's the location for modules? Can I change it by using any env variables?
|
The step 3 will only compile modules. For them to actually go somewhere, you'd have to do make modules_install.
As pointed out in comments, make -n modules_install will show you where they would go. The exact location depents on the version of the kernel you're compiling, the target directory being /lib/modules/<kerne... | Where are the files created by "make modules" when building and compiling the Linux kernel? |
1,444,276,466,000 |
Our server solution handles many tunnel operation requests (add/update/delete) using the ioctl interface, and the AF_INET address family socket. Aprox. numbers are 100 operations/minute with over 8k tunnels total on the server.
We have observed a strange behavior with an increasing number of tunnels - as the number of... |
It turned out that ioctl wasn't guilty here. strace showed it was, but a deeper analysis of the kernel with ftrace (or trace-cmd) showed that during ioctl processor scheduler caused most of the slow down during core/context switching.
| Kernel optimiziations for ioctl AF_INET operations |
1,444,276,466,000 |
Basic concurrent client/server architecture: There's a main loop listening for requests on a port (for example 3000), after accepting the connection the server spawns a child process that ends up having access to file descriptors where data can be read.
If we have multiple clients connected to the server, the server w... |
A TCP/IP connection has both a source port and a destination port, so if the same server connects to another server on port 3000 multiple times, the Linux kernel can sort out the connections because each one has a unique IP + source port + destination port.
This can be seen with the output of netstat when there are ... | How does the kernel know which file descriptor to write data to after fork() in a concurrent server? |
1,444,276,466,000 |
I just installed LinuxMint15 on an Acer Aspire V3-771G-73638G500Maii.
Hibernation works. But suspend to RAM does not.
When clicking suspend: After a few seconds the screen goes grey and then off. The network is turned off. The computer's fan stops spinning. The power LED is slowly blinking orange. The battery led stil... |
I installed uswsusp and this works:
s2ram -f -a 1
A big thanks to @frostschutz who made me run hibernate-ram which fails with:
hibernate-ram:Warning: Tuxonice binary signature file not found.
s2ram: unknown machine, see s2ram(8) and the USuspendRamForce option
hibernate-ram: Aborting.
And thus got me to try out s2ra... | LinuxMint15: Suspend to RAM not working |
1,444,276,466,000 |
I'm currently learning for an exam in operating systems. This includes learning some basics about page tables, which lead me to the question Why using hierarchical page tables? which mentions that access control bits take about one byte for each entry in the page table. Another source mentioned also one byte for one p... |
This answer is for a IA-32 architecture. I took the information form Intels IA-32 Architectures Software Developer’s Manuals, Page 1751/3044(!):
Table 4-6. Format of a 32-Bit Page-Table Entry that Maps a 4-KByte Page:
0 (P): Present; must be 1 to map a 4-KByte page
1 (R/W): Read/write; if 0, writes may not be allowed... | What information exactly is in the access control bits of a page table? |
1,444,276,466,000 |
I've got a RHEL4 machine with 1TB of memory and have discovered that malloc and mmap refuse to allocate any memory above 512GB. Meanwhile, I don't seem to have a problem with RHEL5 machines. I'm presuming, then, that it's just a matter of kernel configuration. Does anyone know what controls the maximum process size (a... |
The initial port of Linux for amd64 only supported a 40-bit virtual address space, divided in 512GB for the process and 512GB for the kernel. Current versions support 48 bits of virtual address space, divided in 128TB/128TB. This last limitation is intrinsic in the current version of the amd64 architecture: there is s... | Where is max process size specified? |
1,444,276,466,000 |
Since upgrading my (Gentoo) kernel from 2.6.38 to 3.3.8 (via oldconfig), I can't get the network on eth0 up anymore. It reports "SIOCSIFADDR: File exists" with a number of other SIOCSIF* errors that seem related. I have the CONFIG_BNX2=y configuration for the Broadcom NetXtreme II NIC that the machine has (which we ha... |
The solution for me was to install the linux-firmware package. Apparently, this got split out of the kernel at some point, and I've had to install it manually on boxes that were upgraded from old kernels.
| SIOCSIFADDR: File exists after upgrading kernel |
1,444,276,466,000 |
I'm pretty confused on how linux manages I/O shared memory to communicate with devices that use it.
If I understood it correctly linux kernel starts mapped at 0x100000 (to avoid the first megabyte legacy ram data and to be stored in contiguous memory locations) and then after entering protected mode:
on 32 bit system... |
On PCs, hardware memory mapped IO ranges are assigned by the BIOS to physical memory addresses between 3GiB and 4 GiB. When a driver requests access to the memory, the kernel maps it somewhere in the kernel virtual address space.
Neither of your other two questions seem to have anything to do with shared memory, but:... | Linux I/O shared memory access |
1,444,276,466,000 |
I have an linux kernel 2.6.30 on an ARM based embedded device and I have to do some kernel memory usage profiling on the device.
I am thinking of monitoring the ps output on various kernel threads and modules while I carry out actions like wifi on/off etc.
Can you suggest me:
Which threads I need to monitor?
How to ... |
There are several ways to monitor memory usage in a Linux system. Some may or may not be available depending on
What version you are running
How the kernel is configured
What user-space tools are included in the root file-system
Since Linux typically is a virtual memory system, some statistics may be misleading and/... | Memory profiling the linux kernel on an embedded device |
1,444,276,466,000 |
I compiled the latest kernel, and the menu.lst is updated as follows.
My aim is to keep the other kernel around, so that if the new one fails we can still boot from the other one.
Is this the correct way to achieve that?
# Modified by YaST2. Last modification on Thu Jan 19 17:10:38 IST 2012
# THIS FILE WILL BE PARTIAL... |
I am using grub1, Mine looks like this:
# (0) Arch Linux
title Arch Linux
root (hd0,0)
kernel /vmlinuz-linux root=/dev/sda3 resume=/dev/sda2 ro loglevel=3
initrd /initramfs-linux.img
# (1) Arch Linux backup
title Arch Linux backup
root (hd0,0)
kernel /vmlinuz-linux-backup root=/dev/sda3 resume=/dev/sda2 ro logl... | Updating /boot/grub/menu.lst on OpenSuSe 11.3 |
1,444,276,466,000 |
I am using Fedora 15, and want to upgrade to version 16. I followed the official link Upgrading Fedora using yum - FedoraProject to upgrade my OS by the following command:
yum update kernel* --releasever=16
yum groupupdate Base --releasever=16
reboot
After reboot, the OS does not start. It just prints the following ... |
Note: I dont know where you found those commands, but those are not the right procedure to upgrade a system using yum; which is actually a matter of just running yum --releasever=XX distro-sync after having updated yum to the latest version.
I think your problem depends on the fact that Fedora 16 uses grub2 as default... | Kernel can not boot after upgrade on Fedora OS 15 |
1,444,276,466,000 |
I keep getting an address collision warning at boot time, between ACPI and Video Rom. If I add acpi=off to grub.conf the error goes away, but then I have no power management (battery icon, proper shutdown, etc.). Anyone know the cause or a possible solution?
|
This can probably be solved in BIOS configuration. If there is a newer BIOS for your machine, you should use it.
Other than that, try booting with pci=noacpi option. If this results in loosing some capabilities you desire, whereas presently everything works fine despite the acpi warning, you might just disable kernel ... | Fedora 15 address collision on Compaq CQ41? |
1,444,276,466,000 |
Possible Duplicate:
Understanding the linux kernel source
I am sure that I must be missing something, here. I cannot for the life of me find the source code for these system calls. I can find their numbers, and I can find their prototypes, but I cannot seem to actually find the functions that implement them.
In ... |
They are were in fs/super.c in Linux 2.4:
sys_mount
sys_umount
In my machine (Linux 2.6.24) they are in fs/namespace.c:
sys_mount
sys_umount
In Linux 2.6.39 (which is latest stable) I could not find sys_mount function but I found compat_sys_mount function in /fs/compat.c.
Thanks to Gilles for pointing out obsolete... | Linux source, where are sys_umount and sys_mount system calls? [duplicate] |
1,444,276,466,000 |
I have a laptop that has a Bluetooth card in it, a Gateway NV series one. I'm trying to get it to turn on, as it currently isn't. The first time I booted after I wiped my drive and installed Linux Mint 11 from scratch, I saw the bluetooth light come on for the first time ever. However, it wasn't working, and after a r... |
Very strange. On my work Dell E6510 the bluetooth shows up as an "internal" USB device (visible with lspci) and I have no problems with it.
Try to see if you can get to the Gateway site where it allows you to download the Windows driver, and see if that tells you what kind of chipset/etc. it might be. Otherwise you ... | Setting up internal Bluetooth card on Linux 2.6.38 |
1,444,276,466,000 |
So I managed to install Debian 5 on an eBox 3300MX (an embedded type computer). I added a custom kernel after getting a basic install done. That was to get the network card to work. After that, I finished with installing, since I was doing a net install, and it worked fine. However, since then, I am unable to get the ... |
It turns out that during the first update I did (apt-get install ntp), that ifupdown was removed. Since I did not immediately reboot, I was able to continue with the net install following this. I discovered this by completely installing Debian again, and carefully looking through the operations during that update (wel... | no network device found after Kernel update |
1,660,348,260,000 |
I'm writing a livepatch module to hook a function and replace it with one that causes the process to terminate. I can't call abort() because that calls BUG() and my kernel will panic on oops.
Importantly, the function must terminate the process immediately and must not return.
|
Well, I'm dumb. Turns out I was still using do_exit_group() and forgot to switch to do_exit().
| What is the proper way to exit the current process from a kernel module? |
1,660,348,260,000 |
When you boot the Linux kernel, it spews fouth a huge wall of text, which scrolls faster than any human could ever read. If you watch closely, at some point during the boot sequence, the font the text is drawn with changes ever so slightly.
Does anybody know why this happens, or exactly what point it happens at? It's ... |
The font change happens because setfont is run to change the font. On Debian-based distributions, this is usually done by console-setup.
By default, the effect is as you describe: in Debian, on PCs with kernel mode-setting, the default switches from whatever 8×16 font is included in the kernel to Terminus 8×16, the de... | Font change during boot sequence |
1,660,348,260,000 |
I checked my Linux sys file, I don’t have:
/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
My kernel config doesn’t have CONFIG_X86_INTEL_PSTATE, and it still didn’t use acpi-cpufreq driver.
The sys file here only created when intel_pstate enabled?
I am using yocto environment, not CentOS or Ubuntu.
|
Short answer
The reason the path won't show on your system is that the cpufreq driver isn't loaded. This driver is the one creating the /sys/devices/system/cpu/cpuY/cpufreq in sysfs and populating it with values. When trying to compile the kernel without CONFIG_X86_INTEL_PSTATE, it is forced to enabled by the pcc_freq... | There is no scaling_max_freq sys file |
1,660,348,260,000 |
I've been using /proc/self for a long time to read process-related information like /proc/self/maps etc.
However, on some UNIX variants, like macOS, the procfs filesystem is not implemented; but as this link states, it should be possible to obtain similar information using sysctl.
Reading output from sysctl -a, I find... |
Your observation that sysctl predominantly contains system-wide
parameters is apt. It also follows somewhat from the name sysctl (which suggests SYStem ConTroL), and the man page's description of "sysctl - get or set kernel state."
Some BSD systems do offer optional procfs filesystem support which can be mounted unde... | How to use sysctl on UNIX variants, e.g. macOS, to read information normally found in /proc/self on Linux? |
1,550,256,603,000 |
I just enabled netconsole on my Ubiquiti wireless LAN access points. They run a custom OpenWRT or LEDE version, based on Linux Kernel 3.3.8. It works, but the message it sends always contains an additional prefix. While dmesg reads
[ 73.690000] netconsole: remote port 6666
it is sent as
{d865 e557} [ 73.690000] ... |
Unfortunately, this was due to a patched version of driver/net/netconsole.c. The first four hex characters are a session, that gets randomized during the loading of the netconsole kernel module. The second four hex characters are an internal model number of the AP. You can also get it by running cat /proc/ubnthal/boar... | netconsole prefixes every message |
1,550,256,603,000 |
I had a big trouble.
My os is Slackware,14.2,I have to backup a lot of data
2,5TB.
I have tried many methods: usb3,firewire,e-sata
with different control.
After some hours,sometimes minutes the system totally hang
no way to recover: power button,sysrq,the only way is to
cut-off the AC power.On console I cannot see an... |
Solution found.
I had a custom kernel,probably some strange settings make rsync hang
with the Slackware current kernel 4.4+ works fine,even with the 4.4.88
Slackware-14.2 kernel
With those kernels no problems,no hang.
| Linux hang on transfer of big files with rsync |
1,550,256,603,000 |
I have used rsync to clone all my disks. Then I created partitions and gave them filesystems (ext2). I installed grub. I have done everything that I can think of or what I was able to find on the internet. The system is still not booting :( . What else can I do?
|
Mount: could not find filesystem '/ dev / root'
During the boot process, you will mount the filesystem (ext2 in your case).
The attached image will appear to fail to mount ext2.
You will not be able to run ext2's /sbin/init because you have failed to mount ext2 (switchroot: mount failed: No such file or directory)
Ple... | Linux clone isn't booting |
1,550,256,603,000 |
On Fedora 24, after every kernel update, the debug version of the latest kernel is on top of the list of kernels during boot.
Running grub2-mkconfig -o /boot/grub2/grub.cfg fixes the list, but I currently have to run this after every upgrade.
Is there a way to fix this such that the list is properly ordered after ever... |
This got fixed by itself after a few updates. I've also since upgraded to Fedora 25 and am not encountering the issue.
| After every kernel update, debug option is first on the list at boot |
1,550,256,603,000 |
I'm running ubuntu gnome 16.04.1 on my hp pavilion ab048tx having an Elantech touchpad. I've tried various dkms fixes available on the internet (including psmouse-elantech-x551c and psmouse-elantech-v7), but nothing seems to get multi-touch into action. Basic functions work (move, click, tap and right-click). Any idea... |
In case somebody finds this, as cross-posted here, updating the kernel to 4.4.0-38 fixes the issue.
| New Elantech touchpad lacks multitouch (latest kernel) |
1,471,123,810,000 |
as a school project I have to add a syscall to the latest stable linux kernel. I did and recompiled the kernel using make defconfig and make.
After going through several tutorials to boot the kernel (none of which worked), I finally found something here (adapting it to x86_64 version of the kernel). This tutorial make... |
Well if anyone wants to know how to do that, here's how I did it -> I compiled on my machine, created my own initramfs (following the instructions here (don't gzip or qemu won't read it somehow)), put the executable in the initramfs before cpio it, then launched qemu and the executable, voila.
I know this is not the i... | Qemu - debug new syscall |
1,471,123,810,000 |
Does a smaller page size lead to smaller page table(s)?
If so, is that good or bad !?
I think that this lead to more data handling.
Is it possible:
to test that within Linux manually or
that this stuff is defined by the Linux kernel ? If so, I have no chance to test that.
|
The amount of paging space is fixed (but configurable) on any given system, so having smaller pages means that you have more pages available. The trade off is entirely performance based. It depends on what the application uses. Oracle for example may benefit from pages of size X, while Informatica may benefit from pag... | What is the effect of smaller pages? |
1,471,123,810,000 |
I'm currently trying to get my Mint 17 partition booting again.
I tried to fix a booting problem with boot-repair and a live USB, but upon inputting the command
sudo chroot "/mnt/boot-sav/sda7"
apt-get install -y --force-yes grub-efi-amd64-signed shim-signed linux-signed-generic"
I got the error
The following package... |
I wound up following several guides to boot from rescue grub. I unfortunately overlooked one problem the whole time; my grub folder in /boot was actually named grub.bak.
I then followed these instructions to boot from rescue grub:
set prefix=(hdx,y)/boot/grub.bak (instead of set prefix=(hdx,y)/boot/grub)
set root=(hdx... | restoring grub mint 17 |
1,471,123,810,000 |
I was trying to compile Linux kernel from source file i.e. 3.19.3 kernel version
I ran the following commands for compilation
first I extracted
tar -xvf linux-3.19.3.tar.xz
changed to its directory
cd linux-3.19.9
sudo make menuconfig
Didn't change anything
sudo make -j4
sudo make install-modules install
I was foll... |
After kernel compilation, one must execute the command depmod -a to refresh the module order in directory /lib/modules/<kernel_version>
| kernel compilation in ubuntu, reboot msg "gave up waiting for root device" |
1,471,123,810,000 |
Observation:
I switch on a Linux box
Boot loader displays its output on screen
Boot starts with first output messages
Screen goes blank, and never comes back on.
Note: this is about the console, NOT about X11.
I keep running into the same problem, on a variety of hardware (x86, ARM) with different video connectors (... |
It works if I add
video=LVDS-1:d
to the kernel parameters.
| How does the Linux kernel initialize console graphics? |
1,471,123,810,000 |
The man page for adjtimex says
Anyone may print out the time variables, but only the superuser may change them.
How do I see the value shown by adjtimex -p as the tick variable without using adjtimex? I've browsed around in /proc/sys/kernel as well as some in /sys but haven't yet found anything that shows me that va... |
As hinted by @MarkPlotnick, there is no /sys or /proc interface for this. You have to use a program like adjtimex to make the appropriate system calls to see it.
| How to see kernel time variables without using adjtimex? |
1,471,123,810,000 |
Already installed VMware Workstation 9 on my Linux CentOS 6.5 Final with 3.10.40-1.el6.elrepo.x86_64 running kernel.
When I open VMware Workstation, it asks me to locate the Kernel Headers 3.10.40-1.el6.elrepo.x86_64.
THESE MESSAGE: I get on the internet, my kernel version is different of that message says. Outside,... |
SOLVED.
1-Downloaded the
kernel-lt-devel-3.10.40-1.el6.elrepo.x86_64.rpm
from http://ftp.nluug.nl/os/Linux/distr/elrepo/archive/kernel/el6/x86_64/RPMS/
2-Installed (just executing the file)
3-Pointed de VMware configuration to
/usr/src/kernels/2.6.32-431.20.3.el6.x86_64/include/linux/
When the VMware start, ano... | CentOS ELRepo Kernel installing VMware |
1,471,123,810,000 |
Init typically will start multiple instances of "getty" which waits for console logins which spawn one's user shell process. Upon shutdown, init controls the sequence and processes for shutdown. The init process is never shut down. It is a user process and not a kernel system process although it does run as root. If t... |
To clarify, you seem to be running systemd on Ubuntu rather than the (current) default of upstart.
systemd, by default, sets up only one getty, tty1. Other gettys are set up "on the fly". There is a default setting of a maximum of 6 ttys.
If you want to increase the number of gettys available to autostart, then increa... | Getty instances in init process |
1,471,123,810,000 |
I am on Ubuntu Server 12.04 x86_64 and I need to build Android CyanogenMod 7.2 kernel module. My phone has custom ROM and a patched kernel:
adb shell cat /proc/version
yields
Linux version 2.6.37.3-cyanogenmod-gf3345ef-dirty (subbotin@avs234) (gcc version 4.4.0 (GCC) ) #2 PREEMPT Sun Mar 13 14:55:50 MSK 2011
I have ... |
However, if I remove "(subbotin@avs234)" the kernel compiles just fine.
You don't need this in the LOCALVERSION. "subbotin@avs234" is just the one that compiled the kernel (user@host). It's not part of the version string nor needed for anything related to the compilation of the kernel.
| Running make with vermagic kernel string with parentheses causes /bin/sh syntax error |
1,362,601,005,000 |
So, I'm attempting to compile and use the 3.6.2 kernel on my Debian 6 VM (running under Windows 7 in VMware Workstation 9). I've already had several hick ups, but I am slowly getting through them but still not there, yet.
So, I'm running the following (after extracting the file into /usr/src and running the commands v... |
Alrighty then, I found the solution! Booyakasha! :)
After running lspci I did a google search for LSI Logic kernel compile (or something to that affect) and came across this site. Since it applied to an older kernel version (I assume as it looks different to the settings I have available) I applied the following and g... | Unable to mount root fs after new kernel compile in VMware |
1,362,601,005,000 |
I just compiled and installed the new 3.0-rc2 kernel from kernel.org on my Fedora 15 system. Everything seems to work fine and I can successfully boot into the system. However, this broke my previously installed NVIDIA driver, so I need to compile a new one. I downloaded the installer from nvidia.com, but I am having ... |
Well, I wasn't going crazy. The NVIDIA installer needed to be patched. Kernel version 2.7.0 was hardcoded as the upper bound. That was bumped up to 3.1.0 from a simple patch.
Here is the patch file: nvidia-patch @ fedoraforum.org
--- conftest.sh.orig 2011-05-30 12:24:39.770031044 -0400
+++ conftest.sh 2011-05-30 12... | NVIDIA installer can't find kernel source/build files (compiled from kernel.org) |
1,362,601,005,000 |
I have dual boot(triple boot) setup with Kali/Fedora and Windows 10.
I'm using Fedora for my daily work and Kali for various experiments.
The problem is that whenever Kali gets and kernel update it still boots with older kernel after reboot.
I have following installed kernels :
> root@CoreImpact:~# dpkg --list | g... |
I've managed to fix this with selecting proper output file to grub2-mkconfig :
grub2-mkconfig -o /boot/grub2/grub.cfg
Not sure where it was saving it by default in previous attempts. Now everything seems to be working fine.
| Kali booting old kernel |
1,362,601,005,000 |
I have a Raspberry Pi running Raspbian (a Debian flavor: Linux version 3.12-1-rpi ([email protected]) (gcc version 4.7.2 (Debian 4.7.2-5+rpi1) ) #1 Debian 3.12.9-1+rpi1 (2014-05-19) ).
I have a serial output device (electricity meter) connected via USB. The serial port is read with a Python script every minute.
EDIT... |
Since I nolonger have this problem I'd like to share my solution:
I've daemonized the Python script.
This enabled me to open the serial connection on start-up of the script and then read the serial-port data every ten seconds.
No more overruns since.
Code of the script is here on GitHub
| How to suppress input overrun messages |
1,362,601,005,000 |
I remember for choice of swap partition, we should use (swap > 2xRAM) at least.Of course it deprecated , because max of computer's ram is very high. kernel support it.
My question: i remember each partition of swap just support 2G maximum, it means if you have 2G ram you should create 2 partition of 2G swap. Did kern... |
Either you have a long memory or you've been reading obsolete documents. There used to be a 2GB swap size limit (on most 32-bit platforms), but this has not been the case for years. The limitation was removed at some point in the 2.2 kernel series.
The maximum useful size of a swap area depends on the architecture an... | swap partition and its laws |
1,362,601,005,000 |
I came upon this question :
What's the use of having a kernel part in the virtual memory space of Linux processes?
and based on the answer and the comments on the answer :
the kernel memory map includes a direct mapping of all physical memory, so everything in memory appears there; it also includes separate mappings... |
The kernel’s memory map on x86-64 is documented in the kernel itself. The kernel maps
user-space (for the current process)
PTI data structures
all the physical memory
the kernel’s data structures, in various blocks, with holes for ASLR
the kernel itself
its modules
Having a full mapping of physical memory is conveni... | What's inside the kernel part of virtual memory of 64 bit linux processes? |
1,362,601,005,000 |
I am reading through Salzman's Linux Kernel Module Programming Guide, and I was wondering about where the file linux/kernel.h is located. I couldn't find it with find. Or rather the files I found did not have any printk priority macros in them.
|
The linux/kernel.h header which gets used for module builds is the header which is part of the kernel source. When modules are built in the kernel source tree, that’s the version which is used.
For external module builds, the build process looks for the header in /lib/modules/$(uname -r)/build/include/linux/sched.h. T... | Where exactly is the file linux/kernel.h? |
1,362,601,005,000 |
Do you know what initramfs-kernel mean?
I know squashfs-factory/squashfs-sysupgrade.
How can I do it or what is it? which is better?
I just don't understand what the initramfs-kernel mean.
I have Linksys 1900ACS v2 and D-Link DL-860l B1, but I only use squashfs-factory and squashfs-sysupgrade.
What does the initramf... |
The initramfs OpenWRT/LEDE kernel builds are including the rootfs image into initramfs, attaching it to the kernel so it will put the filesystem in a ramdisk during bootup and utilize it as /. You don't need such builds if the regular flash-based storage works for you, as it won't allow any persistent configuration by... | wrt (openwrt / lede) initramfs |
1,362,601,005,000 |
I compiled the linux kernel by downloading it from kernel.org, put it on my desktop, and opened up terminal. I changed to the linux-3.2.13 folder, typed mr proper.
Then I use make menuconfig to configure my .config file. After I am done with that and I save it I type make and terminal starts to compile the files. Afte... |
Did I do something wrong?
Doesn't look like it. Compiling a recent kernel is very resource-consuming. If your CPU isn't recent, and you don't have a lot of RAM, it can take very long.
Make sure you only select the modules/features you actually need, and if you have a multi-core/thread machine with a bit of RAM, use ... | Am I in the right direction for a linux os? |
1,362,601,005,000 |
I am trying to verify When choosing a Docker container image file for my Ubuntu, what do I need to match between them?
On Lubuntu, a CentOS container says it is CentOS, by
$ sudo docker run centos bash -c "cat /etc/*-release "
CentOS Linux release 7.6.1810 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_... |
cat /proc/version is showing kernel version. As containers run on the same kernel as the host. It is the same kernel as the host.
cat /etc/*-release is showing the distribution release. It is the OS version, minus the kernel.
A container is not virtualisation, in is an isolation system that runs directly on the Linux ... | Why does a CentOS Docker container says it is Ubuntu? |
1,362,601,005,000 |
I'm using Fedora and wonder if there is some way I can exclude kernel updates when I run yum update, until I specifically want to update the kernel.
The reason why I am concerned about this is because sometimes it requires a lot of extra research finding patches for some programs and extra time spent recompiling the... |
Try this:
yum --exclude=kernel\* update
or:
yum -x 'kernel*' update
From yum man page:
-x, --exclude=package
Exclude a specific package by name or glob from updates on all
repositories. Configuration Option: exclude
And if you want to make this persistence, add a line exclude=kernel* to /etc/yum.con... | Is there a way to permanently exclude the kernel from updates? |
1,362,601,005,000 |
This question is a follow-up to my previous question.
Logic for me to says that an in-kernel firewall sits between the network access layer and the Internet layer, because it needs to have access to the IP-packet header to read the source and destination IP address in order to do filtering before determining if the p... |
A firewall does not exist in a single place in the kernel network stack. In Linux, for instance, the underlying infrastructure to support firewall functionality is provided by the netfilter packet filter framework.
The netfilter framework in itself is nothing more than a set of hooks at various points in the kernel p... | Does an in-kernel firewall sit between the network access layer and Internet layer? |
1,362,601,005,000 |
It's fairly easy to understand EOL, mainline and stable kernel, but I'm not sure about longterm here,
What does it mean, or how does it differ from stable kernel?
|
Check What does "stable/EOL" and "longterm" mean? @ https://www.kernel.org/category/faq.html
| What does longterm mean on kernel.org? |
1,362,601,005,000 |
In https://github.com/facebook/flashcache/ there is a saying
make KERNEL_TREE=<root of the kernel source tree>
This builds both the flashcache.ko and 3 utilities.
flascache-sa-guide.txt has details on how to create and load
flashcache volumes.
Mohan Srinivasan Paul Saab
What should I wrote to replace ?
|
CentOS
Reference: Tutorial Link
Quick quote from tutorial:
Step 1: As normal user
[user@host]$ mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
[user@host]$ echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros
Step 2: As root
[root@host]# yum install rpm-build redhat-rpm-config asciidoc hmaccalc
[root@... | How to know <root of the kernel source tree> |
1,362,601,005,000 |
This is hardly a theoretical question as many have done this, albeit there's very little information on the underlying processes.
I'm developing a custom MIPS-based processor on which I would like to run Ubuntu. I'm quite baffled as to what to do next after you've designed the instruction set and the computer architec... |
On the architecture side, you need more than an instruction set and a computer architecture. You also need to have:
A CPU in some form (emulator, FPGA, silicon…).
A way of booting that processor: a way of getting the operating system into the memory that the processor runs at boot time. Most processors boot to code s... | Running the linux kernel and Ubuntu on custom processor |
1,362,601,005,000 |
I noticed, that the power consumption in my ASUS P53E notebook is doubled (from 10W to 20W) when I change from kernel 3.6.1 to 3.6.2 (or later). I use Ubuntu Quantal mainline kernel from kernel-ppa/mainline - Kernel Ubuntu
on Mint 13 Maya (which is based on Ubuntu Precise 12.04).
Please advise me, what additional inf... |
I think there's a power utilization regression that was introduced in 3.6.x. If you can, stick with the older kernel. Supposedly, there's also an ext4 metadata block corruption bug in 3.6.2 as well, so it might be worth waiting.
| Why kernel 3.6.2 is so much less energy efficient than 3.6.1 on Mint 13? |
1,362,601,005,000 |
I have built the Linux kernel, but I wanted to do it without building the debug package.
I know that it's possible to disable the flag CONFIG_DEBUG_INFO, via scripts/config (with either --set str "" or --disable).
However, I'm confused, because when I invoke make deb-pkg, the flag is reset to the value y, so that the ... |
The behaviour changed slightly in 5.18, which may be why you’re seeing this. DEBUG_INFO is now a selection, so CONFIG_DEBUG_INFO is set based on other configuration settings. To disable DEBUG_INFO, you need to enable DEBUG_INFO_NONE and make sure all the other selections are disabled (DEBUG_INFO_DWARF_TOOLCHAIN_DEFAUL... | Why is the flag `CONFIG_DEBUG_INFO` reset when building the Linux kernel? |
1,362,601,005,000 |
We know there are many files that are pseudo files, i.e. not a real file.
ex:
/sys/xxx
/proc/xxx
/dev/xxxx
In my understanding, the open() will call x86 ASM code, the ASM code will do hardware interrupt to access to the disk.
The problem is if the open() will eventually access to the disk, how pseudo file still get a... |
As Fox noted in their answer, the kernel handles the open() syscall, and meanwhile, filesystems implement file operations in their own way. Filesystems, on the other hand, implement their version of syscalls, and that's what kernel should be using.
Consider, for instance, ext4 call to open directory or file operation... | if some files are pseudo, why open() function still can access it? |
1,362,601,005,000 |
I want to be able to intercept connection establishment, e.g. want to know when some process (any process) establishes a connection. Is there a way to achieve that?
The only thing I can think of is to intercept connect() syscall. But may be there's an other way? May be when networking context is created in a kernel?
T... |
For the aspect of just extracting information, it's possible to do that with iptables using AUDIT matches (or possibly LOG matches if you don't need huge amounts of info).
For the case of actually allowing or disallowing connections in real-time based on some complex rules, I'm not sure you can do that on reliably on ... | Linux: intercepting connection establishment |
1,362,601,005,000 |
we have kafka service ( as systemctl service )
and we configured in that service number of open files
example:
[Service]
LimitMEMLOCK=infinity
LimitNOFILE=1500000
Type=forking
User=root
Group=kafka
now when service is up , we want to understand the consuming of number of files by kafka services
from googled , I under... |
The LimitNOFILE directive in systemd (see man systemd.exec) corresponds to the RLIMIT_NOFILE resource limit as set with setrlimit() (see man setrlimit). Can be set in some shells with ulimit -n or limit descriptors.
This specifies a value one greater than the maximum file descriptor number that can be opened by thi... | how to find the number of open files per process |
1,362,601,005,000 |
My understanding is that fork is the system call that creates a new process by cloning the parent process. By what creates the parent process? If using a C library to create multiple processes, what was the system call to create the first process? For example when running ./main.o
|
The Kernel itself contains an internal call to execve() to create process 1 (init), which never exits.
Init() is the root of the whole process tree. It starts off by forking processes for all the known services and other configured tasks, and for all the login devices.
| What System call creates the parent process? |
1,362,601,005,000 |
Simple, top level question (which, maddeningly has eluded my sorry level of Google-fu):
Poking around in my (admittedly out of date) machine, I find the following file:
/lib/modules/4.9.0-0.bpo.14-amd64/kernel/drivers/input/keyboard/max7359_keypad.ko
How do I determine what type of keyboard is addressed by this drive... |
There is no source of information for this which is guaranteed to be accessible to non-programmers.
There are however tools you can use to determine the purpose of a given kernel module (which is what the file you’re looking at is); the first one is
sudo modinfo max7359_keypad
which will give you a short description ... | Where to Find Linux Kernel Driver Documentation by Filename |
1,362,601,005,000 |
Following these instructions, I downloaded and unpacked the kernel.
https://priyachalakkal.wordpress.com/2013/01/19/verifying-digital-signature-using-gpg/
Then I tried to verify the signature but I get an unexpected error. That isn't one of the success or failure scenarios described by sites that document the basic ap... |
You don’t have the right key; the 5.6.9 archive is signed by Greg Kroah-Hartman, not Linus. Running
gpg --recv-keys 647F28654894E3BD457199BE38DBBDC86092693E
will allow you to verify the archive. (This is the fingerprint from your second gpg invocation.)
The message you get after retrieving the key indicates two thing... | Trouble verifying linux, even after downloading key I get "No public key" |
1,362,601,005,000 |
Recently I've found that many processes/demons like to issue unneeded fsync() syscalls, increasing a little bit their stability, on the price of hugely decreasing the general performance of the whole system. I want to stop this non-cooperative behavior. However, first I need to somehow find them.
I think, the most ide... |
Supposing a recent distribution is being used, the bpftrace does come handy. For it, in Debian 10, there is a need to install it:
apt install bpftrace
Then using synsnoop.bt, to listen system-wide to *sync related syscalls:
# syncsnoop.bt
Attaching 7 probes...
Tracing sync syscalls... Hit Ctrl-C to end.
TIME PI... | How to log, which processes did specific syscalls? |
1,362,601,005,000 |
I'm using a docker image and trying to see which packages are installed. Specifically which kernel packages.
Doing this command I get the following kernel packages
rpm -qa kernel*
kernel-devel-2.6.32-754.6.3.el6.i686
kernel-headers-2.6.32-754.17.1.el6.centos.plus.i686
but it's missing... how do I find verify that sp... |
A docker image doesn't have a Kernel, It uses the Kernel from the host machine that you are running Docker on. You can run this command inside your Docker container and from your CentOS host, It will show up the same result
uname -sr
There is a similar question on Super User
Ps:// By the way, you should upgrade your ... | finding kernel version in the docker image |
1,362,601,005,000 |
I read that Linux has an O(1) scheduler, but this does not tell me actually how long a context switch roughly takes. Does someone have some current numbers?
I know it depends on a lot of factors like CPU type, frequency, DRAM connectivity, caches and what not, but I would be happy to know the order of magnitude in mi... |
The default scheduler on Linux hasn’t been the O(1) scheduler for the last ten years, it’s the Completely Fair Scheduler, which is O(log n) on the number of tasks in the runqueue. You’d have to benchmark specific scenarios you’re interested in, on your specific systems and workloads; one can find benchmarks on the Int... | Linux scheduling overhead in orders of magnitude? |
1,362,601,005,000 |
When reading this Kubernetes blog post about Intel's CPU manager it mentions that you can avoid cross-socket traffic by having CPUs allocated on the socket near to the bus which connects to an external device.
What does cross-socket traffic mean and what problems can it cause? These are my guesses:
A CPU from one soc... |
The authors of the Kubernetes blog post just speak gibberish trying to reinvent the wheel - one more PBS (portable batch system), which they call "CPU manager".
Answering question: "What does cross-socket traffic mean and what problems can it cause?" - it's necessary to say first, that this is about Multiprocessor Com... | What does cross-socket traffic mean? |
1,362,601,005,000 |
I found a lot of instructions, how to install the latest rc kernel on Ubuntu, for example here, but none how to install it on debian jessie.
How can I install the latest rc-kernel on debian (currently 4.16)?
Or can I just install the Ubuntu kernel on a debian system?
|
You’ll usually find pre-built release candidates in experimental (as of this writing, 4.16rc6 is waiting in the upload queue). To install these:
Add experimental to your repositories:
echo deb http://deb.debian.org/debian experimental main > /etc/apt/sources.list.d/experimental.list
(this is safe as-is, without any ... | Install the latest rc kernel on debian |
1,362,601,005,000 |
The following Kernel Panic occurred on my embedded board.
I am using 3.10 Kernel.
I am analyzing the cause of the Kernel Panic.
The Kernel Panic message shows the PID(735).
Feb 22 19:40:28 TEST kenel: CPU: 0 `PID: 735` Comm: cat Not tainted 3.10.73 #2
Feb 22 19:40:28 TEST kernel: Process cat `(pid: 735`, stack limit =... |
The cat program was running with a PID of 735 when the panic occurred, i.e. the fault happened in the context of the process with PID 735. This does not mean that the cat program did something wrong. The fault is in the kernel, a panic is something that should not happen under any circumstances (unless you really try ... | Is the [PID] of Kernel Panic the killer of Kernel Panic? |
1,362,601,005,000 |
I installed and set up ccache and built the kernel with it. Here are the stats:
cache directory /home/marcin/.ccache
cache hit (direct) 1
cache hit (preprocessed) 0
cache miss 15878
called for link 31
called for preproc... |
ccache will only reduce compilation time if you compile the same code several times; it's perfectly normal to see (nearly) only cache misses when compiling a project once, because the code being compiled hasn't been cached.
| Ccache hits only once during kernel build |
1,362,601,005,000 |
How can I get the number of threads in the kernel at specific sampling rate? I need to measure the utilization of the system directly by myself.
|
ps -eL|wc -l
gives total number of lwp/thread count at any point of time
| Number of Threads in Kernel |
1,389,107,558,000 |
What does it mean for a core to run at different loads in different moments? How does a 10% load differ from a 90% load? How is this number calculated, essentially?
|
It should be pretty obvious: time spent executing a task / total time.
So over a given interval, 10% load means 10% of that time was spent executing tasks, and 90% was idle.
| Linux and CPU usage |
1,389,107,558,000 |
I was reading The Design Of UNIX OS and had a doubt.
A signal handling function can be specified in the signal() call. The handler is supposed to execute when the process receives that particular signal. An algorithm known as psig runs to handle signals if they are received by a process.
In case of a user defined han... |
I assume by "The Design Of UNIX OS" you actually mean "The Design of the UNIX Operating System" by Maurice J. Bach.
My best guess at what you're running into — and guess I must, since you have given no page or section references — is section 7.2.1, spanning pages 203 to 204. He starts the section with two paragraphs d... | signal handling in the unix kernel |
1,389,107,558,000 |
I need to disable some parts in ACPI, but it is
simply not present in kernel 2.6.38.8 (downloaded
as a tar from net)?
I can see the option in kernel 2.6.34-12 (default
on OpenSuse 11.3), but not in the other one.
What's the point that I am missing?
P.S.
Screen shots are from kernel 2.6.38.8.
|
The ACPI block depends on PCI being enabled.
Symbol: ACPI [=y]
...
Depends on: !IA64_HP_SIM && (IA64 || X86 [=y]) && PCI [=y]
If you disabled PCI (or didn't enable it), or selected a different architecture, you won't see any options related to ACPI.
| ACPI (Advanced Configuration And Power Configuration) not present on 2.6.38.8? |
1,389,107,558,000 |
Is there a major Linux distribution that uses 3.2.x kernel?
|
Yes! Backtrack 5 R2 uses 3.2.6 kernel.
| linux with 3.2.x kernel [closed] |
1,389,107,558,000 |
CentOS is "derived entirely from the Red Hat Enterprise Linux (RHEL) distribution" (more here).
Does it fall into any UNIX System V family? Such as PDP-11 or etc?
If not, where does CentOS stands for comparing with System V family for zero downtime or performance etc?
|
CentOS is a Linux variant, and therefore shares no code with AT&T Unix System V.
The Linux kernel does support many System V system calls, and as such, a lot of software written for System V was able to be ported over fairly easily. These days, I'd wager that a lot more software is written first for Linux, and then ma... | Does CentOS fall into System V family? How is it considered to be while comparing with Unix System V family? |
1,389,107,558,000 |
I'm comparing two different kernel versions (one official, one from a manufacturer); there are thousands of file whose only difference is in metadata in the files.
The metadata looks like '$:Key: value$'. Is there a set of tools that modify this stuff? What generates this data? Is there any way to do a diff without th... |
As Tante says, those $Word: ...$ are inserted and updated by some version control systems (CVS and SubVersion, tipically).
GNU diff has an option --ignore-lines-matching-re that can exclude lines that match a certain regular expression. This one should do the trick:
diff -wu --ignore-matching-lines='\$[A-Z][a-z]*:.*\... | What's up with the metadata in the source? Are there tools for it? |
1,389,107,558,000 |
I am writing my own OS loader (Boot Loader) in UEFI.
The OS Loader is Microsoft Signed so it can run under secure-boot.
The OS Loader will be able to load Windows or Linux Kernel based on User's Selection (Something similar to GRUB)
Since I have built Linux Kernel as EFI Stub, I can load it from my OS Loader.
However,... |
Your OS Loader needs to include a copy of the public part (a.k.a. the certificate) of the key you'll be using to sign your own kernel. Any time that key changes, you will need to have your OS Loader re-signed by Microsoft.
You might want to study the source code of the shimx64.efi Secure Boot shim bootloader that is u... | UEFI Self-Signed Kernel loading from a Microsoft Signed OS Loader |
1,389,107,558,000 |
I am running Ubuntu 20.04, dual-booted with my Win10 on 1TB nvme M.2 SSD with 16GB of RAM. I initially made a 32GB swap partition while installing Ubuntu, but now, I wanted to utilize that space somewhere else. So, this is what I did. But ended up with longer boot times now. As suggested in the comments, I had to do R... |
Okay, I found the solution.When I run systemd-analyze time, I saw that kernel was taking around 45 seconds. This gave me an idea. Actually, I set up a hibernation sequence by following this. This was creating the problem when I wanted to boot my PC freshly (NOT from Hibernation). So, I just went to /etc/default/grub f... | I deleted my swap partition and ended up with longer boot times and no RESUME file |
1,389,107,558,000 |
The relationship between user and kernel virtual addresses has been discussed in a few questions before (links below), but as far as I understand it, the user process cannot read nor write to the Kernel addresses.
So, how does a user process share and receive data from the kernel?
Is it through memory? If so, where i... |
Let's consider an example: a simple x86 Hello World program for Linux, that prints a message to stdout and exits. It needs to pass a couple of data items to the kernel:
Text string to output,
Exit code.
Here's the assembly code (to be compiled with FASM):
format ELF executable
segment readable executable
; system c... | Syscalls: How does a user processs pass/receive data to/from the kernel? |
1,389,107,558,000 |
I just updated my Jessie installation to Stretch.
However I am a lost with Debian kernel versions.
According to the security tracker, the main repository version is 4.9.210-1 but the security version is 4.9.189-3+deb9u2.
Why is the security version lower?
Which one should I use?
I noticed that the LTS version is also... |
You should use whichever version is greater (and apt and co. will do the right thing for you), 4.9.210-1 in this case.
The reason this situation arises is that, when a point-release is being prepared, kernel updates will often go straight to stable, without going through security first. A reminder about the upcoming 9... | Why does the debian security kernel have a lower version than the main one? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.