LinuxϵͳÐÅÏ¢²é¿´ÃüÁî´óÈ«
http://tech.idv2.com/2008/01/11/linux-sysinfo-cmds/
×î½ü¿´ÁËһЩLinuxÃüÁîÐеÄÎÄÕ£¬ÔÚϵͳÐÅÏ¢²é¿´·½Ãæѧµ½²»ÉÙÃüÁî¡£
ÏëÆðÒÔǰд¹ýµÄһƪÆäʵLinuxÕâÑùÓøü¼òµ¥
£¬
·¢ÏÖÕâЩϵͳÐÅÏ¢²é¿´ÃüÁîÒ²¿ÉÒÔ×ܽá³öһƪССµÄ¶«Î÷À´ÁË¡£
ÁíÍâÕâÀï
»¹Óзdz£¶àµÄÃüÁ
¿ÉÒÔ×÷Ϊ²Î¿¼¡£
ϵͳ
# uname -a # ²é¿´ÄÚºË/²Ù×÷ϵͳ/CPUÐÅÏ¢
# head -n 1 /etc/issue # ²é¿´²Ù×÷ϵͳ°æ±¾
# cat /proc/cpuinfo # ²é¿´CPUÐÅÏ¢
# hostname # ²é¿´¼ÆËã»úÃû
# lspci -tv # ÁгöËùÓÐPCIÉ豸
# lsusb -tv # ÁгöËùÓÐUSBÉ豸
# lsmod # Áгö¼ÓÔصÄÄÚºËÄ£¿é
# env # ²é¿´»·¾³±äÁ¿
×ÊÔ´
# free -m # ²é¿´ÄÚ´æʹÓÃÁ¿ºÍ½»»»ÇøʹÓÃÁ¿
# df -h # ²é¿´¸÷·ÖÇøʹÓÃÇé¿ö
# du -sh <Ŀ¼Ãû> # ²é¿´Ö¸¶¨Ä¿Â¼µÄ´óС
# grep MemTotal /proc/meminfo # ²é¿´ÄÚ´æ×ÜÁ¿
# grep MemFree /proc/meminfo # ²é¿´¿ÕÏÐÄÚ´æÁ¿
# uptime # ²é¿´ÏµÍ³ÔËÐÐʱ¼ä¡¢Óû§Êý¡¢¸ºÔØ
# cat /proc/loadavg # ²é¿´ÏµÍ³¸ºÔØ
´ÅÅ̺ͷÖÇø
# mount | column -t # ²é¿´¹Ò½ÓµÄ·ÖÇø״̬
# fdisk -l # ²é¿´ËùÓзÖÇø
# swapon -s # ²é¿´ËùÓн»»»·ÖÇø
# hdparm -i /dev/hda # ²é¿´´ÅÅ̲ÎÊý(½öÊÊÓÃÓÚIDEÉ豸)
# dmesg | grep IDE # ²é¿´Æô¶¯Ê±IDEÉ豸¼ì²â×´¿ö
ÍøÂç
# ifconfig # ²é¿´ËùÓÐÍøÂç½Ó¿ÚµÄÊôÐÔ
# iptables -L # ²é¿´·À»ðǽÉèÖÃ
# route -n # ²é¿´Â·Óɱí
# netstat -lntp # ²é¿´ËùÓмàÌý¶Ë¿Ú
# netstat -antp # ²é¿´ËùÓÐÒѾ½¨Á¢µÄÁ¬½Ó
# netstat -s # ²é¿´ÍøÂçͳ¼ÆÐÅÏ¢
½ø³Ì
# ps -ef # ²é¿´ËùÓнø³Ì
# top # ʵʱÏÔʾ½ø³Ì״̬
Óû§
# w # ²é¿´»î¶¯Óû§
# id <Óû§Ãû> # ²é¿´Ö¸¶¨Óû§ÐÅÏ¢
# last # ²é¿´Óû§µÇ¼ÈÕÖ¾
# cut -d: -f1 /etc/passwd # ²é¿´ÏµÍ³ËùÓÐÓû§
# cut -d: -f1 /etc/group # ²é¿´ÏµÍ³ËùÓÐ×é
# crontab -l # ²é¿´µ±Ç°Óû§µÄ¼Æ»®ÈÎÎñ
·þÎñ
# chkconfig --list # ÁгöËùÓÐϵͳ·þÎñ
# chkconfig --list | grep on # ÁгöËùÓÐ
Ïà¹ØÎĵµ£º
1. HCI²ãÐÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI) ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈÐÒé ......
ºÍWindowsϵͳһÑùLinuxÒ²Óо²Ì¬/¶¯Ì¬Á´½Ó¿â£¬ÏÂÃæ½éÉÜ´´½¨ºÍʹÓ÷½·¨£º
¼ÙÉèÓÐÏÂÃ漸¸öÎļþ£º
Í·ÎļþString.h£¬ÉùÃ÷Ïà¹Øº¯ÊýÔÐΣ¬ÄÚÈÝÈçÏ£º
Strlen.c£ºº¯ÊýStrlenµÄʵÏÖ£¬»ñÈ¡¸ø¶¨×Ö·û´®µÄ³¤¶È£¬ÄÚÈÝÈçÏ£º
Strlnen.c£ºº¯ÊýStrNlenµÄʵÏÖ£¬»ñÈ¡¸ø¶¨×Ö·û´®µÄ³¤¶È£¬Èç¹ûÊäÈë×Ö·û´®µÄ³¤¶È´óÓÚÖ¸¶¨µÄ×î´ó³¤¶È£¬Ôò·µ»Ø×î´ ......
-------------
¡¡¡¡ÎĵµÄ¿Â¼
¡¡¡¡-------------
¡¡¡¡1 ʲôÊÇsyslogd
¡¡¡¡2 ÅäÖÃsyslogdµÄ˵Ã÷
¡¡¡¡3 syslogdºÍϵͳÖзþÎñÅäÖÃÖÐÈÕÖ¾µÄ¹Øϵ
¡¡¡¡4 ʲôÊÇlogrotate
¡¡¡¡5 ÅäÖÃlogrotateµÄ˵Ã÷
¡¡¡¡-------------
¡¡¡¡ÎĵµÕýÎÄ
¡¡¡¡-------------
¡¡¡¡1 ʲôÊÇsyslogd
¡¡¡¡syslogd¿ÉÒÔ¼òµ¥µØ±»³ÆΪ¼Ç¼ϵͳ»î¶¯µ ......
LinuxÖÐtty¡¢pty¡¢ptsµÄ¸ÅÄîÇø±ð
»ù±¾¸ÅÄ
1> tty(ÖÕ¶ËÉ豸µÄͳ³Æ):
ttyÒ»´ÊÔ´ÓÚTeletypes£¬»òÕßteletypewriters£¬ÔÀ´Ö¸µÄÊǵ紫´ò×Ö»ú£¬ÊÇͨ¹ý´®ÐÐÏßÓôòÓ¡»ú¼üÅÌͨ¹ýÔĶÁºÍ·¢ËÍÐÅÏ¢µÄ¶«Î÷£¬ºóÀ´ÕⶫÎ÷±»¼üÅÌÓëÏÔʾÆ÷È¡´ú£¬ËùÒÔÏÖÔÚ½ÐÖն˱ȽϺÏÊÊ¡£
ÖÕ¶ËÊÇÒ»ÖÖ×Ö·ûÐÍÉ豸£¬ËüÓжàÖÖÀàÐÍ£¬Í¨³£Ê¹ÓÃttyÀ´¼ò³Æ¸÷ ......
¸ÉÂïѧϰ Scripts
Õâ¸öÎÊÌâ¿ÉÓÐȤµÄºÜÁË£¬ÎÒΪʲôҪѧϰ scripts ÄØ£¿²»ÒªÑ§¿É²»¿ÉÒÔѽ£¡£¿ºÇºÇ£¡Èç¹ûÄúÖ»ÏëÒª¡º»áÓá» Linux ¾ÍºÃµÄ»°£¬ÄÇôÕâÒ»¸ö²¿·Öȷʵ¿ÉÒÔÏÈÌø¹ýÈ¥²»¿´Ò²Ã»¹Øϵ£¬²»¹ý£¬Èç¹ûÄúÏëÒª¸ü¼ÓµÄÁ˽âÓë¿ØÖÆ Linux £¬Ê¹ Linux ÔË×÷¸ü˳³©Ö®Í⣬»¹¿ÉÒÔ¸ßÕíÎÞÓǵÄÈÃÄãµÄ Linux Server ÔÚ Internet ÉÏÃæÌṩÏà¹Ø ......