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

LinuxÏÂpsÃüÁîÏê½â


linuxÉϽø³ÌÓÐ5ÖÖ״̬:
1. ÔËÐÐ(ÕýÔÚÔËÐлòÔÚÔËÐжÓÁÐÖеȴý)
2. ÖжÏ(ÐÝÃßÖÐ, ÊÜ×è, Ôڵȴýij¸öÌõ¼þµÄÐγɻò½ÓÊܵ½ÐźÅ)
3. ²»¿ÉÖжÏ(ÊÕµ½ÐźŲ»»½ÐѺͲ»¿ÉÔËÐÐ, ½ø³Ì±ØÐëµÈ´ýÖ±µ½ÓÐÖжϷ¢Éú)
4. ½©ËÀ(½ø³ÌÒÑÖÕÖ¹, µ«½ø³ÌÃèÊö·û´æÔÚ, Ö±µ½¸¸½ø³Ìµ÷ÓÃwait4()ϵͳµ÷ÓúóÊÍ·Å)
5. Í£Ö¹(½ø³ÌÊÕµ½SIGSTOP, SIGSTP, SIGTIN, SIGTOUÐźźóÍ£Ö¹ÔËÐÐÔËÐÐ)
ps¹¤¾ß±êʶ½ø³ÌµÄ5ÖÖ״̬Âë:
D ²»¿ÉÖÐ¶Ï uninterruptible sleep (usually IO)
R ÔËÐÐ runnable (on run queue)
S ÖÐ¶Ï sleeping
T ֹͣ traced or stopped
Z ½©ËÀ a defunct (”zombie”) process
Ãû³Æ£ºps
ʹÓÃȨÏÞ£ºËùÓÐʹÓÃÕß
ʹÓ÷½Ê½£ºps [options] [--help]
˵Ã÷£ºÏÔʾ˲¼äÐÐ³Ì (process) µÄ¶¯Ì¬
²ÎÊý£º
ps µÄ²ÎÊý·Ç³£¶à, Ôڴ˽öÁгö¼¸¸ö³£ÓõIJÎÊý²¢´óÂÔ½éÉܺ¬Òå
-A ÁгöËùÓеÄÐгÌ
-w ÏÔʾ¼Ó¿í¿ÉÒÔÏÔʾ½Ï¶àµÄ×ÊѶ
-au ÏÔʾ½ÏÏêϸµÄ×ÊѶ
-aux ÏÔʾËùÓаüº¬ÆäËûʹÓÃÕßµÄÐгÌ
au(x) Êä³ö¸ñʽ :
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
USER: ÐгÌÓµÓÐÕß
PID: pid
%CPU: Õ¼ÓÃµÄ CPU ʹÓÃÂÊ
%MEM: Õ¼ÓõļÇÒäÌåʹÓÃÂÊ
VSZ: Õ¼ÓõÄÐéÄâ¼ÇÒäÌå´óС
RSS: Õ¼ÓõļÇÒäÌå´óС
TTY: Öն˵ĴÎҪװÖúÅÂë (minor device number of tty)
STAT: ¸ÃÐг̵Ä״̬:
D: ²»¿ÉÖжϵľ²Ö¹
R: ÕýÔÚÖ´ÐÐÖÐ
S: ¾²Ö¹×´Ì¬
T: ÔÝÍ£Ö´ÐÐ
Z: ²»´æÔÚµ«ÔÝʱÎÞ·¨Ïû³ý
W: ûÓÐ×ã¹»µÄ¼ÇÒäÌå·ÖÒ³¿É·ÖÅä
<: ¸ßÓÅÏÈÐòµÄÐгÌ
N: µÍÓÅÏÈÐòµÄÐгÌ
L: ÓмÇÒäÌå·ÖÒ³·ÖÅä²¢ËøÔÚ¼ÇÒäÌåÄÚ (¼´Ê±ÏµÍ³»òÞßA I/O)
START: Ðг̿ªÊ¼Ê±¼ä
TIME: Ö´ÐеÄʱ¼ä
COMMAND:ËùÖ´ÐеÄÖ¸Áî
·¶Àý£º
ps
PID TTY TIME CMD
2791 ttyp0 00:00:00 tcsh
3092 ttyp0 00:00:00 ps
% ps -A
PID TTY TIME CMD
1 ? 00:00:03 init
2 ? 00:00:00 kflushd
3 ? 00:00:00 kpiod
4 ? 00:00:00 kswapd
5 ? 00:00:00 mdrecoveryd
.......
% ps -aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.7 1096 472 ? S Sep10 0:03 init [3]
root 2 0.0 0.0 0 0 ? SW Sep10 0:00 [kflushd]
root 3 0.0 0.0 0 0 ? SW Sep10 0:00 [kpiod]
root 4 0.0 0.0 0 0 ? SW Sep10 0:00 [kswapd]
¾ßÌåÃüÁî½âÊÍÈçÏ£º
¡¡¡¡1£©ps a ÏÔʾÏÖÐÐÖն˻úϵÄËùÓгÌÐò£¬°üÀ¨ÆäËûÓû§µÄ³ÌÐò¡£
¡¡¡¡2£©ps -A ÏÔʾËùÓгÌÐ


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì£¨Èý£© HCI²ã±à³Ì

