×ðÁú¿­Ê±¹ÙÍøµÇ¼

ÔõÑùÔÚLinuxϵͳÖÐʹÓÃCoreFreqÀ´¼à¿ØCPUÐÔÄÜ£¿

ÔõÑùÔÚLinuxϵͳÖÐʹÓÃCoreFreqÀ´¼à¿ØCPUÐÔÄÜ£¿

ÔÚLinuxϵͳÖÐ £¬ÎÒÃǾ­³£ÐèÒª¼à¿ØCPUµÄÐÔÄÜÒÔÈ·±£ÏµÍ³ÔËÐеÄÎȹÌÐԺ͸ßЧÐÔ¡£CoreFreqÊÇÒ»¸ö¿ªÔ´¹¤¾ß £¬¿ÉÒÔ×ÊÖúÎÒÃÇʵʱ¼à¿ØCPUµÄÐÔÄÜÖ¸±ê £¬°üÀ¨ÆµÂÊ¡¢¸ºÔØ¡¢Î¶ȵÈÐÅÏ¢¡£±¾ÎĽ«ÏêϸÏÈÈÝÔõÑùÔÚLinuxϵͳÖÐ×°ÖúÍʹÓÃCoreFreq £¬²¢Í¨¹ýÏêϸ´úÂëʾÀýÑÝʾÔõÑù¼à¿ØCPUÐÔÄÜ¡£

1. ×°ÖÃCoreFreq

Ê×ÏÈ £¬ÎÒÃÇÐèÒªÏÂÔز¢×°ÖÃCoreFreq¹¤¾ß¡£¿ÉÒÔͨ¹ýÒÔÏ°취ÔÚLinuxϵͳÖÐ×°ÖÃCoreFreq£º

$ git clone https://github.com/cyring/CoreFreq.git
$ cd CoreFreq
$ make
$ sudo make load

µÇ¼ºó¸´ÖÆ

ÒÔÉÏÏÂÁ»á´ÓGitHubÉÏÏÂÔØCoreFreqµÄ´úÂë £¬²¢±àÒë×°Ö᣽Ó×Åͨ¹ýsudo make loadÏÂÁî¼ÓÔØCoreFreqÄÚºËÄ£¿é¡£

2. Éó²éCPUÐÅÏ¢

×°ÖÃÍê³Éºó £¬ÎÒÃÇ¿ÉÒÔʹÓÃÒÔÏÂÏÂÁîÉó²éCPUµÄ»ù±¾ÐÅÏ¢£º

$ corefreq-cli -i

µÇ¼ºó¸´ÖÆ

¸ÃÏÂÁÁгöCPUµÄÖÖÖÖÐÅÏ¢ £¬°üÀ¨CPUÐͺš¢ÆµÂÊ¡¢½¹µãÊýÄ¿µÈ¡£

3. ʵʱ¼à¿ØCPUÐÔÄÜ

ÏÖÔÚÎÒÃÇÒѾ­×°Öò¢Éó²éÁËCPUµÄ»ù±¾ÐÅÏ¢ £¬½ÓÏÂÀ´ÎÒÃÇ¿ÉÒÔʹÓÃCoreFreqʵʱ¼à¿ØCPUµÄÐÔÄÜ¡£

$ corefreq-cli -C

µÇ¼ºó¸´ÖÆ

¸ÃÏÂÁÆô¶¯CoreFreqµÄ¿ØÖÆ̨ģʽ £¬¿ÉÒÔʵʱÏÔʾCPUµÄƵÂÊ¡¢¸ºÔØ¡¢Î¶ȵÈÖ¸±ê¡£ÎÒÃÇ¿ÉÒÔͨ¹ý°´ÏÂq¼üÍ˳ö¿ØÖÆ̨ģʽ¡£

4. дһ¸ö¼òÆӵĽÅÔ­À´ÊµÊ±¼à¿ØCPUÐÔÄÜ

ÈôÊÇÏëÒª½«ÊµÊ±¼à¿ØCPUÐÔÄܵÄЧ¹ûÊä³öµ½ÎļþÖÐ £¬ÎÒÃÇ¿ÉÒÔ±àдһ¸ö¼òÆÓµÄShell½ÅÔ­À´ÊµÏÖ¡£

ÒÔÏÂÊÇÒ»¸öÀý×Ó £¬½«CPUµÄÐÔÄÜÖ¸±êÊä³öµ½cpu_performance.logÎļþÖУº

#!/bin/bash

while true
do
    corefreq-cli -s >> cpu_performance.log
    sleep 1
done

µÇ¼ºó¸´ÖÆ

½«ÒÔÉÏ´úÂëÉúÑĵ½Ò»¸ö¾ç±¾Îļþ£¨Èçmonitor_cpu.sh£© £¬È»ºóÔËÐÐÒÔÏÂÏÂÁ

$ chmod +x monitor_cpu.sh
$ ./monitor_cpu.sh

µÇ¼ºó¸´ÖÆ

ÔËÐиþ籾ºó £¬CPUµÄÐÔÄÜÖ¸±ê½«»áÿÃëÊä³öµ½cpu_performance.logÎļþÖС£

ͨ¹ýÒÔÉÏÒªÁì £¬ÎÒÃÇ¿ÉÒÔÀû±ãµØʹÓÃCoreFreq¹¤¾ßÀ´¼à¿ØCPUµÄÐÔÄÜ £¬ÓÐÖúÓÚÎÒÃÇʵʱ·¢Ã÷Ï¢Õù¾öϵͳÐÔÄÜÎÊÌ⡣ϣÍû±¾ÎĶÔÄúÓÐËù×ÊÖú£¡

ÒÔÉϾÍÊÇÔõÑùÔÚLinuxϵͳÖÐʹÓÃCoreFreqÀ´¼à¿ØCPUÐÔÄÜ£¿µÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí £¬°æȨÕùÒéÓë±¾Õ¾ÎÞ¹Ø £¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í×ðÁú¿­Ê±¹ÙÍøµÇ¼ÂËÓÍ»úÍø¹Ù·½Ì¬¶È £¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ £¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢ £¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢ £¬ÇëÄúÁ¬Ã¦ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎå £¬9:30-18:30 £¬½ÚãåÈÕÐÝÏ¢

QR code
ÍøÕ¾µØͼ