Tag Info

Hot answers tagged

24

The idea behind this is to ensure you don't receive packets targeted for the previous program listening on that port. This TIME_WAIT state is defined in RFC793 as two times the maximum segment lifetime. I don't know about other Operating Systems but I assume that all of these have some kind of similar behavior. A workaround for this problem is to set ...


10

I suggest these two: http://www.oldlinux.org/ and a more straightforward one from this site that contain Linux kernel 0.01, 0.10, 0.11,...,0.98: http://www.oldlinux.org/Linux.old/ and the other: http://www.codeforge.com/article/170371


9

The man page you refer to comes from the procps version of top. But you're on an embedded system, so you have the busybox version of top. It looks like busybox top calculates %MEM as VSZ/MemTotal instead of RSS/MemTotal. The latest version of busybox calls that column %VSZ to avoid some confusion. commit log


8

I don't know that limiting CPU to the whole system is something that's possible without a lot of hacking, but you can easily limit the amount of CPU used by a single process using cpulimit The only way I can think of you being able to use this effectively is writing a wrapper script (can't really call it a script, it's so small) for the applications which ...


6

Archive.org hosts a Git repo with the complete history of Linux, made by grafting 3 repositories together. You'd probably need to do a git pull to update it with the most recent changes.


6

Improvement #1 - Loops Your looping structure seems completely unnecessary if you use brace expansions instead, it can be condensed like so: $ more pass.bash #!/bin/bash for str in $(echo {a..z}{a..z}{a..z}); do pass=$(openssl passwd -salt $1 $str) if [[ "$pass" == "$2" ]]; then echo "Password: $str" exit; fi done # vim: set nolist ts=2 : ...


6

Your script isn't just sitting on its hands! It's probably waiting for a resource other than the CPU; perhaps it's manipulating lots of files and waiting for the disks, or sending lots of stuff over the network and waiting for that. Look at the aggregate resource usage lines at the top of top and you'll see something like %Cpu(s): 28.6 us, 28.6 sy, 0.0 ...


5

The superuser or any process with the CAP_SYS_ADMIN or CAP_SYS_RESOURCE capabilities are not affected by that limitation, that's not something that can be changed. root can always fork processes. If some software is not trusted, it should not run as root anyway.


5

To make this change pervasive you'll need to add these limits to the entire environment. Changes using the ulimit command are only to the current environment. NOTE: This will have no effect on the root user! Example Edit this file: vi /etc/security/limits.conf and add entries to the file limiting the number of processes (nproc) that a specific user or ...


5

The Unix Heritage Society has a load of old Genuine Unix source code. The source code page has Bell Labs Unix from Version 1 through 6, 32V, System III, some or all of the BSDs, pointers to Linux progenitor Minix.


4

You can explore the resources of an existing window with editres. That's an interactive program, which lets you browse the resource tree, and find the location of a widget in that tree by clicking on the widget in the application. You can even modify a resource if the application supports it. That, however, requires that the application supports the Editres ...


4

xrdb -query lists the resources that are explicitly loaded on the X server. appres lists the resources that an application would receive. This includes system defaults (typically found in a directories like /usr/X11R6/lib/X11/app-defaults or /etc/X11/app-defaults) as well as the resources explicitly set on the server with xrdb. You can restrict a particular ...


4

There is a difference as to if resources are loaded into an X11 server and they're loaded by a client. For instance, you could change the server's resources after launching a client. To get the current server resources, you can use 'xrdb -query -all'. For getting the current client resources, I'm not aware of a solution, but editres(1) will allow you to ...


4

You don't need more (or cat) if you have the list of file you need to grep: just give grep the files as an argument (no need to pipe the data through a second tool): grep -i abc *.txt | wc -l The main difference is that find will not only list the files in the current directory (as the shell expansion of *.txt) but it will recurse into subdirectories too: ...


3

Your script is probably using more than 3% as explained by Flup but you are also wasting a lot of time spawning a copy of openssl every time you want to create a password (which is probably the main reason for the missing cpu time). If you have a multicore/threaded machine you will also not be able to stress more than a single thread of execution with your ...


3

