Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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±à³Ì(Áù) 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É豸ģÐÍÖ®input×ÓϵͳÏê½â

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

Linuxѧϰ±Ê¼Ç


LinuxµÄĿ¼½á¹¹    etc: ÅäÖÃÎļþ£¬Èçinittab
    proc: procÎļþϵͳ£¬ÏµÍ³ÔËÐйý³ÌÓ³É䣬½ø³ÌÓ³Éä
    É豸Çý¶¯µÄÁ½ÖÖ·½Ê½£º Ö±½Ó±àÒë½øÄںˣ»ÒÔmodule²åÈë
PCµÄLinuxÆô¶¯£ºBIOS->GRUB->KERNEL
SHELL±à³Ì
   Ï൱ÓÚDOSµÄÅú´¦Àí,¿É ......

LINUXÍøÂç±à³Ì,¼òµ¥µÄÁÄÌì³ÌÐò

·þÎñÆ÷¶Ë£º
   ½¨Á¢socket£¬±¾µØµØÖ·°ó¶¨bind£¬È»ºó½¨Á¢¼àÌý£¬Èç¹ûÓпͻ§¶ËÇëÇóÔòÏìÓ¦Ö®£¬È»ºó½øÐÐÊý¾ÝµÄ·¢ËͺͽÓÊÕ
Ô´´úÂë:
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/time.h&g ......

[ת]ÐéÄâ Linux ÐéÄ⻯·½·¨¡¢¼Ü¹¹ºÍʵÏÖ¸ÅÊö

¼¶±ð£º Öм¶ M. Tim Jones, ¹ËÎʹ¤³Ìʦ, Emulex 2007 Äê 1 Ô 15 ÈÕ ÐéÄ⻯µÄº¬Òå·á¸»£¬Ó¦Óù㷺¡£Ä¿Ç°ÐéÄ⻯¼¼ÊõÖ÷Òª¹Ø×¢ÓÚ·þÎñÆ÷ÐéÄ⻯£¬¼´ÔÚÒ»¸öËÞÖ÷¼ÆËã»úÉÏÌṩ¶à¸ö¶ÀÁ¢²Ù×÷ϵͳ¡£±¾ÎĽ«Ì½Ë÷ÐéÄ⻯±³ºóµÄ˼Ï룬ȻºóÌÖÂÛʵÏÖÐéÄ⻯µÄһЩ¼¼Êõ¡£ÎÒÃÇ»¹½«Á˽âÏÖÓеÄÆäËûһЩÐéÄ⻯¼¼Êõ£¬ÀýÈç Linux ÉϲÙ×÷ϵͳµÄÐéÄ⻯ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