LinuxÏÂÓÃPYTHON²éÕÒͬÃû½ø³Ì
1.¿ÉÖ´ÐгÌÐò
os.system('pgrep %s > %s' % (process, output))
pidfile = open("output", 'r')
totalpid = len(pidfile.readlines())
pidfile.close()
if totalpid == 0 :
#ûÓнø³Ì
return False
elif totalpid > 1 :
#¶à¸ö½ø³Ì
os.system('killall -9 %s' % (process))
return False
else :
return True
2.python Æô¶¯µÄ½Å±¾
os.system('ps aux | grep %s > %s' % (process, output))
&nbs
Ïà¹ØÎĵµ£º
£¨L2CAPÐÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPÐÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼Á¬½Ó¿ØÖƺÍÊÊÅäÐÒé (L2CAP) ΪÉϲãÐÒéÌá¹©ÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àÐÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãÐÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......
ÀµÓºƣ¨http://laiyonghao.com£©
½ñÌ죨2009Äê5ÔÂ31ÈÕ£© OurPNP.org ¸ãÁ˸ö¾Û»á»î¶¯£¬ÅªÁËÊ®¼¸¶þÊ®¸öÈËÔÚ¹ãÖݺ£Öé¹ã³¡µÄÌûá´ôÁËÎå¸öСʱ£¬´´ÏÂÁËÎÒÔÚ K ·¿´ôµÄ×ʱ¼ä¼Í¼¡£Ó¦ËûÃǵÄÑûÇ룬ÎÒ×öÁ˸öÌâΪ¡¶Óà python ¿ìËÙ´î½¨ÍøÓηþÎñÆ÷¡·µÄСÑݽ²£¬ÒòΪÄDZߵĵçÊÓ¾¹È»²»ÄܽӵçÄÔ£¬ËùÒÔ½²µÄʱºòûÓÐÄܹ»²ÎÕÕ PPT À´½²£¬¹Û ......
ϵͳҪÇó£º
¡¡¡¡ÄÚ´æ£ºÍÆ¼ö1G
¡¡¡¡Swap·ÖÇø£ºÉèΪÄÚ´æµÄ2±¶
¡¡¡¡/tmp´ÅÅ̿ռ䣺400MBÒÔÉÏÈý
¡¡¡¡´ÅÅ̿ռ䣺Èí¼þ3.5G Êý¾Ý1.2G
¡¡¡¡ËùÐèÈí¼þ£º
¡¡¡¡SuSE Linux10 for x86
¡¡¡¡Oracle database 10gR2 for Linux32
¡¡¡¡Orarun-1.8-109.15.i586.rpmÈí¼þ°ü£¬¿ÉÒÔ´Óhttp://Ftp.novell.com/partners/Oracle/sels-9ÏÂÔØ
&n ......
1£® ´´½¨Ä¿Â¼
mkdir –p test/sub
2£® ÔÚ×ÓĿ¼sub/ϱàдhello.cºÍhello.h
/*****hello.c*****/
#include <stdio.h>
#include “hello.h”
void hello()
{
printf(“Hello!\n”);
}
/*****hello.h**** ......
ÕâÆªÎÄÕ»ù±¾ÉϽ²Ã÷°×ÁËÈçºÎ°²×°LinuxÏ嵀 vmtools£¬²»¹ýÎÒºÍËûµÄ°²×°²»Í¬£¬ËùÒÔ½ö¹©²Î¿¼£¬¾ßÌåʵÏÖÒª¿´ÊÇÄÇÖÖLinuxϵͳ£¬»òÕßÊǾßÌåµÄÄǸö°æ±¾£¬ÎÒÓÃredhatºÍubuntu¡£»ù±¾²Ù×÷¾ÍÊÇ£º
¹ÒÔØ¹âÇý¡¢¸´ÖÆÎļþµ½tmp¡¢½âѹ¡¢°²×°¡¢Ò»Â·Ä¬ÈÏ¡¢°²×°Íê³É¡£
1¡¢ÒÔROOTÉí·Ý½øÈëLINUX
2¡¢°´Ï CTRL+ALT×éºÏ¼ü£¬½øÈëÖ÷²Ù×÷ϵͳ£ ......