linux 创建自启动程序
两种方法:
自启动程序方法1:
在etc/rc.local在里面加入/home/robin/code/autoruntest > /dev/null &(其中autoruntest 测试程序名称,下同)。即可自启动
注:/etc/rc.local -> /etc/rc.d/rc.local
自启动程序方法2:
创建linux服务,步骤如下:
1) 写服务启动脚本文件(后附例子)
2) 修改脚本文件chmod 777 autoruntest
3) 脚本文件拷贝到 /etc/rc.d/init.d/
4) chkconfig --add autoruntest 添加服务
5) 重新启动(完成)
其中到了第三步后就可以使用service启动停止了,service autoruntest start
要自启动必须使用chkconfig 将服务添加到系统中。
注:/etc/init.d ->/etc/rc.d/init.d
启动脚本文件:
相关文档:
3.2.1 Linux 内存绑定在局部存储器的实现总体步骤
总体步骤:
l 采用方案三,在在原来分析的基础上,以及已知Linux系统内存的初始化的情况,对内核代码进行修改,主要包括确定新区的范围,建立新区,重新对分配内存的分配机制进行设置。
l &n ......
1.自启动:
在/etc/inittab文件中设置:
# Default runlevel. (Do not set to 0 or 6)
id:5:initdefault:
2.字符终端模式下启动x-windows:
startx ......
cd 看盘符进入一个目录
ls   ......
基于进程的命令方式查看:
`ps -o pcpu,pmem,nlwp -p $PID`
#(pmem = % mem usage and nlwp is number of threads)
其中pcpu定义是:cpu utilization of the process in “##.#” format. It is the CPU time used divided by the time the process has been running (cputime/realtime ratio), expressed as a ......