linuxº¯Êý¡¢½á¹¹ÌåÑо¿
ѧϰ±ðÈ˵ģ¬¼Ç¼×Ô¼ºµÄ¡£
1¡¢sysinfoÓ÷¨
#include <sys/sysinfo.h>
int sysinfo(struct sysinfo info);
¼Ç¼ÁËlinuxÖÐÆô¶¯Ê±¼ä¡¢ÄÚ´æÐÅÏ¢¡¢½»»»·ÖÇø¡¢cpu¸ºÔصÈÐÅÏ¢¡£
³É¹¦·µ»Ø0£¬Ê§°Ü·µ»Ø-1
struct sysinfo {
long uptime; /* Seconds since boot */
unsigned long loads[3]; /* 1, 5, and 15 minute load averages */
unsigned long totalram; /* Total usable main memory size */
unsigned long freeram; /* Available memory size */
unsigned long sharedram; /* Amount of shared memory */
unsigned long bufferram; /* Memory used by buffers */
unsigned long totalswap; /* Total swap space size */
unsigned long freeswap; /* swap space still available */
unsigned short procs; /* Number of current processes */
unsigned long totalhigh; /* Total high memory size */
unsigned long freehigh; /* Available high memory size */
unsigned int mem_unit; /* Memory unit size in bytes */
char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding for libc5 */
};
2¡¢statfsÓ÷¨
#include <sys/vfs.h>
int statfs(const char *path, struct statfs *buf);
int fstatfs(int fd, struct statfs *buf);
struct statfs{
long f_type; ¡¢/*ÎļþϵͳÀàÐÍ*/
long f_bsize; /*¾¹ýÓÅ»¯µÄ´«Êä¿é´óС*/
long f_blocks; /*ÎļþϵͳÊý¾Ý¿é×ÜÊý*/
long f_bfree; /*Îļþϵͳ¿ÕÏпé*/
long f_bavail; /*·Ç³¬¼¶Óû§¿ÉÒÔÓõĿéÊý*/
long f_files; /*Îļþ½Úµã×ÜÊý*/
long f_ffree; /*¿ÕÏÐÎļþ½Úµã×ÜÊý*/
fsid_t f_fsid; /*Îļþϵͳ±êʶ*/
long f_namelen; /*ÎļþÃûµÄ×î´ó³¤¶È*/
};
Ïà¹ØÎĵµ£º
1) linuxĿ¼¼Ü¹¹
/ ¸ùĿ¼
/bin ³£ÓõÄÃüÁî
binary file µÄÄ¿錄
/boot ´æ·ÅϵͳÆô¶¯Ê±±ØÐë¶ÁÈ¡µÄµµ°¸£¬°üÀ¨ºËÐÄ
(kernel) ÔÚÄÚ
/boot/grub/menu.lst GRUBÉèÖÃ
/boot/vmlinuz ÄÚºË
  ......
¹éÄÉÒ»ÏÂlinuxÏ¿ª·¢µÄautomakeÏà¹ØµÄ£¬Ã»ÓÐʱ¼äдֻºÃ×ªÔØÒ»Ð©ºÃµÄÁË
±¾ÎÄ×ªÔØÓÚ£º http://www.ibm.com/developerworks/cn/linux/l-makefile/
Àý½â autoconf ºÍ automake Éú³É Makefile Îļþ
Ñî С»ª
(normalnotebook@126.com
), Linux ÄÚºËÑо¿Ô±
ËÕ ´ºÑÞ
, ÔÚ¶ÁÑо¿Éú
2006 Äê 9 ÔÂ 21 ÈÕ ......
ubuntu9.10
ĬÈϰ²×°ÁË iBus
ÊäÈë·¨£¬Õâ¸öÊäÈë·¨ºÜºÃÓ㬵«ÊÇĬÈϵ½ÅäÖò»ºÏÀí£¬Òò´ËÓ¦¸ÃÉèÖÃһϡ£
iBus
ÉèÖò½Ö裺
* °²×° ÖÐÎÄÓïÑÔÖ§³Ö£º
ĬÈÏÏ£¬¿ÉÄÜÖÐÎÄÖ§³Ö²¢²»È«£¬Òò´ËÖÐÎÄÊäÈë·¨Ò²²»È«£¬Èç¹ûÖÐÎÄÖ§³ÖÒѾÍêÈ«°²×°ÔòÌø¹ýÕâ²½¡£
Ìí¼ÓÖÐÎÄÖ§³Ö£º
System -> Administrat ......
ÏÖÔںöàµÄÈË¿ªÊ¼½Ó´¥µçÄÔµÄʱºò£¬¼ûµ½µÄÓ¦¸ÃÊÇWindows98˵ʵ»°£¬98 ÒѾÊÇÒ»¸öºÜÈËÐÔ»¯£¬·â×°µÄºÜºÃµÄÒ»¸öϵͳÁËÒ»¸ö¶ÔµçÄÔÒ»Çϲ»Í¨µÄÈ˶¼ÄܺܿìµÄʹÓÃËü¡£ÕâÑùºÜ¶àÈ˶Ô"µçÄÔ"µÄÓ¡ÏóºÍÄÇЩºÍÎÒÒ»ÑùÒ»¿ªÊ¼½Ó´¥µÄÊÇDOSÈËÊǾøÈ»²»Í¬µÄ¡£ÔÚDOSʱ´ú£¬Èç¹ûÄã¶ÔµçÄԵĻù´¡ÖªÊ¶²»¶®µÄ»°ÊÇÍæ²»¶¯ËüµÄ£¬²»ÏñÏÖÔںöàÈËCPUÊÇʲô¶¼²»Ö ......