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

LinuxÏÂÅäÖÃNTP ¼ÜÉè±¾µØʱ¼ä·þÎñÆ÷

http://inthirties.com:90/thread-919-1-1.html
ÅäÖÃNTP¼ÜÉè±¾µØʱ¼ä·þÎñÆ÷
NTPÊÇÓÃÀ´Ê¹ÏµÍ³ºÍÒ»¸ö¾«È·µÄʱ¼äÔ´±£³Öʱ¼äͬ²½µÄЭÒé.ÔÚLinuxÏ£¬ÎÒÃÇ¿ÉÒÔͨ¹ý×Ô´øµÄNTP(Network Time
Protocol)ЭÒéͨ¹ýÍøÂçʹ×Ô¼ºµÄϵͳ±£³Ö¾«È·µÄʱ¼ä.
°²×°£º
# yum install ntp
»òÕß´Ó°²×°Å̲éÕÒ ntp µÄrpm °ü°²×°
µ±ÄãÖ»ÓÐһ̨¿ÉÁ´½ÓÍâÍøµÄ·þÎñÆ÷ʱ£¬¼ÓÈë
# crontab -e
¼ÓÈëÒ»ÐУº
*/15 * * * * ntpdate 210.72.145.44
210.72.145.44 ΪÖйú¹ú¼ÒÊÚʱÖÐÐÄ·þÎñÆ÷µØÖ·£¬ÕâÑù¸Ã»ú¾Í¿ÉÒÔÓë¹ú¼ÒÊÚʱÖÐÐĽøÐÐͬ²½ÁË¡£
Òª¼ÜÉè±¾µØʱ¼ä·þÎñÆ÷£¬Ö»ÐèÒªÐÞ¸Ä /etc/ntp.confÎļþÀïµÄ¼¸¸ö¼òµ¥µÄÅäÖþͿÉÒÔÁË£¬ÒÔÏÂÊÇÎÒÌí¼ÓµÄÅäÖãº
#add by Liu Li
server 210.72.145.44 prefer
£¨Öйú¹ú¼ÒÊÚʱÖÐÐÄ·þÎñÆ÷µØÖ· prefer±íʾÓÅÏÈ ×¢Òâ°ÑĬÈϵÄserver¸ü¸Ä³ÉÕâÑù£©
server 218.21.130.42

£¨cn.pool.ntp.orgµÄIP)
restrict 192.168.100.0 mask 255.255.255.0
nomodify
(ÔÊÐíÄÚÍøͨѶ
)
restrict 0.0.0.0 mask 0.0.0.0 nomodify
notrap noquery notrust
£¨ÆÁ±ÎÆäËûIP
¹ýÀ´¸üÐÂʱ¼ä
£©
ÆäËûµÄ±£³ÖĬÈϲ»¶¯¡£
ΪÁËʹNTP·þÎñ¿ÉÒÔÔÚϵͳÒýµ¼µÄʱºò×Ô¶¯Æô¶¯£¬Ö´ÐУº
# chkconfig ntpd on
Æô¶¯/¹Ø±Õ/ÖØÆôNTPµÄÃüÁîÊÇ£º
# /etc/init.d/ntpd start
# /etc/init.d/ntpd stop
# /etc/init.d/ntpd restart
½«Í¬²½ºÃµÄʱ¼äдµ½CMOSÀï
vi /etc/sysconfig/ntpd
SYNC_HWCLOCK=yes
ÇмÇÿ´ÎÐÞ¸ÄÁËÅäÖÃÎļþºó¶¼ÐèÒªÖØÐÂÆô¶¯·þÎñÀ´Ê¹ÅäÖÃÉúЧ¡£¿ÉÒÔʹÓÃÏÂÃæµÄÃüÁîÀ´¼ì²éNTP·þÎñÊÇ·ñÆô¶¯£¬ÄãÓ¦¸Ã¿ÉÒԵõ½Ò»¸ö½ø³ÌIDºÅ£º
# pgrep ntpd
ʹÓÃÏÂÃæµÄÃüÁî¼ì²éʱ¼ä·þÎñÆ÷ͬ²½µÄ״̬£º
# ntpq -p
ÓÃntpstat Ò²¿ÉÒԲ鿴һЩͬ²½×´Ì¬£¬ÓÃnetstat -ntlup²é¿´¶Ë¿ÚʹÓÃÇé¿ö£¡
°²×°Íê±Ï¿Í»§¶ËÐè¹ý5-10·ÖÖÓ²ÅÄÜ´Ó·þÎñÆ÷¶Ë¸üÐÂʱ¼ä£¡
¿Í»§¶ËÉèÖãº
# crontab -e
¼ÓÈëÒ»ÐУº
*/15 * * * * ntpdate ·þÎñÆ÷¶ËIP¡£