Generally speaking, I don't think you can unfortunately. (Some operating systems might provide for it, but I'm not aware of the ones I know supporting this.) Reference doc for resource limits: getrlimit from POSIX 2008. Take for example the CPU limit RLIMIT_CPU. If the process exceeds the soft limit, it gets sent a SIGXCPU If the process exceeds the hard ...


2

It is likely that rstpd has a lot of dynamic libraries linked to it, but they have not been loaded into memory yet. See Why the value of VSIZE in top is different from the value of VSZ (Virtual set size) in ps? What does ps aux show for that process?


2

I think the confusion comes from the fact that the underlying system call that ulimit wraps is called setrlimit. excerpt from the ulimit man page The ulimit() function shall control process limits. The process limits that can be controlled by this function include the maximum size of a single file that can be written (this is equivalent to using ...


2

Another alternative that hasn't been mentioned is cpufrequtils, which I have installed and used on my laptop with Debian 6. It allows you to change the algorithm (governor, in cpufrequtils terminology) that the kernel uses to scale the clock rate up and down in response to load - in particular, the userspace governor allows you to lock the frequency at ...


1

In addition to the various implementation optimizations in @slm's answer, there is a huge algorithmic optimization to make. (There may also be some cryptanalytic attacks, I'm not sure how strong the UNIX crypt algorithm is, but that is probably beyond the scope of a shell script) The problem you're trying to solve was probably described as "brute force a ...


1

renice is the utility to change niceness and increase or decrease priority, but you need root to make something more aggressive. Start block-paste: Terminal If you're at a terminal you can use renice renice [-n] priority [[-p] pid ...] [[-g] pgrp ...] [[-u] user ...] A simple example would be renice 8 31043 31043: old priority 5, new priority 8 ...


1

I'm giving you a link to quite a good explanation regarding Apache multi processing models and PHP It is difficult to say what is best in your situation since it depends on many factors (are you a shared server, should apache runs as separate users depending on vhost, ). The link is to google's cached version of this page since their server is not working ...


1

I don't have "solid data", but consider this. more is a (primitive) filter for paging through text one screenful at a time. It's intent is to be used interactively "for crt viewing". So even though you are sending the output to a pipe, it is still using the memory and CPU resources to display the each file to you with the filtering features more offers. It ...


1

I think "cpulimit" is best way to control cpu usage per process. cpulimit does not act on the nice value or other scheduling priority stuff, but on the real cpu usage. cpulimit Install cpulimit on Linux: yum install cpulimit To limit CPU usage of the process called nginx to 40%, enter: cpulimit -e nginx -l 40 To limit CPU usage of the process to 40% ...


1

It only looks at first sight like a attempt for the useless use of cat award, but if we cat all files, before invoking grep: cat *.txt | grep -ci abc grep counts the sum for you. Since you like to traverse subdirectories (you like to, don't you?), you can do it there too: find -name "*.txt" -exec cat {} + | grep -ci abc


1

You can limit your CPU cores automatically based on temperature using the script temp_throttle. It can run in the background while you focus on more important things. An example on how to run: sudo ./temp_throttle.sh 80 # Will limit CPU cores when 80C is reached. *Disclaimer- I am the author and maintainer of temp_throttle*


1

Visit this page, it explains how to install and use cpulimit in Debian and Ubuntu: http://www.howtoforge.com/how-to-limit-cpu-usage-of-a-process-with-cpulimit-debian-ubuntu


1

This will highly depend on what is happening on the system besides your elisp program running, because the bash program (and all required libs) may or may not be cached at that moment in time. Same goes for awk. In the case where you call bash from bash, the bash must already have been loaded into memory.


1

I don't know sar (Is this it?), from what you're describing, it might be advisable to have a look at the whole RRDtool complex. You could for example use collectd to collect the data in rrd ("Round-Robin Database") files; where data means whatever you want to know the usage of. There're lots of plugins already, also for CPU, memory, disk and network ...


1

I am currently doing some work on the same issue. I have been able to have a partial solution to it. I have used audit susbsystem. You can track the work at [1]. [1] https://github.com/PaulDaviesC/Logging-limits.conf



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