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


9

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 ...


8

Check this URL: http://www.kernel.org/pub/linux/kernel/


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

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 ...


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 : ...


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.


5

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: ...


5

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 ...


5

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 ...


5

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 ...


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 ...


4

Run it with nice -n 20 ionice -c 3 That will make it use the remaining CPU cycles and access to I/O not used by other processes. For RAM, all you can do is kill the process when it uses more than the amount you want it to use (using ulimit).


4

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 ...


4

You may see some slight differences in resource usage from one distro to another when using the same desktop configured in the same way, but it should not be significant. In other words, as Ulrich said, no there is not a reason to prefer one to the other from this point of view!


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

It says right there in the article: This has no effect on Linux. man setrlimit says it used to work only in ancient versions. The setrlimit man page says: RLIMIT_RSS Specifies the limit (in pages) of the process's resident set (the number of virtual pages resident in RAM). This limit has effect only in Linux 2.4.x, x < ...


4

You can trace the system calls that a program makes. This is the usual method to find out what files it accesses. The tool to do this is called truss in many Unix systems, dtruss on OSX, strace on Linux. I'll describe Linux usage here; check the manual on other systems. The simplest form is strace myprogram arg1 arg2 This prints a log of all the system ...


3

Go into bios and underclock the cpu. - No need for cleverness.


3

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*


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 ...


2

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


2

You should use a combination of lsof (to find out which process opened which file or port) and strace (to attach to and follow a process's system calls). Use the man pages for each to find out how to use them in your case


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

Here are some points which may help you a bit to diagnose the problem: Run free command to see memory usage Run top and then hit M to sort by memory usage or P to sort by CPU usage to see which program uses your resources Be sure that at /etc/fstab is a line to mount swap - you see swap usage after free look at /var/log/messages or in case you are using ...



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