Re: [opensuse] how to burn my cpu?



Thu, 24 May 2007, by tuxebi@xxxxxx:

Hi,

I am looking for an app that makes my CPU as hot as can be.

Download and burn UBCD.
That has a good collection of tests for (almost) every piece of
hardware you can think of.

In the mean time, here's something that keeps the CPU busy for a
bit:

/*
* load50.c -- a simple busy-looping tool.
*
* Obviously, this runs with any kernel and any Unix
*/

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

int main(int argc, char **argv)
{
int i, load=50;

if (argc==2) {
load=atoi(argv[1]);
}
printf("Bringing load to %i\n",load);

for (i=0; i<load; i++)
if (fork()==0)
break;

while(1)
;
return 0;
}

I picked it up on news many moons ago, don't remember the author.

Theo
--
Theo v. Werkhoven Registered Linux user# 99872 http://counter.li.org
ICBM 52 13 26N , 4 29 47E. + ICQ: 277217131
SUSE 10.2 + Jabber: muadib@xxxxxxxxxxxxxxxx
Kernel 2.6.18 + See headers for PGP/GPG info.
Claimer: any email I receive will become my property. Disclaimers do not apply.
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx



Relevant Pages

  • [PULL] x86 cpumask updates (plus a few generic pre-req cpumask cleanups)
    ... numa, cpumask: move numa_node_id default implementation to topology.h, fix ... commit 4c50d9ea9ca9e46b65aeffed3e0d6f54ff38c8d4 ... int err; ... void sync_buffer(int cpu); ...
    (Linux-Kernel)
  • [PATCH] spelling fixes: arch/ia64/
    ... do this dynamically on cpu arrival/departure. ... static int lsapic_retrigger ... - * Indices in rm map range from 1..num_entries. ...
    (Linux-Kernel)
  • [PATCH][2.6.8.1-mm4] Clustered APIC support for x86-64
    ... -static inline void clustered_apic_check ... * Copyright 2004 James Cleverdon, ... +/* which logical CPU number maps to which CPU */ ... +static void cluster_send_IPI_mask(cpumask_t mask, int vector) ...
    (Linux-Kernel)
  • [PULL] cpumask conversion patches for sched
    ... convert nohz struct to cpumask_var_t. ... extern int runqueue_is_locked; ... #ifdef CONFIG_SCHED_DEBUG ... If there are currently no tasks on the cpu pretend there ...
    (Linux-Kernel)
  • Re: [PATCH 1/2] kthread_create
    ... to be created when a CPU goes online. ... D: 2) Getting the task struct without races is a hard: see kernel/sched.c ... +void kthread_bind(struct task_struct *k, unsigned int cpu); ...
    (Linux-Kernel)