
OS/Linux
文章平均质量分 51
fanbird2008
这个作者很懒,什么都没留下…
展开
-
debian linux root login on desktop
1. gedit /etc/pam.d/gdm3 note root as followings #auth required pam_succeed_if.so user != root quiet_success 2. gedit /etc/gdm3/daemon.conf in [security] add one line as fol原创 2012-11-15 11:50:29 · 664 阅读 · 0 评论 -
git download ffmpeg x264 etc
git clone git://source.ffmpeg.org/ffmpeg.git ffmpeggit clone git://git.videolan.org/x264.git x264原创 2012-11-16 17:05:00 · 645 阅读 · 0 评论 -
The Deep Tour of /proc/sys/fs/
http://www.systhread.net/texts/199910tfsp.phpThe Deep Tour of /proc/sys/fs/dentry-stateThe status of the directory cache. It holds six values:nr_dntry: always 0nr_used: unused directory ca转载 2012-02-15 10:12:53 · 647 阅读 · 0 评论 -
linux partition
http://blog.youkuaiyun.com/aaronychen/article/details/2270048在学习 Linux 的过程中,安装 Linux 是每一个初学者的第一个门槛。在这个过程中间,最大的困惑莫过于给硬盘进行分区。虽然,现在各种发行版本的 Linux 已经提供了友好的图形交互界面,但是很多的人还是感觉无从下手。这其中的原因主要是不清楚 Linux 的分区规定,以转载 2012-02-03 11:23:31 · 4351 阅读 · 0 评论 -
build linux kernel -- make menuconfig
in linux source top directory1. Kbuild in the top directory 2. run make menuconfig in the top directory原创 2011-11-22 17:37:10 · 477 阅读 · 0 评论 -
linux mount nfs and cifs
linux nfs1. edit /etc/exports file/home/test/tnfs 192.168.64.0/24(rw,sync,root_squash,no_subtree_check,anonuid=1017,anongid=1001)2. exportfs -a3. mountmount -t nfs -o nolock,soft,intr,timeo=原创 2011-11-16 17:02:49 · 2979 阅读 · 0 评论 -
debian linux interfaces and resolv configuration
1. /etc/network/interfaces file example # This file describes the network interfaces available on your system# and how to activate them. For more information, see interfaces(5).# The loopback原创 2012-11-15 13:25:09 · 540 阅读 · 0 评论 -
ldconfig problem
/usr/local/lib /libstdc++.so.6: no version information available前段时间装了gcc-4.1,这样加上原来的gcc-4.2就有了两个gcc;然后我的ubuntu上的scim和apt-get等和 libstdc++.so.6有关的程序都不能运行了。总是出现:/usr/local/lib /libstdc++.s转载 2012-05-07 13:07:14 · 1382 阅读 · 0 评论 -
linux物理内存描述
http://blog.youkuaiyun.com/bullbat/article/details/7166736群英荟萃┃数学算法:95359581,106675157转载 2012-04-06 10:11:08 · 504 阅读 · 0 评论 -
linux内核对伙伴系统的改进--migrate_type
http://blog.youkuaiyun.com/dog250/article/details/6108028linux底层使用伙伴系统-buddy管理物理内存,buddy可以被证明是一种很有效的内存管理方式,但是它也拥有很多缺点,其中碎片避免的不完备性--仅仅寄托于释放时的合并操作而不考虑分配时的策略,这也许是它最大的不足,linux2.6内核的后期版本对这个问题进行了改进,大大避免了碎转载 2012-04-06 09:58:57 · 609 阅读 · 0 评论 -
linux SIGSEGV and SIGBUS
http://blog.youkuaiyun.com/hpwzd/article/details/6434231涉及共享内存的管理就不能不提到访问共享内存对象。谈到访问共享内存对象就要留神“SIGSEGV和SIGBUS”这两个信号。系统分配内存页来承载内存映射区,由于内存页大小是固定的,所以存在多余的页空间空闲,比如待映射文件大小为5000 bytes,内存映射区大小也为5000 bytes。而一转载 2012-02-21 08:46:48 · 1249 阅读 · 0 评论 -
kernel and user stack
进程创建的时候每个进程分配了8K的系统栈,除了一部分用来存放task_struct,内核栈 用来 表示 进程 由于某种原因进入内核(比如系统调用/Exception)的时候用的。你想啊,进程进入内核后,执行一系列函数,保持函数的返回地址,传递参数啥的,就要用到这个内核栈了。 所以说,在内核中如果使用 较多的递归 会溢出内核栈的。oops用户栈就是在用户空间指向函数调用的时候用的。 这个转载 2012-02-17 17:26:21 · 815 阅读 · 0 评论 -
syslog-ng.conf sample
## Configuration file for syslog-ng under Debian## attempts at reproducing default syslog behavior# the standard syslog levels are (in descending order of priority):# emerg alert crit err wa原创 2011-12-20 13:48:07 · 1231 阅读 · 0 评论 -
linux check netcard down or up
// return 1 -- netcard up// other value -- netcard down int GetNetlinkStatus(uint8_t *ifname) { int sockfd; struct ifreq ifr; struct ethtool_value edata;原创 2011-10-31 16:37:40 · 947 阅读 · 0 评论 -
waitpid WNOHANG WUNTRACED WCONTINUED
1. waitpid(pid, &status, WNOHAND)waitpid wil return immediately if no child has exited.2. waitpid(pid, &status, WUNTRACED)also return if a child has stopped (but not traced via ptrace(2)).e.g.原创 2011-07-08 16:12:56 · 3853 阅读 · 0 评论 -
signal fork execl
#include #include #include #include #include #include void sig_int(int signo){ printf("pid [%d] interrupt by [%d].\n", getpid(), signo); fflush(stdout);}int main(int argc原创 2011-07-08 14:04:06 · 946 阅读 · 0 评论 -
Linux环境进程间通信
Linux环境进程间通信(二): 信号(上)郑彦兴 (mlinux@163.com)国防科大郑彦兴,国防科大攻读博士学位。联系方式:mlinux@163.com 简介: linux信号机制远远比想象的复杂,本文力争用最短的篇幅,对该机制做了深入细致的分析。读者可以先读一下信号应用实例(在信号(下)中),这样可以对信号发送直到相应的处理函数执行完毕这一过程有个大致的印转载 2011-07-08 11:16:04 · 425 阅读 · 0 评论 -
an example for ram file system
#!/bin/sh#this script can only be executed by root, check it firstid=`id -u`if [ $id -ne 0 ]; then echo "You must be root to run this script." exit 1else build_dir=$原创 2011-05-06 18:40:00 · 516 阅读 · 0 评论 -
signal meanings
24.2.1 Program Error SignalsThe following signals are generated when a serious program error is detected by the operating system or the computer itself. In general, all of these signals are indicati转载 2012-05-25 14:17:28 · 691 阅读 · 0 评论 -
How do I enable core dumps for everybody
OverviewIn most Linux Distributions core file creation is disabled by default for a normal user. However, it can be necessary to enable this feature for an application (e.g. Oracle). For example,转载 2012-05-25 10:45:59 · 674 阅读 · 0 评论 -
linux inode
理解inode作者: 阮一峰日期: 2011年12月 4日inode是一个重要概念,是理解Unix/Linux文件系统和硬盘储存的基础。我觉得,理解inode,不仅有助于提高系统操作水平,还有助于体会Unix设计哲学,即如何把底层的复杂性抽象成一个简单概念,从而大大简化用户接口。下面就是我的inode学习笔记,尽量保持简单。=========转载 2012-02-01 16:20:00 · 713 阅读 · 0 评论 -
find which process use some tcp/udp port
windows platform1. run command netstat -a -n -o from the output find the pid id for the port2. open task management or run command tasklist /svc /FI "pid eq 2404" linux原创 2011-12-29 14:32:59 · 491 阅读 · 0 评论 -
shell example
#!/bin/shrm -f 111svn log|grep lines|cut -d'|' -f1|while read revdo rev=${rev:1:999} svn log -r $rev -v >> 111done------------------------------------------------------- static原创 2011-08-04 10:17:35 · 630 阅读 · 0 评论 -
vm linux disk extend etc
1. how to enter bios F2: BIOS SetupSince wmware start too fast, on generally, the parameter configuration on file will be more feasible.The way is as followings.1.) modify vmware's vmx file原创 2012-11-20 10:21:31 · 769 阅读 · 0 评论 -
linux process state
As its name implies, the state field ofthe process descriptor describes what is currently happening to theprocess. It consists of an array of flags, each of which describes apossible process sta转载 2012-10-24 17:08:36 · 718 阅读 · 0 评论 -
vmLinuz initrd and system.map
http://hi.baidu.com/mrdenglazy/blog/item/29e9a8d3683e7b063af3cf52.html在网络中,不少服务器采用的是Linux系统。为了进一步提高服务器的性能,可能需要根据特定的硬件及需求重新编译Linux内核。编译Linux内核,需要根据规定的步骤进行,编译内核过程中涉及到几个重要的文件。比如对于RedHat Linux,在/b转载 2012-04-05 16:39:13 · 626 阅读 · 0 评论 -
passwd auto change
#!/bin/sh passwd $USER $USER$USEREOF原创 2012-03-27 15:04:52 · 396 阅读 · 0 评论 -
Ubuntu常用软件及C/C++开发环境的安装和配置
http://hi.baidu.com/jjxiaoyan/blog/item/732af6244fa81a288644f948.html Ubuntu常用软件及C/C++开发环境的安装和配置2011-08-29 17:49一、更新软件源和系统1. 更新软件源apt-get update2. 更新系统apt-get upgrade3转载 2011-12-22 13:34:02 · 1489 阅读 · 0 评论 -
iptable config example
enable port 3306 not blocked by iptableiptables -A INPUT -i eth1 -p tcp --destination-port 3306 -j ACCEPT原创 2011-07-14 11:18:25 · 629 阅读 · 0 评论 -
linux thread model
Linux上posix线程库实现原理讨论说明一下,这个问题困扰我好长时间,因为正如使用C编程会希望了解进程的内存映象一样,使用POSIX线程库我们也会想去了解其实现的原理。目前只是查过一些资料,或许仍然有误解的地方,请大家继续指正 :) 首先我们需要了解线程(threads)是个什么概念。在传统UNIX中,进程(process,就是Intel所谓的task)是调度的最小单转载 2011-09-06 11:40:14 · 5595 阅读 · 0 评论 -
imlib2 compile env build with debian linux
1. download imlib2 imlib2-1.4.5.tgz2. uncompress imlib2 packet tar zxf imlib2-1.4.5.tgz3. install dependency packet3.1 install image format dev packet apt-get install libpng12-dev原创 2012-12-03 15:29:40 · 970 阅读 · 0 评论 -
gdb usage
1. finish return from function debug2. p p buf[i] p/x buf[i]3. x x/64ubx buf4. s5. n原创 2012-11-22 09:34:41 · 526 阅读 · 0 评论 -
debian linux source list
deb http://ftp.cn.debian.org/debian squeeze main non-freedeb-src http://ftp.cn.debian.org/debian squeeze main non-freedeb http://ftp.cn.debian.org/debian squeeze-updates main non-freedeb-src htt原创 2012-11-24 21:48:22 · 1359 阅读 · 0 评论 -
Linux Makefile
EXECUTE=test STATICLIB= DYNAMICLIB= SRCS+=$(wildcard *.c ./src/*.c) \ $(wildcard *.cpp) OBJS=$(patsubst %.c,%.o,$(SRCS) ) CC=gcc LDFLAGS= DYFLAGS= LIBDIR= INCLDIR= CFLAGS=-Wall转载 2012-12-06 18:31:42 · 497 阅读 · 0 评论 -
coredump file
1.core文件的生成开关和大小限制———————————1)使用ulimit -c命令可查看core文件的生成开关。若结果为0,则表示关闭了此功能,不会生成core文件。2)使用ulimit -c filesize命令,可以打开并限制core文件的大小(filesize的单位为kbyte)。 若ulimit -c unlimited,则表示core文件的大小不受限制。如转载 2011-07-26 13:10:02 · 512 阅读 · 0 评论 -
Linux Makefile
LOCAL_ROOT := $(shell pwd)/..LOCAL_CPP_SRCS := $(wildcard *.cpp) LOCAL_CPP_OBJS := $(patsubst %.cpp, %.o, $(LOCAL_CPP_SRCS))LOCAL_INC := $(LOCAL_ROOT)/includeLOCAL_INC += $(LOCAL_ROOT)/client原创 2012-12-07 18:25:18 · 502 阅读 · 0 评论 -
dss linux makefile
# Copyright (c) 1999 Apple Computer, Inc. All rights reserved.# NAME = DarwinStreamingServerC++ = $(CPLUS)CC = $(CCOMP)LINK = $(LINKER)CCFLAGS += $(COMPILER_FLAGS) -DDSS_USE_API_CALLBAC转载 2012-12-10 17:30:48 · 1267 阅读 · 0 评论 -
linux IO NON-BLOCK note
1. fd is set to O_NONBLOCK if you select against the fd, it will return 0 (timeout) always. Therefore, pls remind yourself for this.原创 2012-12-11 16:44:42 · 635 阅读 · 0 评论 -
ubuntu 12.04 root login configuration
1. modify the file /etc/lightdm/lightdm.conf[SeatDefaults]greeter-session=unity-greeteruser-session=ubuntu############# new-added###########greeter-show-manual-login=trueallow-guest=false原创 2012-12-13 10:55:20 · 656 阅读 · 0 评论 -
ubuntu network configuration example
for ubuntu, nameserver must be configuration both in interfaces and resolv conf 1. /etc/network/interfacesauto loiface lo inet loopbackauto eth0iface eth0 inet static address 192.原创 2012-12-13 11:27:25 · 673 阅读 · 0 评论