免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 6779 | 回复: 8
打印 上一主题 下一主题

[系统管理] chkconfig --list和chkconfig -A命令的区别是什么啊 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2015-05-14 11:00 |只看该作者 |倒序浏览

chkconfig --list :查询系统服务的运行级信息
chkconfig -A:比chkconfig --list多了boot.*
这两个参数区别是什么?

论坛徽章:
13
技术图书徽章
日期:2014-04-29 14:15:42IT运维版块每日发帖之星
日期:2015-12-12 06:20:00IT运维版块每日发帖之星
日期:2015-08-30 06:20:00IT运维版块每日发帖之星
日期:2015-08-24 06:20:00IT运维版块每日发帖之星
日期:2015-08-02 06:20:002015年亚洲杯之澳大利亚
日期:2015-04-03 15:03:12申猴
日期:2015-03-20 09:00:292015年迎新春徽章
日期:2015-03-04 09:54:452015年辞旧岁徽章
日期:2015-03-03 16:54:15季节之章:冬
日期:2015-01-20 17:08:47双子座
日期:2014-11-21 16:30:31技术图书徽章
日期:2014-07-11 16:29:08
2 [报告]
发表于 2015-05-14 11:35 |只看该作者
-A unknow option

没这个参数

论坛徽章:
0
3 [报告]
发表于 2015-05-14 13:59 |只看该作者
肯定有!百度 chkconfig -A命令能查到

tt.bmp (325.25 KB, 下载次数: 28)

tt.bmp

论坛徽章:
13
技术图书徽章
日期:2014-04-29 14:15:42IT运维版块每日发帖之星
日期:2015-12-12 06:20:00IT运维版块每日发帖之星
日期:2015-08-30 06:20:00IT运维版块每日发帖之星
日期:2015-08-24 06:20:00IT运维版块每日发帖之星
日期:2015-08-02 06:20:002015年亚洲杯之澳大利亚
日期:2015-04-03 15:03:12申猴
日期:2015-03-20 09:00:292015年迎新春徽章
日期:2015-03-04 09:54:452015年辞旧岁徽章
日期:2015-03-03 16:54:15季节之章:冬
日期:2015-01-20 17:08:47双子座
日期:2014-11-21 16:30:31技术图书徽章
日期:2014-07-11 16:29:08
4 [报告]
发表于 2015-05-14 16:00 |只看该作者
tongtian245 发表于 2015-05-14 13:59
肯定有!百度 chkconfig -A命令能查到


你有没有找个真实的系统测试下?

论坛徽章:
0
5 [报告]
发表于 2015-05-14 16:07 |只看该作者
兄弟,有的!我本地虚拟机装的LINUX version 2.6.32.12-0.7,我就是在虚拟机上测试发现 -A和--list命令有区别,网上也没找到什么好的解释,才发的贴子!上面截图就是虚拟机Linux   man chkconfig得到的!

论坛徽章:
13
技术图书徽章
日期:2014-04-29 14:15:42IT运维版块每日发帖之星
日期:2015-12-12 06:20:00IT运维版块每日发帖之星
日期:2015-08-30 06:20:00IT运维版块每日发帖之星
日期:2015-08-24 06:20:00IT运维版块每日发帖之星
日期:2015-08-02 06:20:002015年亚洲杯之澳大利亚
日期:2015-04-03 15:03:12申猴
日期:2015-03-20 09:00:292015年迎新春徽章
日期:2015-03-04 09:54:452015年辞旧岁徽章
日期:2015-03-03 16:54:15季节之章:冬
日期:2015-01-20 17:08:47双子座
日期:2014-11-21 16:30:31技术图书徽章
日期:2014-07-11 16:29:08
6 [报告]
发表于 2015-05-14 19:24 |只看该作者
你这个是内核版本号,发行版是什么?

