Questions tagged [kernel]

Everything about Unix kernels: development, configuration, compilation, design, etc.

Filter by
Sorted by
Tagged with
396 votes
1 answer
894k views

How do you empty the buffers and cache on a Linux system?

Prior to doing some benchmarking work how would one free up the memory (RAM) that the Linux Kernel is consuming for its buffers and cache? Note that this is mostly useful for benchmarking. Emptying ...
slm's user avatar
  • 369k
171 votes
6 answers
176k views

How do I read from /proc/$pid/mem under Linux?

The Linux proc(5) man page tells me that /proc/$pid/mem “can be used to access the pages of a process's memory”. But a straightforward attempt to use it only gives me $ cat /proc/$$/mem /proc/self/...
Gilles 'SO- stop being evil''s user avatar
76 votes
3 answers
85k views

What defines the maximum size for a command single argument?

I was under the impression that the maximum length of a single argument was not the problem here so much as the total size of the overall argument array plus the size of the environment, which is ...
Graeme's user avatar
  • 34k
91 votes
4 answers
26k views

What are the responsibilities of each Pseudo-Terminal (PTY) component (software, master side, slave side)?

I am trying to figure out how a tty works1 (the workflow and responsibilities of each element). I have read several interesting articles about it, but there are still some blurry areas. This is what I ...
Pierre-Jean's user avatar
  • 2,239
43 votes
4 answers
9k views

What exactly happens when I execute a file in my shell?

So, I thought I had a good understanding of this, but just ran a test (in response to a conversation where I disagreed with someone) and found that my understanding is flawed... In as much detail as ...
Josh's user avatar
  • 8,419
89 votes
3 answers
42k views

What happens when I run the command cat /proc/cpuinfo?

What happens when I write cat /proc/cpuinfo. Is that a named pipe (or something else) to the OS which reads the CPU info on the fly and generate that text each time I call it?
slm's user avatar
  • 369k
330 votes
8 answers
701k views

How to reload udev rules without reboot?

How should one reload udev rules, so that newly created one can function? I'm running Arch Linux, and I don't have a udevstart command here. Also checked /etc/rc.d, no udev service there.
daisy's user avatar
  • 54.4k
100 votes
2 answers
116k views

What is kernel ip forwarding?

I have seen on many blogs, using this command to enable IP forwarding while using many network security/sniffing tools on linux echo 1 > /proc/sys/net/ipv4/ip_forward Can anyone explain me in ...
Madhur Ahuja's user avatar
  • 1,499
37 votes
4 answers
43k views

How to blacklist a correct bad RAM sector according to MemTest86+ error indication?

MemTest86+ (the version included with Ubuntu 13.04) says Failing address: 002f796c48 - 759.5 MB What should I specify in the memmap kernel parameter to bypass this area? I've tried running ...
Ivan's user avatar
  • 17.6k
116 votes
3 answers
185k views

What is difference between User space and Kernel space?

Is Kernel space used when Kernel is executing on the behalf of the user program i.e. System Call? Or is it the address space for all the Kernel threads (for example scheduler)? If it is the first one,...
Poojan's user avatar
  • 1,271
122 votes
3 answers
71k views

Why is swappiness set to 60 by default?

I just read some stuff about swappiness on Linux. I don't understand why the default is set to 60. According to me this parameter should be set to 10 in order to reduce swap. Swap is on my hard ...
Hugo's user avatar
  • 2,429
49 votes
2 answers
138k views

Turning off power to usb port. Or turn off power to entire usb subsystem

I have a usb lamp which I specifically bought in order to turn it off programmatically at a certain time, thus I need to remove the power to its usb port. I believe I have a usb-hub at usb6. The lamp ...
user84207's user avatar
  • 901
42 votes
8 answers
33k views

How does Linux kernel compare to microkernel architectures?

I read once that one advantage of a microkernel architecture is that you can stop/start essential services like networking and filesystems, without needing to restart the whole system. But considering ...
tshepang's user avatar
  • 65.5k
24 votes
2 answers
37k views

Description of kernel.printk values

Between Debian 5 and 6, the default suggested value for kernel.printk in /etc/sysctl.conf was changed from kernel.printk = 4 4 1 7 to kernel.printk = 3 4 1 3. I understand that the first value ...
Zoredache's user avatar
  • 3,630
73 votes
5 answers
60k views

What is the difference between the following kernel Makefile terms: vmLinux, vmlinuz, vmlinux.bin, zimage & bzimage?

While browsing through the Kernel Makefiles, I found these terms. So I would like to know what is the difference between vmlinux, vmlinuz, vmlinux.bin, zimage & bzimage?
Navaneeth Sen's user avatar
38 votes
3 answers
15k views

What does the vm.swappiness parameter really control?

Per the kernel documentation: This control is used to define how aggressive the kernel will swap memory pages. Higher values will increase aggressiveness, lower values decrease the amount of swap. ...
phemmer's user avatar
  • 71.6k
