Tag Info

Hot answers tagged

9

LVM is not overkill if you have 17 partitions. (IMHO) As for the partition limit, it just happens to be the default. Probably no one expected that many partitions on a device that used to have only a few megs. /usr/src/linux/Documentation/devices.txt: 179 block MMC block devices 0 = /dev/mmcblk0 First SD/MMC card ...


6

The timeout command will do this for you, i.e. timeout 10s command It will kill command after 10 seconds. Instead of s for seconds, you can also use m for minutes, h for hours or d for days.


5

I'm not sure if this is the one-and-done solution, but it worked for me. I had to create my "LVM" with striping options. lvcreate -L 217T -i2 -I64 -n lv_share VolGroup See 4.4.2. Creating Striped Volumes. Then I had to mount it with the -o inode64 option, as Mark mentioned. See 8.2. Mounting an XFS File System.


5

You would not necessarily see error messages in your systems log, when chromium is overstepping some limits. Try starting chromium from a terminal (rather than clicking on icon), so that you can see any potential error messages in the terminal. What you are describing seems to be similar to this bugreport. The solution should be to increase the limits ...


4

Apply the changes directly to a running process if you have prlimit installed (comes with util-linux-2.21) prlimit --pid <pid> --<limit>=<soft>:<hard> for example prlimit --pid 12345 --nofile=1024:2048 Refer here


4

The value can only be extended up to a theoretical maximum of 32768 for 32 bit systems or 4194304 for 64 bit. From man 5 proc: /proc/sys/kernel/pid_max This file (new in Linux 2.5) specifies the value at which PIDs wrap around (i.e., the value in this file is one greater than the maximum PID). The default value for this file, 32768, results in the ...


4

Increase hard/soft limit. /etc/security/limits.conf Thus far a limit of 8192 seems to be enough. 4096 have proven to be to small. Optionally only increase hard limit (if needed) and do: ulimit -Sn 8192 from shell in which Chrome is started. Note that the use of (the somewhat wide spread) way: sudo sh -c "ulimit -n 8192 && exec su -i ...


4

Probably a limit of the terminal device line discipline internal line editor buffer. You should be able to enter long lines by pressing Ctrl+D in the middle of it (so the currently entered part be sent to cat and the line editor flushed), or by disabling that line editor altogether. For instance, if using zsh: STTY=-icanon cat > file Note that then ...


3

You could use pv: </mnt/nfs/image.img pv -L 5m >/dev/sda The -L flag limits the throughput to 5 megabytes per second. pv also writes to the stdout so you have to redirect to the target with >.


3

I assume you're not describing your real-world scenario: not only do you want to copy hundreds of thousands of files, but you want to sleep for hundreds of thousands of seconds... wtf?!? Anyway: while IFS= read -r file1 IFS= read -r file2 do cp "$file1" "${file1##*/}-backup" cp "$file2" "${file2##*/}-backup" sleep 1 done < inputFile


2

You should probably take a look inside /etc/pam.d/sudo file and check if pam_limits.so is required in it or in any of the other files it includes. For example, the /etc/pam.d/sudo file in my system looks like below. #%PAM-1.0 auth required pam_env.so readenv=1 user_readenv=0 auth required pam_env.so readenv=1 envfile=/etc/default/locale ...


2

The solution you found was correct: iptables -A OUTPUT -m limit --limit 10/s -j ACCEPT But it is assuming a default policy of DROP or REJECT which is not usual for OUTPUT. You need to add: iptables -A OUTPUT -j REJECT Be sure to add this rule after the ACCEPT one. Either execute them in this order, or use -I instead of -A for the ACCEPT. Also, ...


2

I am not aware of any size limits for here-doc. I'm running kernel 3.9.1 and I've been experiencing the same issue here: when pasting large chunks of text in terminal some lines are truncated or missing. I found out (after some googling) that if you turn off line editing, pasting works fine (discussion here: Pasting large amounts of text into ...


2

You need to complete some more steps to increase max open files in ubuntu. Edit /etc/pam.d/common-session and append below line session required pam_limits.so Restart your system to apply the changes. You can set limits to all users on system by adding below lines. * soft nofile 10000 * hard nofile 30000 And reboot the ...


2

scp itself has no such feature. With GNU parallel you can use the sem command (from semaphore) to arbitrarily limit concurrent processes: sem --id scp -j 50 scp ... For all processes started with the same --id, this applies a limit of 50 concurrent instances. An attempt to start a 51st process will wait (indefinitely) until one of the other processes ...


1

The groups defined with the @group syntax in the limits.conf file can match groups defined in any group database back-end, i.e. files (/etc/group), nis, ldap, and whatever else nsswitch.conf might support. Assigning a group to an ldap user entry is not done by locating his/her entry somewhere in the hierarchy (like under ou=student in your question) but by ...


1

Logrotate has the rotate parameter that specifies how many logs to save.


1

Sorry: I have not noticed the "txt file" with the "hundreds thousands of lines". This is just a naif solution... for a in test*; do ls -l $a; if [[ $((i++ % 2)) != 0 ]]; then sleep 1; fi; done Update: Explanation and (partially update to txt file with filenames). ...reformating: for a in `cat file.txt` do cp "$a" "$a-backup" ## REPLACE ...


1

Split urls into one file per host. Then run 'parallel -j5' on each file. Or sort urls and insert a delimiter '\0' when a new host is met, then split on '\0' and remove '\0' while passing that as a block to a new instance of parallel: sort urls.txt | perl -pe '(not m://$last:) and print "\0";m://([^/]+): and $last=$1' | parallel -j10 --pipe --rrs -N1 ...


1

ulimit is trying to increase the the maximum usage of those resources above that configured for the entire system by sysctl. Furthermore it's not actually possible to configure Linux with an unlimited number of some resources, such as open files. Note that unlimiting all resources is not a good idea -- do you really want a few gigabytes of core dump should ...


1

It depends on your systems cryptographic hash used to store the passwords. do sudo cat /etc/shadow and look for the username followed by $number$ $1$ means you are using MD5 $2$ or $2a$ means you are using blowfish $5$ means you are using SHA-256 $6$ means you are using SHA-512 for example, sha-512 would give you a 2^512 max length. sha-256, 2^256th. ...


1

Thanks to @hrv for the insight. I've confirmed after a quick experiment: when the /etc/pam.d/sudo included pam_limits.so, then running sudo did set them, and when the /etc/pam.d/sudo did not include them, then running sudo didn't set them. I checked a couple of different machines and one of them did include pam_limits.so within /etc/pam.d/sudo while the ...


1

There are two settings that limit the number of open files: a per-process limit, and a system-wide limit. The system-wide limit is set by the fs.file-max sysctl, which can be configured in /etc/sysctl.conf (read at boot time) or set on the fly with the sysctl command or by writing to /proc/sys/fs/file-max. The per-process limit is set by ulimit -n. The ...


1

sudo ulimit fails because ulimit is a built-in and sudo takes an executable as the first argument which it will search in PATH. sudo cd / fails for the same reason. A workaround is to do: sudo sh -c "ulimit -n 65535 && exec su $LOGNAME" which sets the ulimit, and restore the original user removing the sudo privileges as desired. Taken from this ...


1

For a large or a considerable range of ip's my recommendation for you is use ipset If want to block an entire country ip block you can use the geoip module for iptables.



Only top voted, non community-wiki answers of a minimum length are eligible