1. HCI²ãЭÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI)  ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈЭÒé ......

LinuxÉ豸ģÐÍÖ®input×ÓϵͳÏê½â

Ò»£ºÇ°ÑÔ
×î½üÔÚÑо¿androidµÄsensor driver£¬Ö÷ÒªÊÇE-compass£¬ÆäÖÐÓõ½ÁËLinux input×Óϵͳ.ÔÚÍøÉÏÒ²¿´Á˺ܶàÕâ·½ÃæµÄ×ÊÁÏ£¬¸Ð¾õ»¹ÊÇÕâƪ·ÖÎöµÄ±È½ÏϸÖÂ͸³¹£¬Òò´ËתÔØÒ»ÏÂÒÔ±ã×Ô¼ºÑ§Ï°£¬Í¬Ê±ºÍ´ó¼Ò·ÖÏí£¡
£¨Õâƪ²©¿ÍÖ÷ÒªÊÇÒÔ¼üÅÌÇý¶¯ÎªÀýµÄ£¬²»¹ý½²½âµÄÊÇLinux Input Subsystem£¬¿ÉÒÔ×ÐϸµÄÑо¿Ò»Ï£¡£©
¼üÅÌÇý¶¯½«¼ì ......

linux C gbk utf 8±àÂëת»»

ÓÃlinux C ϵĺ¯Êýµ÷Óô´½¨ÖÐÎÄĿ¼¡¢ÎļþµÈ£¬×Ö·û´®µÄ±àÂë¸ñʽҪÇóÊÇutf-8¸ñʽµÄ¡£
±ÈÈçÏëҪʹÓà int mkdir(const char *pathname, mode_t mode); ´´½¨Ò»¸öÖÐÎĵÄĿ¼¡£ÄÇôpathnameµÄ±àÂë¸ñʽҪÇóÊÇutf-8µÄ£¬¶ø²»ÄÜÊÇgb3212/gbkµÄ£¬·ñÔò¾ÍÊÇÂÒÂë¡£
ÄÇôÈç¹ûlinux CÏÂÈçºÎ½øÐÐgbk<---->utf-8±àÂëת»»µÄ±àÂë×°»»µÄ ......

LinuxϵͳÎļþĿ¼¼ò½é[ת]

Ò»¡¢¼ò½é: Linux²Ù×÷ϵͳÖÐ,ÒÔÎļþÀ´±íʾËùÓеÄÂß¼­ÊµÌåÓë·ÇÂß¼­ÊµÌå¡£Âß¼­ÊµÌåϵָÎļþÓëĿ¼; ·ÇÂß¼­ÊµÌåÔò·ºÖ¸Ó²ÅÌ¡¢Öն˻ú¡¢´òÓ¡»úµÈ¡£
Ò»°ã¶øÑÔ,LinuxÎļþÃû³ÆµÄ×é³É³ýÓÉÁ¬Ðø×Öĸ¡¢±êµã·ûºÅ¡¢Êý×ֵȹ¹³ÉÍâ,Öм䲻ÄÜÓпոñ·û¡¢Â·¾¶Ãû³Æ·ûºÅ / »ò # * % & {} [] ¡­¡­..µÈÓëShellÓйصÄÌØÊâ×Ö·û¡£
LinuxÎļþÏµÍ ......

linux»ù´¡ÖªÊ¶£¨×ª£©

¾ÙÀýÀ´Ëµ£¬Ó²Å̵ÄÎļþÃû³Æ¼´Îª /dev/hd[a-d] £¬ÆäÖУ¬ À¨ºÅÄÚµÄ×ÖĸΪ a-d µ±ÖеÄÈκÎÒ»¸ö£¬Ò༴ÓÉ /dev/hda, /dev/hdb, /dev/hdc, ¼° /dev/hdd ÕâËĸöµµ°¸µÄÒâ˼ (×¢£ºÕâÖÖÐÍʽµÄ±íʾ·¨ÔÚºóÃæµÄÕ½ڵ±ÖлáʹÓõúÜƵ·±£¬ÇëÌرðÁôÒâ)¡£ ÄÇô¹âÇýÓëÈíÅÌÄØ£¿·Ö±ðÊÇ /dev/cdrom, /dev/fd0 啰£¡ ºÃÁË£¬ÆäËüµÄ½Ó¿ÚÉ豸ÄØ£¿ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