采购师培训鉴定:AIX中的inittab?文件
来源:百度文库 编辑:九乡新闻网 时间:2024/04/18 04:27:33
AIX中的inittab 文件
/etc/inittab 文件控制着初始化过程。/etc/inittab 文件为 init 命令提供脚本作为一个普通进程调度程序。构成 init 命令进程调度活动的主要(多数)进程是 /etc/getty 线进程(line process),发起(启动)专用线进程。被 init 命令特别调度的其他进程为后台进程(Daemon)和shell。/etc/inittab 文件由位置相关[position-dependent ]的条目组成,格式如下:Identifier: 标识唯一对象的一个 1-4 位字符的字段。
RunLevel: 该条目运行的级别。
运行级别有下列属性:
Action: 告知 init 命令如何处理在 process 字段指定的进程。init 命令可识别的 actions 如下:
Command: 可执行的壳(shell)命令。整个 command 字段以 exec 为前缀,并传给一个 forked sh成为 sh -c exec 命令。任何合法的 sh 命令语法都可出现在该字段。并可用 # 插入注释。
mkitab: 把记录添加到 /etc/inittab 文件。
lsitab: 列出 /etc/inittab 文件中的记录。
chitab: 修改 /etc/inittab 文件中的记录。
rmitab: 从 /etc/inittab 文件中删除记录。
1. 运行 ps 命令,只显示包含 find 的进程:
# ps -ef | grep find
root 19750 13964 0 10:47:23 pts/0 0:00 grep find
#
2. 使用 mkitab 命令,在 /etc/inittab 文件中添加一个名为 xcmd 的记录:
# mkitab "xcmd:2:respawn:find / -type f > /dev/null 2>&1"
3. 使用 lsitab 命令显示新记录:
# lsitab xcmd
xcmd:2:respawn:find / -type f > /dev/null 2>&1
#
4. 查看进程:
# ps -ef | grep find
root 25462 1 6 10:56:58 - 0:00 find / -type f
root 28002 13964 0 10:57:00 pts/0 0:00 grep find
#
5. 取消 find 命令进程:
# kill 25462
6. 查看进程:
# ps -ef | grep find
root 23538 13964 0 10:58:24 pts/0 0:00 grep find
root 28966 1 4 10:58:21 - 0:00 find / -type f
#本例中,由于 action 字段被配置 respawn,故而每一次该命令一完成,一个新进程就会启动。该进程将继续再生(re-spawning),除非修改 action 字段,例如:
1. 把记录 xcmd 的 action 字段由 respawn 修改为 once:
# chitab "xcmd:2:once:find / -type f > /dev/null 2>&1"
2. 查看进程:
# ps -ef | grep find
root 20378 13964 0 11:07:20 pts/0 0:00 grep find
root 28970 1 4 11:05:46 - 0:03 find / -type f
3. 取消 find 命令进程:
# kill 28970
4. 查看进程:
# ps -ef | grep find
root 28972 13964 0 11:07:33 pts/0 0:00 grep find
#要从 /etc/inittab 文件中删除该记录,可使用 rmitab 命令。例如:
# rmitab xcmd
# lsitab xcmd
#/etc/inittab 条目的次序/etc/inittab 文件中的基本进程条目次序安装如下:
1. initdefault
2. sysinit
3. Powerfailure Detection (powerfail)
4. Multiuser check (rc)
5. /etc/firstboot (fbcheck)
6. System Resource Controller (srcmstr)
7. Start TCP/IP daemons (rctcpip)
8. Start NFS daemons (rcnfs)
9. cron
10.pb cleanup (piobe)
11.getty for the console (cons)
由于NFS需要TCP/IP进程(Daemon)才能正常运行,所以TCP/IP进程必须在NFS进程之前被启动。
/etc/inittab 文件中的条目按相互依赖性排序,就是说,如果一个进程(process2)需要另外一个进程(process1)存在才能正常运行,那么在 /etc/inittab文件中,process1的条目应该在process2的条目之前。
AIX中的inittab?文件
aix 下tapeutil /dev/rmt*文件说明
请问AIX如何配置telnet 服务和 FTP 服务,需要配置哪些文件 - AIX及IBM...
在AIX 上MOUNT *.ISO镜像文件
读取文件中的坐标
AIX中如何确定磁带库设备和操作系统设备文件的对应关系
如何整理电脑中的文件
C++中的文件输入/输出
给电脑中的文件加密
C++中的文件输入/输出(6
windows文件夹中的哪些文件可以删除
帮你整理电脑中的文件
axis?中的几个配置和管理文件
system32中的pskill.EXE是什么文件??
帮你整理电脑中的文件
认识XP系统中的十个特殊文件
浅析C#中的文件操作实例
如何保存网页中的Flash文件?
如何复制PDF文件中的图片? 帮助
怎样给你电脑中的文件加密
AIX常见问题整理 (4)
AIX 常用命令汇总
AIX lsgroup 命令
AIX下vmstat详解