30 votes
1 answer
4k views

Why isn't a straightforward 1/5/15 minute moving average used in Linux load calculation?

Until recently I thought the load average (as shown for example in top) was a moving average on the n last values of the number of process in state "runnable" or "running". And n would have been ...
user368507's user avatar
  • 2,163
30 votes
4 answers
14k views

Are Linux kernel threads really kernel processes?

I've read in many places that Linux creates a kernel thread for each user thread in a Java VM. (I see the term "kernel thread" used in two different ways: a thread created to do core OS work and a ...
Ellen Spertus's user avatar
24 votes
2 answers
11k views

What's the use of having a kernel part in the virtual memory space of Linux processes?

I found a similar question but still it doesn't answer my questions Do the virtual address spaces of all the processes have the same content in their "Kernel" parts? First off, considering ...
John P's user avatar
  • 1,103
96 votes
14 answers
223k views

How to unload kernel module 'nvidia-drm'?

I'm trying to install the most up-to-date NVIDIA driver in Debian Stretch. I've downloaded NVIDIA-Linux-x86_64-390.48.run from here, but when I try to do sudo sh ./NVIDIA-Linux-x86_64-390.48.run as ...
Rodrigo's user avatar
  • 1,812
92 votes
6 answers
101k views

What is the difference between kernel drivers and kernel modules?

When I do a lspci -k on my Kubuntu with a 3.2.0-29-generic kernel I can see something like this: 01:00.0 VGA compatible controller: NVIDIA Corporation G86 [Quadro NVS 290] (rev a1) Subsystem: ...
JohnnyFromBF's user avatar
  • 3,486
68 votes
9 answers
43k views

Who's consuming my inotify resources?

After a recent upgrade to Fedora 15, I'm finding that a number of tools are failing with errors along the lines of: tail: inotify resources exhausted tail: inotify cannot be used, reverting to ...
larsks's user avatar
  • 33.9k
44 votes
2 answers
70k views

How to get back from "testing" to "stable" - Kernel downgrade

currently I am having lot's of fun with apt-get - and the bad thing is, it was my own fault. I had enabled the testing packages in /etc/apt/sources.list to install a certain package. And I told my ...
BurninLeo's user avatar
  • 633
41 votes
3 answers
96k views

How is an Interrupt handled in Linux?

I just know that Interrupt is a hardware signal assertion caused in a processor pin. But I would like to know how Linux OS handles it. What all are the things that happen when an interrupt occurs?
Navaneeth Sen's user avatar
41 votes
5 answers
163k views

yum installs kernel-devel different from my kernel version

I am attempting to install the VMWare player in Fedora 19. I am running into the problem that multiple users have had where VMware player cannot find the kernel headers. I have installed the kernel-...
Fantastic Mr Fox's user avatar
40 votes
6 answers
66k views

How does a kernel mount the root partition?

My question is with regards to booting a Linux system from a separate /boot partition. If most configuration files are located on a separate / partition, how does the kernel correctly mount it at boot ...
Mr. Shickadance's user avatar
36 votes
5 answers
35k views

How can same fd in different processes point to the same file?

Say I have process 1 and process 2. Both have a file descriptor corresponding to the integer 4. In each process however the file descriptor 4 points to a totally different file in the Open File Table ...
Pithikos's user avatar
  • 3,274
28 votes
5 answers
148k views

Determining cause of Linux kernel panic

I'm running an Ubuntu 12.04 derivative (amd64) and I've been having really strange issues recently. Out of the blue, seemingly, X will freeze completely for a while (1-3 minutes?) and then the system ...
Naftuli Kay's user avatar
  • 39.5k
27 votes
1 answer
17k views

What does a kernel source tree contain? Is this related to Linux kernel headers?

In books, I typically read references to the Linux Source Tree at /usr/src/linux with the usual set of subdirectories (arch, block, crypto, ...). I was expecting this tree to contain the binary files ...
gnometorule's user avatar
27 votes
4 answers
55k views

How can I reserve a block of memory from the Linux kernel?

I have a device that needs a block of memory that is reserved solely for it, without the OS intervening. Is there any way to tell BIOS or the OS that a block of memory is reserved, and it must not ...
Nathan Fellman's user avatar
24 votes
5 answers
65k views

How do I safely delete old kernel versions in CentOS 7?

I might be encountering odd symptoms resulting from competing kernels in CentOS 7. So how do I safely delete the old kernels? And how do I know which kernel is the newest one? Below is the ...
CodeMed's user avatar
  • 5,199
12 votes
2 answers
5k views

When was `relatime` made the default?

What is the first Linux kernel release to set relatime as the default mount option?
user avatar
12 votes
3 answers
8k views

How to make the kernel section 9 manpages which document functions, data structures, and headers?