ËÑË÷¸ü¶àÏà¹ØÖ÷ÌâµÄÌû×Ó: Linux
TimeSerive
NTP

ÌṩOracle¹ÜÀí/¹ÊÕÏ´¦Àí/ÓÅ»¯/°²×°/RAC/±¸·Ý»Ö¸´¼¼Êõ·þÎñ,ÌṩרҵµÄOracleÅàѵºÍ×Éѯ·þÎñ¡£

Óʼþ: inthirties@gmail.com
MSN: inthirties@hotmail.com
QQ: inthirties@qq.com
רҵÂÛ̳ http://www.inthirties.com
¼¼Êõ²©¿Í http://blog.csdn.net/inthirties
¸öÈËÕ¾µã http://blog.inthirties.com



Ïà¹ØÎĵµ£º

Linux ÄÚºËWorkQueueÔĶÁ±Ê¼Ç


1.            Workqueue
WorkqueueµÄÃû×־ͺÍËûµÄ¹¦ÄÜÒ»Ñù£ºÐèÒª´¦ÀíµÄ¹¤×÷ÁбíºÍ¹¤×÷µÄÌí¼Óɾ³ý£¨Ã²ËÆûÓп´µ½ÈçºÎɾ³ýµÄ£©¡¢ÒÔ¼°¹¤×÷µÄµ÷¶ÈÖ´ÐС£
ÐèÒª´¦ÀíµÄ¹¤×÷Áбíͨ³£¶¼Î¬»¤ÔÚÄں˶ÔÏóworkqueue_structÀïÃ档ϵͳÀïÃæ¿ÉÒÔÓжà¸öworkqueue_struct¡£ ......

ÈçºÎÈýø³ÌÔÚLinuxºǫ́ÔËÐÐ

ÔÚLinuxÖУ¬Èç¹ûÒªÈýø³ÌÔÚºǫ́ÔËÐУ¬Ò»°ãÇé¿öÏ£¬ÎÒÃÇÔÚÃüÁîºóÃæ¼ÓÉÏ&¼´¿É£¬Êµ¼ÊÉÏ£¬ÕâÑùÊǽ«ÃüÁî·ÅÈëµ½Ò»¸ö×÷Òµ¶ÓÁÐÖÐÁË£º
[root@localhost /]# ./test.sh &
[1] 17208
È»ºóÎÒÃǾͿÉÒÔÓÃÒÔÏÂÃüÁî½øÐв鿴£º
[root@localhost /]# jobs -l
[1]  17208 Running ./test.sh &
¶ÔÓÚÒѾ­ÔÚǰִ̨ÐеÄÃüÁî ......

linuxÄÚºËÒÆÖ²s3c2410£¬ÒÆÖ²Õýʽ¿ªÊ¼2

ÄÚºËÆô¶¯µÄÏÖÔÚÒѾ­ÊÇ¿ªÊ¼Ö´Ðк¯Êýstart_kernelº¯ÊýÁË¡£start_kernelº¯ÊýÔÚinit/main.cÖж¨Òå¡£start_kernelº¯ÊýÖ»ÊÇÍê³É
ÏàÓ¦µÄ½á¹¹µÄ³õʼ»¯ÈÎÎñ¡£
    printk(KERN_NOTICE);
    printk(linux_banner);
    setup_arch(&command_line);
ÔÚubootµÄÒ»Ö±¹ý³ÌÖУ¬uboo ......

ÔÚLinuxÏÂÈçºÎʹÓÃ×Ô¼ºµÄ¿âº¯Êý

Ò»

ʹÓÿâ±ØÒªÐÔ
  
Ìá¸ß´úÂëÖØÓÃÐÔ¡£
¶þ
 
¿âµÄÖÖÀࣺ
  
1
¾²Ì¬¿â
    
Ò»°ãÒÔ
*.a
ÃüÃû¡£
    
³ÌÐò±àÒëʱ±»¼ÓÔØ£¬´Ëºó£¬Ö»Òª³ÌÐò²»±»ÖØбàÒ룬¾²Ì¬¿â¾ÍûÓÐ×÷ÓÃÁË£¨¿ÉÒÔɾµô£©¡£
ÓÉ
ÓÚ¾²Ì¬¿âµÄ´úÂëÔÚ±àÒë¹ý³ÌÖÐÒѾ­±»ÔØÈ ......

LinuxÏ´®¿Ú±à³ÌÖ®¶þ£º¶Á´®¿ÚºÍд´®¿Ú

1£¬´ò¿ª´®¿Ú
      /**´ò¿ª´®¿Ú£¬dev ´®¿ÚÉ豸Ãû£¬ mode ´ò¿ª·½Ê½£¬**/
     int opendev(char *dev,mode_t mode)
    {
          int fd;
          fd = ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