Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÓÃÈí¼þlm_sensors¼à²âLinuxϵͳºÍCPUζÈ

ÔÚLinuxÏÂÓиö½Ðlm_sensorsµÄÈí¼þ¿ÉÒÔ°ïÖúÎÒÃÇÀ´¼à¿ØÖ÷°å£¬CPUµÄ¹¤×÷µçѹ£¬·çÉÈתËÙ¡¢Î¶ȵÈÊý¾Ý¡£ÕâЩÊý¾ÝÎÒÃÇͨ³£ÔÚÖ÷°åµÄ
BIOSÒ²¿ÉÒÔ¿´µ½¡£µ±ÎÒÃÇ¿ÉÒÔÔÚ»úÆ÷ÔËÐеÄʱºòͨ¹ýlm_sensorsËæÊ±À´¼à²â×ÅCPUµÄζȱ仯£¬¿ÉÒÔÔ¤·ÀºÇ±£»¤ÒòΪCPU¹ýÈȶø»áÉÕµô¡£

1. °²×°lm_sensors

ÏÖÔÚ»ù±¾ÉÏÿ¸öLinux¶¼ÒѾ­ÓÐlm_sensors°üÁË£¬ÎÒÃÇÖ÷Òª°²×°Á˾ͿÉÒÔÁË¡£»òÕßÎÒÃÇÒ²¿ÉÒÔͨ¹ýÔ´ÎļþÀ´×Ô¼º±àÒë¡£

1£©ÔÚFC£¬RH£¬ CENTOSÏ£¬ÓÃrpm£º

[root@securitycn ~]# rpm -ivh lm_sensors-2.10.0-3.1.i386.rpm

3£©±àÒëÔ´Îļþ°²×°

ÎÒÃÇ¿ÉÒÔͨ¹ý£ºÕâÀïÏÂÔØ
Ô´Îļþ

ÕâÀïÎÒÃÇҪעÒâµÄÎÊÌâÊÇÒªÏȰ²×°libsysfs¿â£¬ÊÇSysfsutils£¬Sysfsutils£­develÈí¼þ

tar xzvf lm-sensors-xxx.tar.gz

make user

make user_install testing

ÏÂÃæÎÒÃǾÍÓÃһЩ¼òµ¥µÄÃüÁîÀ´ÀûÓÃlm_sensorsÀ´µÃµ½CPUµÄÊý¾Ý¡£ÎÒÃÇÒªÓÃrootµÄÉí·ÝÀ´£º

sensors-detect£¬È»ºóËü»á×Ô¶¯ËÑË÷Ö÷°åÉϵÄchipsetºÍÏàÓ¦µÄdriver£¬ÎÒÃÇÈ«²¿´ðYES¾Í¿ÉÒÔÁË

[root@securitycn ~]# sensors-detect

# sensors-detect revision 1.413 £¨2006/01/19 20£º28£º00£©

This program will help you determine which I2C/SMBus modules you need to

load to use lm_sensors most effectively. You need to have i2c and

lm_sensors installed before running this program.

Also£¬ you need to be `root'£¬ or at least have access to the /dev/i2c-*

files£¬ for most things.

If you have patched your kernel and have some drivers built in£¬ you can

safely answer NO if asked to load some modules. In this case£¬ things may

seem a bit confusing£¬ but they will still work.

It is generally safe and recommended to accept the default answers to all

questions£¬ unless you know what you're doing.

We can start with probing for £¨PCI£© I2C or SMBus adapters.

You do not need any special privileges for this.

Do you want to probe now£¿ £¨YES/no£©£º

È«²¿Ä¬ÈÏYES¼´¿É¡£

È»ºóÎÒÃÇÆô¶¯lm_sensors £º

/etc/init.d/lm_sensors start

Starting lm_sensors£º [ OK ]

ÎÒÃÇ¿ÉÒÔͨ¹ýlsmodÀ´È·¶¨ÎÒÃÇÐèÒªµÄdriverÒѾ­¼ÓÔØÁËûÓÐ

lsmod | grep i2c


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì(Áù) L2CAP±à³ÌʵÀý

ÀýÒ»£º·¢ËÍSignaling Packet£º
Signaling CommandÊÇ2¸öBluetoothʵÌåÖ®¼äµÄL2CAP²ãÃüÁî´«Êä¡£ËùÒÔµÃSignaling CommandʹÓÃCID 0x0001.
¶à¸öCommand¿ÉÒÔÔÚÒ»¸öC-frame£¨control frame£©Öз¢ËÍ¡£
 Èç¹ûÒªÖ±½Ó·¢ËÍSignaling Command.ÐèÒª½¨Á¢SOCK_RAWÀàÐ͵ÄL2CAPÁ¬½ÓSocket¡£ÕâÑù²ÅÓлú»á×Ô¼ºÌî³äCommand Code£¬Identi ......

[תÌû]LinuxÇý¶¯¿ª·¢Ñ§Ï°µÄһЩ±ØÒª²½Öè

 1. ѧ»áд¼òµ¥µÄmakefile
2. ±àһЩӦÓÃ
³ÌÐò
£¬¿ÉÒÔÓÃmakefileÅÜÆðÀ´
3. ѧ»áдÇý¶¯
µÄmakefile
4. дһ¼òµ¥charÇý¶¯£¬makefile±àÒëͨ¹ý£¬¿ÉÒÔinsmod£¬ lsmod£¬ rmmod. ÔÚÇý¶¯µÄinitº¯ÊýÀï´òÓ¡hello world£¬insmodºóÓ¦¸ÃÄܹ»Í¨¹ýdmesg¿´µ½Êä³ö
¡£
5. дһÍêÕûÇý¶¯£¬ ¼ÓÉÏread£¬ write£¬ ioctl£¬ pollingµÈ¸ ......

linux fork() º¯ÊýʵÀýÏê½â

forkº¯Êýѧϰ£º
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
main ()
{
  pid_t pid; pid=fork();
  if (pid < 0)
    printf("error in fork!");
  else if (pid == 0)
    printf("i ......

linuxµ÷Õûϵͳʱ¼äºÍÊ±ÇøµÄ·½·¨


linuxµ÷Õûϵͳʱ¼äºÍÊ±ÇøµÄ·½·¨
1) ÕÒµ½ÏàÓ¦µÄÊ±ÇøÎļþ /usr/share/zoneinfo/Asia/Shanghai
ÓÃÕâ¸öÎļþÌæ»»µ±Ç°µÄ/etc/localtimeÎļþ¡£
2) ÐÞ¸Ä/etc/sysconfig/clockÎļþ£¬ÐÞ¸ÄΪ£º
ZONE="Asia/Shanghai"
UTC=false
ARC=false
3)
ʱ¼äÉ趨³É2005Äê8ÔÂ30ÈÕµÄÃüÁîÈçÏ£º
#date -s 08/30/2005
½«ÏµÍ³Ê±¼äÉ趨³ÉÏÂÎ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