免费注册 查看新帖 |

Chinaunix

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

[故障求助] 普通用户就是sar不起来。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-11-19 08:55 |只看该作者 |倒序浏览
做了不下10几台机器的普通用户sar,同样操作,居然有3台不行。三台里面2台5.3-05,1台5.2-07。
p570lp1:/> chmod o+x /usr/lib/sa/sadc
p570lp1:/>  ls -l /usr/lib/nls/msg/en_US/libc.cat /usr/lib/sa/sadc
-rw-r--r--   1 bin      bin           20920 Sep 16 2002  /usr/lib/nls/msg/en_USt
-rwxrwxrwx   1 root     adm           14804 Mar 15 2006  /usr/lib/sa/sadc
p570lp1:/> su - mon
$ sar 1 1
sadc: : The file access permissions do not allow the specified action.
sar: Error 0
$ exit
p570lp1:/> sar 1 1

AIX p570lp1 2 5 00CD3ACE4C00    11/19/07

System Configuration: lcpu=8

08:47:19    %usr    %sys    %wio   %idle
08:47:20       1       1       1      98
p570lp1:/> su - mon
$ sar 1 1
sadc: : The file access permissions do not allow the specified action.
sar: Error 0
$ id
uid=204(mon) gid=4(adm) groups=1(staff)

没辄了,从上面可以看出,sadc权限已经放开了,mon用户也给了adm组。查了好多资料,也就这两点阿,麻烦高手指点。谢谢。

论坛徽章:
0
2 [报告]
发表于 2007-11-19 10:10 |只看该作者
sar 只有root用户才能执行 , 从你上面的情况来看 , 只是权限增加了 , 但是执行sar的非root用户, 是否有完整的root权限 ?
仅仅有adm权限 我觉得还是不够的 ...

论坛徽章:
0
3 [报告]
发表于 2007-11-19 10:13 |只看该作者
楼主尝试下更改
/usr/sbin/sar  这个的权限给非root用户..  
试一下.

PS : sar的一些说明

The sar command calls a command named sadc to access system data. Two
shell scripts, /usr/lib/sa/sa1 and /usr/lib/sa/sa2, are structured to be run by the
cron command and provide daily statistics and reports. Sample stanzas are
included (but commented out) in the /var/spool/cron/crontabs/adm crontab file to
specify when the cron daemon should run the shell scripts. Collection of data in
this manner is useful to characterize system usage over a period of time and
determine peak usage hours.

[ 本帖最后由 金牌小卧底 于 2007-11-19 10:16 编辑 ]

论坛徽章:
0
4 [报告]
发表于 2007-11-19 13:42 |只看该作者
原帖由 金牌小卧底 于 2007-11-19 10:13 发表
楼主尝试下更改
/usr/sbin/sar  这个的权限给非root用户..  
试一下.

PS : sar的一些说明

The sar command calls a command named sadc to access system data. Two
shell scripts, /usr/lib/sa/sa1  ...



谢谢楼上的答复。
/usr/sbin下的sar已经都能执行的了,奇怪。
-r-xr-xr-x   1 bin      bin           56566 Mar 15 2006  sar

论坛徽章:
0
5 [报告]
发表于 2007-11-19 13:43 |只看该作者
原帖由 金牌小卧底 于 2007-11-19 10:10 发表
sar 只有root用户才能执行 , 从你上面的情况来看 , 只是权限增加了 , 但是执行sar的非root用户, 是否有完整的root权限 ?
仅仅有adm权限 我觉得还是不够的 ...


其他机器一样操作已经是可以的了,查了些资料也是这么说的。
比方说:http://www.aixchina.net/?1865/action_viewspace_itemid_7437.html

论坛徽章:
0
6 [报告]
发表于 2007-11-19 13:44 |只看该作者
原帖由 CUaixer 于 2007-11-19 13:42 发表



谢谢楼上的答复。
/usr/sbin下的sar已经都能执行的了,奇怪。
-r-xr-xr-x   1 bin      bin           56566 Mar 15 2006  sar


因为sar调用的是 /usr/sbin 下的命令文件  . 而不是 bin下的文件 .

这个你可以查看那个 performance and tuning 这个pdf , 专门讲 sar 等一些调优的书的 .

最近刚看了一次 所以记得

PS : 刚翻了下 , sar的fullpath是  /usr/sbin/sar  ,  相关的fileset name : bos.acct

[ 本帖最后由 金牌小卧底 于 2007-11-19 13:54 编辑 ]

论坛徽章:
0
7 [报告]
发表于 2007-11-21 16:56 |只看该作者
还是无解

论坛徽章:
0
8 [报告]
发表于 2007-11-30 11:11 |只看该作者
有知道的朋友告诉一下答案么?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP