Éó¼Æ¸ú×ÙLinuxµÄÒì³£»î¶¯
Éó¼Æ¸ú×ÙLinuxµÄÒì³£»î¶¯
Zhaoke, 2007-01-29
һЩÒì³£Óû§ÊÔͼÒÆȥϵͳÉϵÄËùÓл¼Ç¼(±ÈÈç ~/.bash_history), ²»¹ýÎÒÃÇ¿ÉÒÔʹÓÃרÃŵŤ¾ßÀ´¼àÊÓËùÓÐÓû§Ö´ÐеÄÃüÁî. ÍƼöÄãʹÓýø³Ì¼ÇÕÊÀ´¼Ç¼Óû§µÄ»î¶¯, Äã¿ÉÒÔͨ¹ý½ø³Ì¼ÇÕʲ鿴ÿһ¸öÓû§Ö´ÐеÄÃüÁî, °üÀ¨CPUʱ¼äºÍÄÚ´æÕ¼ÓÃ.
psacct³ÌÐòÌṩÁ˼¸¸ö½ø³Ì»î¶¯¼àÊÓ¹¤¾ß: ac, lastcomm, acctonºÍsa.
.acÃüÁîÏÔʾÓû§Á¬½Óʱ¼äµÄͳ¼Æ.
.lastcommÃüÁîÏÔʾϵͳִÐеÄÃüÁî.
.acctonÃüÁîÓÃÓÚ´ò¿ª»ò¹Ø±Õ½ø³Ì¼ÇÕʹ¦ÄÜ.
.saÃüÁîͳ¼Æϵͳ½ø³Ì¼ÇÕʵÄÇé¿ö.
1). °²×°psacct»òacctÈí¼þ°ü
Èç¹ûÄãʹÓÃRHEL, ʹÓÃup2dateÃüÁî:
# up2date psacct
Èç¹ûÄãʹÓÃCentOS/Fedora Core Linux, ʹÓÃyumÃüÁî:
$ sudo apt-get install acct
»ò
# apt-get install acct
2). Æô¶¯psacct/acct·þÎñ
ÔÚUbuntu/Debian LinuxϵͳÉÏ, pacct¿ÉÒÔ×Ô¶¯Æô¶¯.(°²×°°ü»áÔÚϵͳÉÏ´´½¨Ò»¸ö/var/account/pacctÎļþ). µ«ÊÇÔÚRed Hat/Fedora Core/Cent OS, ÄãÐèÒªÊÖ¶¯Æô¶¯psacct·þÎñ. ÇÃÈëÏÂÃæÁ½¸öÃüÁî´´½¨/var/account/pacctÎļþºÍÆô¶¯pacct·þÎñ:
# chkconfig psacct on
# /etc/init.d/psacct start
Èç¹ûÄãʹÓÃSuse Linux, ·þÎñµÄÃû³ÆΪacct, ÇÃÈëÏÂÃæµÄÃüÁî:
# chkconfig acct on
# /etc/init.d/acct start
ÏÖÔÚÎÒÃÇ¿ÉÒÔÁ˽âÈçºÎÀûÓÃÕâЩ¹¤¾ßÀ´¼àÊÓÓû§µÄÃüÁîºÍʱ¼ä.
3). ÏÔʾÓû§Á¬Ïßʱ¼äµÄͳ¼ÆÐÅÏ¢
ÃüÁî¿ÉÒÔ¸ù¾ÝµÇ½Êý/Í˳öÊýÔÚÆÁÄ»ÉÏ´òÓ¡³öÓû§µÄÁ¬Ïßʱ¼ä(µ¥Î»ÎªÐ¡Ê±). ×ܼÆʱ¼äÒ²¿ÉÒÔ´òÓ¡³öÀ´. Èç¹ûÄãÖ´ÐÐûÓÐÈκβÎÊýµÄacÃüÁî, ÆÁÄ»½«»áÏÔʾ×ܼƵÄÁ¬Ïßʱ¼ä:
$ ac
Êä³ö:
total 95.08
ÏÔʾÿһÌìµÄÁ¬Ïßͳ¼Æʱ¼ä:
$ ac -d
Êä³ö:
Nov 1 total 8.65
Nov 2 total 5.70
Nov 3 total 13.43
Nov 4 total 6.24
Nov 5 total 10.70
Nov 6 total 6.70
Nov 7 total 10.30
…..
..
…
Nov 12 total 3.42
Nov 13 total 4.55
Today total 0.52
ÏÔʾÿһ¸öÓû§µÄ×ܼÆÁ¬Ïßʱ¼äºÍËùÓÐÓû§×ܼÆÁ¬Ïßʱ¼ä:
$ ac -p
Êä³ö:
vivek 87.49
root 7.63
total 95.11
4). ²éÕÒÓû§¹ýÈ¥Ö´ÐеÄÃüÁî
Äã¿ÉÒÔʹÓÃlastcommÃüÁî´òÓ¡³öÓû§¹ýÈ¥Ö´ÐеÄÃüÁî. ÄãÒ²¿ÉÒÔͨ¹ýÓû§Ãû, ttyÃû»òÃüÁîÃûÀ´ËÑË÷ÒÔÍùÖ´ÐеÄÃüÁî.
±ÈÈçÏÔʾvivekÓû§¹ýÈ¥Ö´ÐеÄÃüÁî:
$ lastcomm vivek
Êä³ö:
[code]
userhelper S X vivek pts/0 0.00 secs Mon Nov 13 23:58
userhelper S vivek pts/0 0.00 secs Mon Nov 13 23:45
rpmq vive
Ïà¹ØÎĵµ£º
1. HCI²ãÐÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI) ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈÐÒé ......
·þÎñÆ÷ͻȻ³öÏÖ¹«ÍøÍøÂ粻ͨ¡£»¹ºÃÓÐÅäÁ½¸öIP£¬Ò»¹«Íø£¬Ò»ÄÚÍø£¬ÄÚÍø¿Éͨ£¬Í¨¹ýÄÚÍøÁ¬½Óµ½·þÎñÆ÷ÉÏ ¡£²é¿´ÈÕÖ¾£¬dmesg£¬·¢ÏÖÓÐÕâÑùÒ»Ìõ£º
Sep 9 14:34:36 slave kernel: NETDEV WATCHDOG: eth0: transmit timed out
/etc/init.d/network restart ÍøÂç·þÎñÖØÆôһϣ¬»Ö¸´Õý³£¡£
µ½google²éÕÒ×ÊÁÏ£¬·¢ÏÖÒ²ÓÐÒ»ÑùµÄÎÊ ......
תÌû×Ô£ºhttp://bbs.61job.cn/space/viewspacepost.aspx?postid=4489
ÔÚLinuxÖв»¹ÜÄãÊÇ×ö·þÎñÆ÷»¹ÊÇÖ»ÊÇƽ³£Ê¹Óã¬ÉÏÍø¿Ï¶¨¶¼ÊÇ×îÖØÒªºÍ²»¿ÉȱÉÙµÄÒ»¸öÒòËØÖ®Ò»£¬
ËùÒÔ¾ÍÉæ¼°µ½ËüµÄip gateway dnsµÈnetworkÅäÖúÍʹÓᣵ«ÊÇÉèÖÃlinuxÍøÂçµÄ·½·¨ÓÐÁ½ÖÖ£º
µÚÒ»ÖÖ£ºÊ¹ÓÃÃüÁîÐ޸ģ¨Ö±½Ó¼´Ê±ÉúЧ,ÖØÆôʧЧ£©
&n ......
ÔÚbbsÉÏ·¢Á˸öÈçÌâËùʾµÄ´óÍÁÌû£¬½á¹ûûһ¸ö»Ø¸´£¬°¥£¬Õ涪ÈË~~~£¬ÃÉʦÐÖÖ¸µã£¬²Å³õ²½¸ãÇå³þlinuxÄ£¿éº¯ÊýµÄµ÷ÓûúÖÆ£º
Ê×ÏÈ£¬Ó¦ÓóÌÐòÊÇÎÞ·¨Ö±½Ó·ÃÎÊÄ£¿éÖеĺ¯ÊýµÄ£¨¼´Ê¹ÊÇÄã×Ô±à×Ô¹ÒµÄÄ£¿é££Êµ¼ÊÉÏËüÒ²ÊÇÄÚºËÄ£¿é£©£¬Óû§¿Õ¼äÓëÄں˿ռäÖ®¼äÖ»ÓÐͨ¹ýһЩÌض¨µÄϵͳº¯ÊýÀ´½øÐÐͨѶ£¨Èçʲôuser_to_kernel£©£¬¶ø¾ø¶Ô²»¿ ......