求职 : Linux运维
论坛徽章:
203
拜羊年徽章
日期:2015-03-03 16:15:432015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:57:092015小元宵徽章
日期:2015-03-06 15:58:182015年亚洲杯之约旦
日期:2015-04-05 20:08:292015年亚洲杯之澳大利亚
日期:2015-04-09 09:25:552015年亚洲杯之约旦
日期:2015-04-10 17:34:102015年亚洲杯之巴勒斯坦
日期:2015-04-10 17:35:342015年亚洲杯之日本
日期:2015-04-16 16:28:552015年亚洲杯纪念徽章
日期:2015-04-27 23:29:17操作系统版块每日发帖之星
日期:2015-06-06 22:20:00操作系统版块每日发帖之星
日期:2015-06-09 22:20:00
7 [报告]
发表于 2015-05-14 23:52 |只看该作者
没有这个选项
OPTIONS
       --level levels
              Specifies the run levels an operation should pertain to.  It  is
              given  as  a string of numbers from 0 to 6. For example, --level
              35 specifies runlevels 3 and 5.

       --add name

              This option adds a new  service  for  management  by  chkconfig.
              When  a new service is added, chkconfig ensures that the service
              has either a start or a kill entry in  every  runlevel.  If  any
              runlevel  is missing such an entry, chkconfig creates the appro-
              priate entry as specified by the  default  values  in  the  init
              script.  Note  that default entries in LSB-delimited ’INIT INFO’
              sections take precedence  over  the  default  runlevels  in  the
              initscript;  if  any Required-Start or Required-Stop entries are
              present, the start and stop priorities of  the  script  will  be
              adjusted to account for these dependencies.

       --del name
              The  service  is removed from chkconfig management, and any sym-
              bolic links in /etc/rc[0-6].d which pertain to it are removed.

              Note that future package installs for this service may run  chk-
              config  --add,  which  will re-add such links. To disable a ser-
              vice, run chkconfig name off.

       --override name
              If service name is configured exactly as  it  would  be  if  the
              --add  option  had  been  specified  with  no  override  file in
              /etc/chkconfig.d/name, and if /etc/chkconfig.d/name  now  exists
              and  is  specified  differently from the base initscript, change
              the configuration for  service  name  to  follow  the  overrides
              instead of the base configuration.

       --list name
              This  option  lists  all  of  the services which chkconfig knows
              about, and whether they are stopped or started in each runlevel.
              If  name is specified, information in only display about service
              name.

RUNLEVEL FILES

我用的是centos6.6

论坛徽章:
12
技术图书徽章
日期:2014-07-11 16:27:5215-16赛季CBA联赛之山西
日期:2016-01-08 16:10:11操作系统版块每日发帖之星
日期:2015-08-01 06:20:002015亚冠之武里南联
日期:2015-06-11 01:12:162015年亚洲杯之阿联酋
日期:2015-03-20 11:41:462015年亚洲杯纪念徽章
日期:2015-03-18 18:08:422015年辞旧岁徽章
日期:2015-03-03 16:54:15丑牛
日期:2015-01-10 22:23:32天秤座
日期:2014-08-20 15:53:35水瓶座
日期:2014-08-11 12:08:51午马
日期:2014-07-23 23:03:38IT运维版块每日发帖之星
日期:2016-02-18 06:20:00
8 [报告]
发表于 2015-05-15 11:35 |只看该作者
本帖最后由 phanx 于 2015-05-15 11:46 编辑

楼上的各位,别人是 SUSE  EL 11 SP1的系统,不是RHEL/CentOS。

chkconfig -A -l 和 chkconfig -l 的区别是-A会列出以boot.开头的没有在runlevel 1-6中的服务。
除了标准的runlevel 1-6外,后面B 代表 boot ,是在进入真正的runlevel之前。S代表 Single user。

Runlevel              Description

0                        System halt
S                        Single user mode; from the boot prompt, only with US keyboard mapping
1                        Single user mode
2                        Local multiuser mode without remote network (e.g., NFS)
3                        Full multiuser mode with network
4                        Not used
5                        Full multiuser mode with network and X display manager—KDM (default), GDM, or XDM
6                        System reboot


chkconfig -l boot.clock
boot.clock                0: off  1: off  2: off  3: off  4: off  5: off  6: off  B: on   S: on

论坛徽章:
0
9 [报告]
发表于 2015-05-15 15:55 |只看该作者
感谢楼上这位phanx解决了我的问题!不好意思,忘了说我的系统版本了!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP