[personal profile] usernamenumber
Red Hat sends out a monthly training newsletter, one of the more popular features of which is a "tips and tricks" section, to which I've contributed a couple of times. The one that went out this month is something I had no idea about, and is one of those things that makes me geeksquee enough that I feel the need to share, despite the fact that I will probably never need to use it, it's just cool.

---------------------------------------------------------------------------------
Q. Can I "hotplug" a CPU on a running Red Hat Enterprise Linux 5 system?

Red Hat Enterprise Linux 5 supports the cpu-hotplug mechanism, which allows for CPUs to be dynamically disabled and re-enabled on a system without requiring a system reboot.

In order to disable a CPU core in a running machine, use the file /sys/devices/system/cpu/cpuX/online.

The following command will disable a CPU:

# echo 0 > /sys/devices/system/cpu/cpuX/online

Where X is the ID of the CPU as determined from /proc/cpuinfo.

To re-enable the CPU, run:

# echo 1 > /sys/devices/system/cpu/cpuX/online

Check an example and more on this topic at the Red Hat knowledgebase.
---------------------------------------------------------------------------------


And now to spend the rest of the day resisting the urge to try this on my uniprocessor laptop...

Linux (or, to be fair, any OS) is like chess: you never know everything about it.


Edit: Oh, right, my laptop actually has two processors. Sadly the primary processory doesn't have an online file with which to disable it. Stupid sensible design. *nix is supposed to trust/hate me enough to let me screw myself over by doing braindead things if I want to! =;)

Date: 2009-04-01 09:56 pm (UTC)
From: [identity profile] marphod.livejournal.com
This reminds me of a sample BeOS app for the BeBox.

It was a visual representation of the 2 CPU system, and allowed you to click on each of the CPUs and select to turn them on or off.

However, if you clicked one then the other, it didn't swap the CPUs, it just shut both off. Which is an amusing way to halt your machine.

(OTOH, it wasn't that big a deal if you didn't lose data, as boot time was <30 seconds. Yay OSes that don't believe in splash screens as an OS shouldn't take long enough to boot to need one.)

Date: 2009-04-01 10:01 pm (UTC)
From: [identity profile] usernamenumber.livejournal.com
Ah, fond memories of playing with BeOS back in the day. Did you know that it's still under development as an OSS project?

I've heard that the next version of Fedora is going to have crazy-short boot times as well. Looking forward to seeing that.

Date: 2009-04-01 10:11 pm (UTC)
From: [identity profile] marphod.livejournal.com
I'd love to use BeOS if it were at all practical. but it isn't -- it doesn't have the application support, and while it had nice ideas, it really was the synergy of the hardware with the OS.

It was a good platform for developing ideas. I just wish they went mainstream faster.

Profile

usernamenumber

October 2016

S M T W T F S
      1
2345678
9101112131415
16171819202122
232425 26272829
3031     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 21st, 2025 03:33 am
Powered by Dreamwidth Studios