Chinaunix

标题: 一个crontab [打印本页]

作者: vulgate    时间: 2007-03-01 08:33
标题: 一个crontab
做了一个c.sh

内容为

date +"%y-%m-%d" > /oracle/script/log
echo "---------bdf.info--------------------------------" >> /oracle/script/log
bdf >> /oracle/script/log
echo "---------san.info--------------------------------" >> /oracle/script/log
spmgr display >> /oracle/script/log
echo "---------cm.info--------------------------------" >> /oracle/script/log
cmviewcl >> /oracle/script/log

手工运行c.sh可以得到所有信息的
但是作为计划,spmgr display 这条命令没有结果是空白的

下面是对比

手工运行是

07-03-01
---------bdf.info--------------------------------
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3     212992   93736  118360   44% /
/dev/vg00/lvol1     298928   71496  197536   27% /stand
/dev/vg00/lvol8    4718592  545024 4141056   12% /var
/dev/vg00/lvol7    2097152 1246992  843536   60% /usr
/dev/vg00/lvol4    2097152 1491344  602368   71% /tmp
/dev/vg00/lvol_ora 8404992 5658648 2660568   68% /oracle
/dev/vg00/lvol6    2588672 1770272  812048   69% /opt
/dev/vg00/lvol5    1048576    2576 1037896    0% /home
/dev/vg_arch/lvol1 20967424    4200 20636388    0% /archivelog1
cmict_s2:/archivelog2
                   20967424    3992 20636400    0% /archivelog2
/dev/vg00/lvol11   20971520    3476 20640428    0% /mnt
---------san.info--------------------------------
  Server:  cmict_s1    Report Created: Thu, Mar 01 07:55:10 2007
  Command: spmgr display
  = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
  Storage:  5000-1FE1-5005-37B0
  Load Balance: Off  Auto-restore: Off
  Path Verify: On    Verify Interval: 30   
  HBAs:        td0  td1  
  Controller:  P66C5E2AAR800W, Operational
               P66C5E2AAR8008, Operational
  Devices:  c14t0d0  c14t0d1  c14t0d2

  TGT/LUN   Device             WWLUN_ID             H/W_Path           #_Paths
    0/  0   c14t0d0            6005-08B4-0010-3680-0000-5000-0020-0000   4
                                                    255/255/0/0.0
          Controller  Path_Instance      HBA             Preferred?  Path_Status
          P66C5E2AAR800W                                     no
                      c4t0d1             td0             no           Active
                      c8t0d1             td1             no           Available

          Controller  Path_Instance      HBA             Preferred?  Path_Status
          P66C5E2AAR8008                                     no
                      c6t0d1             td0             no           Standby
                      c10t0d1            td1             no           Standby


  TGT/LUN   Device             WWLUN_ID             H/W_Path           #_Paths
    0/  1   c14t0d1            6005-08B4-0010-3680-0000-5000-0043-0000   4
                                                    255/255/0/0.1
          Controller  Path_Instance      HBA             Preferred?  Path_Status
          P66C5E2AAR800W                                     no
                      c4t0d2             td0             no           Standby
                      c8t0d2             td1             no           Standby

          Controller  Path_Instance      HBA             Preferred?  Path_Status
          P66C5E2AAR8008                                     no
                      c6t0d2             td0             no           Active
                      c10t0d2            td1             no           Available


  TGT/LUN   Device             WWLUN_ID             H/W_Path           #_Paths
    0/  2   c14t0d2            6005-08B4-0010-3666-0000-9000-0024-0000   4
                                                    255/255/0/0.2
          Controller  Path_Instance      HBA             Preferred?  Path_Status
          P66C5E2AAR800W                                     no
                      c4t0d3             td0             no           Active
                      c8t0d3             td1             no           Available

          Controller  Path_Instance      HBA             Preferred?  Path_Status
          P66C5E2AAR8008                                     no
                      c6t0d3             td0             no           Standby
                      c10t0d3            td1             no           Standby


---------cm.info--------------------------------


作为计划触发是
07-03-01
---------bdf.info--------------------------------
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3     212992   93736  118360   44% /
/dev/vg00/lvol1     298928   71496  197536   27% /stand
/dev/vg00/lvol8    4718592  545024 4141056   12% /var
/dev/vg00/lvol7    2097152 1246992  843536   60% /usr
/dev/vg00/lvol4    2097152 1491344  602368   71% /tmp
/dev/vg00/lvol_ora 8404992 5658648 2660568   68% /oracle
/dev/vg00/lvol6    2588672 1770272  812048   69% /opt
/dev/vg00/lvol5    1048576    2576 1037896    0% /home
/dev/vg_arch/lvol1 20967424    4200 20636388    0% /archivelog1
cmict_s2:/archivelog2
                   20967424    3992 20636400    0% /archivelog2
/dev/vg00/lvol11   20971520    3476 20640428    0% /mnt
---------san.info--------------------------------
---------cm.info--------------------------------


高手赐教?

os
HP-UX server B.11.11 U 9000/800 2982324459 unlimited-user license
作者: cymx2002    时间: 2007-03-01 11:51
如果用到数据库的话。
一定要注意环境变量。
要在自动执行的脚本里面添加和oracle相关的环境变量。
否则脚本将找不到相应的命令。
作者: vulgate    时间: 2007-03-01 21:35
都是外部命令
无任何数据库关联部分
作者: welcome008    时间: 2007-03-01 22:48
开始 source一下你的用户主目录下的.cshrc文件试下呢?




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2