The kernel sources contain functions and data structures which are documented, for instance in panic.c: /** * panic - halt the system * @fmt: The text string to print * * Display a message, ...
kakeh's user avatar
  • 483
6 votes
1 answer
8k views

Why is there no rootfs file system present on my system?

The linux kernel documentation claims: Rootfs is a special instance of ramfs (or tmpfs, if that's enabled), which is always present in 2.6 systems. You can't unmount rootfs … On all linux ...
Georg Schölly's user avatar
282 votes
4 answers
41k views

How does a Segmentation Fault work under-the-hood?

I can't seem to find any information on this aside from "the CPU's MMU sends a signal" and "the kernel directs it to the offending program, terminating it". I assumed that it probably sends the ...
Braden Best's user avatar
  • 2,213
129 votes
10 answers
353k views

Set the default kernel in GRUB

How can I pick which kernel GRUB 2 should load by default? I recently installed a Linux real-time kernel and now it loads by default. I'd like to load the regular one by default. So far I only managed ...
TomTom's user avatar
  • 2,583
72 votes
11 answers
159k views

disable transparent hugepages

We are installing SAP HANA in a RAID machine. As part of the installation step, it is mentioned that, To disable the usage of transparent hugepages set the kernel settings at runtime with echo ...
Ramesh's user avatar
  • 39.2k
57 votes
3 answers
85k views

How much RAM does the kernel use?

This question is motivated by my shock when I discovered that Mac OS X kernel uses 750MB of RAM. I have been using Linux for 20 years, and I always "knew" that the kernel RAM usage is dwarfed by X (...
sds's user avatar
  • 1,686
54 votes
7 answers
43k views

Linux Kernel: Good beginners' tutorial [closed]

I'm interested in modifying the kernel internals, applying patches, handling device drivers and modules, for my own personal fun. Is there a comprehensive resource for kernel hacking, intended for ...
Adam Matan's user avatar
  • 2,583
34 votes
1 answer
60k views

How to assign USB driver to device

This question is two-fold: First, how do you manually detach a driver from a USB device and attach a different one? For example, I have a device that when connected automatically uses the usb-...
linsek's user avatar
  • 450
30 votes
4 answers
10k views

Can I list the filesystems a running kernel can support?

I'm trying to detect what filesystems a kernel can support. Ideally in a little list of their names but I'll take anything you've got. Note that I don't mean the current filesystems in use, just ones ...
Oli's user avatar
  • 16k
22 votes
6 answers
14k views

Can Linux "run out of RAM"?

I saw several posts around the web of people apparently complaining about a hosted VPS unexpectedly killing processes because they used too much RAM. How is this possible? I thought all modern OS' ...
themirror's user avatar
  • 6,968
13 votes
2 answers
13k views

How to block drivers built-into Kernel, i.e. drivers who are not a module

I configured and compiled Linux kernel with nouveau driver built-into kernel, i.e. with <*> as opposed to <M> when doing make menuconfig inside Linux kernel source directory. Now, I ...
Megidd's user avatar
  • 1,539
12 votes
5 answers
14k views

Why do people call Linux a kernel rather than an OS?

Why do people refer to Linux as a kernel rather than an operating system? To the best of my knowledge, the kernel is one part of the operating system.
user2720323's user avatar
  • 3,589
1 vote
2 answers
2k views

What's inside the kernel part of virtual memory of 64 bit linux processes?

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 ...
OneAndOnly's user avatar
56 votes
4 answers
112k views

how is page size determined in virtual address space?

Linux uses a virtual memory system where all of the addresses are virtual addresses and not physical addresses. These virtual addresses are converted into physical addresses by the processor. To ...
JohnMerlino's user avatar
  • 6,091
52 votes
8 answers
43k views

Where does uname get its information from?

Where does uname really get its information from? I figure this is something that should be straightforward. Unfortunately, I can't find any header containing just that information. Say someone ...
user237251's user avatar
46 votes
4 answers
146k views

"Argument list too long": How do I deal with it, without changing my command?

When I run a command like ls */*/*/*/*.jpg, I get the error -bash: /bin/ls: Argument list too long I know why this happens: it is because there is a kernel limit on the amount of space for arguments ...
D.W.'s user avatar
  • 3,991
32 votes
1 answer
52k views

How to use Linux kernel driver bind/unbind interface for USB-HID devices?

First background. I am developing a driver for Logitech game-panel devices. It's a keyboard with a screen on it. The driver is working nicely but by default the device is handled by HID. In order to ...
ali1234's user avatar
  • 1,094
22 votes
4 answers
35k views

Why is kworker consuming so many resources on Linux 3.0.0-12-server?

Last Friday I upgraded my Ubuntu server to 11.10, which now runs with a 3.0.0-12-server kernel. Since then the overall performance has dropped dramatically. Before the upgrade the system load was ...
mailq's user avatar
  • 403

1
2 3 4 5
8