Questions tagged [resources]
92 questions
63
votes
2 answers
Running dd. Why resource is busy?
I just formatted microSD card, and would like to run a dd command. Unfortunately dd command fails:
$ sudo dd bs=1m if=2016-02-26-raspbian-jessie-lite.img of=/dev/rdisk2
dd: /dev/rdisk2: Resource busy
$
Everyone on the internet says I need to…
oldhomemovie
- 1,627
- 2
- 13
- 18
50
votes
5 answers
How can I increase open files limit for all processes?
I can use ulimit but I think that only affects my shell session. I want the limit increased for all processes. This is on Red Hat.
user5554
30
votes
1 answer
How to use cgroups to limit all processes except whitelist to a single CPU?
There is a guide to cgroups from Red Hat which is maybe sort of kind of helpful (but doesn't answer this question).
I know how to limit a specific process to a specific CPU, during the command to start that process, by:
First, putting the following*…
Wildcard
- 35,316
- 26
- 130
- 258
29
votes
1 answer
Why does it take up to several minutes to clean a listening TCP port after a program dies?
If I kill a program that is listening on a TCP port, it takes up to several minutes until the port is reclaimed by the system and usable again. I've seen several Q/A mentioning this phenomenon, but without an explanation. Why does that happen, why…
Petr
- 1,624
- 2
- 19
- 35
24
votes
6 answers
Is there a way to limit overall CPU consumption?
My laptop (an HP with an i3 chip) overheats like crazy every time I run a resource heavy process (like a large compilation, extracting large tarballs or ... playing Flash).
I am currently looking into some cooling solutions but got the idea of…
rahmu
- 19,673
- 28
- 87
- 128
24
votes
3 answers
How to limit the total resources (memory) of a process and its children
There are plenty of questions and answers about constraining the resources of a single process, e.g. RLIMIT_AS can be used to constrain the maximum memory allocated by a process that can be seen as VIRT in the likes of top. More on the topic e.g.…
jpe
- 305
- 1
- 2
- 10
22
votes
2 answers
What do top's %MEM and VSZ mean?
I'm working on an embedded Linux system (128MB RAM) without any swap partition. Below is its top output:
Mem: 37824K used, 88564K free, 0K shrd, 0K buff, 23468K cached
CPU: 0% usr 0% sys 0% nic 60% idle 0% io 38% irq 0% sirq
Load…
djf
- 1,033
- 2
- 9
- 17
21
votes
3 answers
Resource usage using pipe and here string
We can get the same result using the following two in bash,
echo 'foo' | cat
and
cat <<< 'foo'
My question is what are the difference between these two as far as the resources used are concerned and which one is better ?
My thought is that while…
utlamn
- 345
- 2
- 5
19
votes
3 answers
ulimit & rlimit in Linux, are they the same thing?
I see people use the terms ulimit & rlimit interchangeably, can I say they are referring to the same thing?
Ryan
- 413
- 2
- 4
- 8
17
votes
1 answer
Is it wrong to think of "memfd"s as accounted "to the process that owns the file"?
https://dvdhrm.wordpress.com/2014/06/10/memfd_create2/
Theoretically, you could achieve [memfd_create()] behavior without introducing new syscalls, like this:
int fd = open("/tmp", O_RDWR | O_TMPFILE | O_EXCL, S_IRWXU);
(Note, to more portably…
sourcejedi
- 48,311
- 17
- 143
- 296
16
votes
2 answers
How to prevent fork bomb?
To prevent fork bomb I followed this http://www.linuxhowtos.org/Tips%20and%20Tricks/ulimit.htm
ulimit -a reflects the new settings but when I run (as root in bash) :(){ :|:&};: the VM still goes on max CPU+RAM and system will freeze.
How to ensure…
user44441
- 291
- 1
- 2
- 7
14
votes
1 answer
Does 'ulimit -m' not work on (modern) Linux?
This article claims that the -m flag to ulimit does nothing in modern Linux. I can find nothing else to corroborate this claim. Is it accurate?
You may try to limit the memory usage of a process by setting the maximum resident set size (ulimit…
Flimzy
- 478
- 6
- 22
14
votes
3 answers
Is there a way to find all X resources an application uses?
I'm looking for a way to automatically list all X resources that are used in an application. To give you an example, for xterm I'd expect a list similar to the following but with all the resources that are used by
xterm.
background
foreground
…
bbuser
- 241
- 2
- 4
11
votes
4 answers
Where can I find the historical source code of the Linux sources
I want to do research on the evolution of Linux.
Therefore it would be nice if I could download the sources of Linux at several moments in time (from 1991 till now).
Is there a site where one can find those sources?
Similar sites for other Unix…
Willem Van Onsem
- 501
- 6
- 14
11
votes
2 answers
How to check, which limit was exceeded? (Process terminated because of ulimit. )
Let's assume process runs in ulimited environment :
(
ulimit ... -v ... -t ... -x 0 ...
./program
)
Program is terminated.
There might be many reasons : memory/time/file limit exceeded ; just simple segfault ; or even normal termination with…
Grzegorz Wierzowiecki
- 13,865
- 23
- 89
- 137