Tag Info

New answers tagged

5

If the system supports process accounting, and accounting is enabled, then there may be records available in the process accounting file, e.g. on RedHat Linux: $ grep -q BSD_PROCESS_ACCT=y /boot/config-* && echo hooray hooray $ sudo touch /var/log/pacct $ sudo accton /var/log/pacct $ ... $ sudo accton # turn it off Parsing the acct(5) file is ...


0

Self-answer: I was right in checking the temperature from the BIOS, but wrong in giving it little importance. The error in question was indeed caused by the CPU overheating, it seems. In fact, when I reduced the target temperature for the case fan to reach (by 5 °C), the fan of course started working harder and the kernel panic didn't occur again in weeks.


0

We went with cgroups in the end, since there really doesn't seem to be any other approach that would accomplish this. Cgroups allow CPU utilization limiting through the kernel scheduler, using cpu.cfs_period_us and cpu.cfs_quota_us. This avoids the explicit specification of CPU cores.


0

Probably, you can't. cpulimit's logic is pretty simple, it takes pid of process and simply sending its signal kill -STOP $PID, thereafter kill -CONT $PID, and again, and again, and again, and again...... And measuring the cpu-usage to calculate delay between STOP and CONT. In your case, pstree of complex bash-script would take N*x screens of console. I ...


0

You can try use video ram as a swap space. Read here: https://wiki.archlinux.org/index.php/Swap_on_video_ram Don't know how it working though.


-1

I would say that proposed solutions are overkill. This should do... echo $(date +'%Y-%m-%d %H:%M:%S,' && uptime | awk '{print "CPU: " $9*100 "%"}' ) >> myfile.csv Of course put this in while loop together with desired sleep time. It takes CPU load from "uptime" command, which is equal as "top" load and appends it to a file. BR, Neven


0

You can do this via vmstat: #!/usr/bin/perl open VMSTAT, "vmstat 5|"; <VMSTAT>; <VMSTAT>; # skip the header while (<VMSTAT>) { @now = split; ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime (time); printf "%d-%02d-%02d %02d:%02d:%02d,%d%\n", $year+1900, $mon, $mday, $hour, $min, $sec, $now[12] + ...


0

1) Let's compare the following two versions: while sleep 0.1 ; do top -d 10 | grep Cpu ; done #versus batch mode while sleep 0.1 ; do top -d 10 -bn1 | grep Cpu ; done You will see that in the first example the time is defined by top's update interval ( set to 10 seconds via -d 10), while in the second the sleep command in the while loop is the limit. Note ...


0

Shares are relative among groups. For example, assigning 25% of CPU means that a cgroup will observe "at least" that much of CPU, but it can use more. From the red hat docs on cgroups: Note that shares of CPU time are distributed per all CPU cores on multi-core systems. Even if a cgroup is limited to less than 100% of CPU on a multi-core system, it may ...


8

As mentioned in a comment and without seeing any of your code or other information (which would not be on-topic here anyway) all I can say is your program appears to be IO bound. The means while your calculations could use more of your CPU, they are having to wait on data and spending many cycles waiting rather than calculating. This can be due to the way ...


2

That pretty much means your apps are IO bound--your hardrive/network, etc. can't keep up with your processor and consequently, the processor spends a lot of time waiting on IO data, not using its full potential. If the IO your apps depend on is the network and you aren't downloading at your full bandwith, you might get an efficiency increase by adding more ...


3

What you're asking is the same kind of question as "Which is the better car? A Lotus Elise or a Corvette? Well, that depends entirely on your personal use-case! The Elise is a noisy, seemingly uncomfortable car with a small 1.8L engine that only does 127mph, whereas the Corvette is a less noisy car, comfortable, with a 6.2L engine that does 199mph. In ...


1

On machine A you're running inside a KVM VM, so you'll only see what the VM was configured with. The underlying CPU is a Xeon E5-2650v2 with a base frequency of 2.6GHz (family 6, model 62). On machine B you're running on the bare metal. The CPU is a Core i7-3960X with a base frequency of 3.3GHz (family 6, model 45). You can compare the CPU characteristics ...


0

In short: If you start processing as soon as you receive data and you can process data faster than you receive it, the total processing time will be smaller on the faster interface. But this is almost never the case. If the processing speed is faster than the reception speed: If you start processing when you receive the first bits: You will end the ...


0

You can't set the affinity for all invocations of an executable. The affinity is managed by the kernel and inherited from parent process to child process, there's no mechanism that changes the affinity of a process when an executable is executed. If you want all invocations of gzip to run on CPU 1, put a wrapper script called gzip ahead of the real one in ...



Top 50 recent answers are included