RSS

Disable some CPUs within Red Hat Enterprise Linux 5 without rebooting the system

Wed, Apr 23, 2008

System

คำเตือน: โปรดทำการเชค Hardware ว่า support hotswapping หรือไม่ก่อนทำการทดลองเล่นหรือใช้งานคำสั่งนี้ ไม่เช่นนั้นอาจจะเกิดความเสียหายต่อ Hardware ของท่านได้

RedHat Enterprise 5 support การทำงานแบบ Hotplug ของ ดังนั้นเราสามารถทำการ Disable และ Enable ได้แบบ On-the-Fly หรือว่าไม่ต้อง Restart เครื่องใหม่นั้นเอง ส่วนวิธีการนั้นขั้นแรกเราจะต้องรู้ก่อนว่าเรามี กี่ตัวและต้องการ Disable ตัวไหน โดยจะใช้คำสั่ง

# cat /proc/cpuinfo

เพื่อดูรายละเอียดของ ที่ระบบปฏิบัติการเห็น เมื่อทำการรันคำสั่งนี้แล้วจะเห็นราบละเอียดของ ทั้งหมด และให้ดูที่บรรทัด processor เพื่อจะนำมาใช้ในการอ้างอิงถึง ที่เราต้องการจะ Disable หรือ Enable ตย. ถ้าบรรทัดที่กล่าวมาแสดงผลเป็น processor : 0 แสดงว่าเป็น CPU0 หรือ processor : 1 เป็น CPU1 เป็นต้น

จากนั้นลองมาใช้คำสั่งเพื่อที่จะทำการ Disable กันนะครับ โดยใช้พิมพ์ Command ตามข้างล่างเพื่อทำการ Disable

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

และถ้าต้องการ Enable ให้พิมพ์ Command ดังข้างล่างครับ

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

จากตัวอย่างนั้น cpuX หมายถึง ตัวที่ X ครับ ส่วนวิธีการหาก็ได้กล่าวไว้แล้วที่ข้างบนนะครับ

คำเตือน (รอบที่ 2): โปรดทำการเชค Hardware ว่า support hotswapping หรือไม่ก่อนทำการทดลองเล่นหรือใช้งานคำสั่งนี้ ไม่เช่นนั้นอาจจะเกิดความเสียหายต่อ Hardware ของท่านได้

Share this article: You can download this plugin at e4share.com
  • Zickr
  • Duocore
  • Kudd
  • Lunlala
  • Dunweb
  • Techkr
  • Bogtor
  • Kez6
  • JeedZa
  • Left Hit
  • Siam Collective
  • Azine
  • del.icio.us
  • Derntang
  • Digg
  • Digger
  • DigZa
  • GaminXPost
  • Google
  • iThink
  • MeetGamer
  • OnCake
  • Postigg
  • PostMafia
  • Rawii
  • Reddit
  • StumbleUpon
  • Suan Sanook
  • Technorati
  • Thai Health
  • YahooMyWeb
  • Zamplr
  • ZapZad
Tags: ,

Related posts

,

This post was written by:

Tum. - who has written 61 posts on EzyLinux - Linux Server and Linux Desktop.


Contact the author

Comments are closed.


Warning: stristr() [function.stristr]: Empty delimiter in E:\ezylinux\wp-content\plugins\wassup\wassup.php on line 2093