shell脚本 环境变量跑飞
我想顺序在blade02--09上执行python launchmany-console.py:
#!/bin/bash
for i in $(seq 2 9);
do
ssh blade0$i \
python /root/wjc/BitTorrent-4.4.0/launchmany-console.py --torrent_dir /root/wjc/torrents --max_upload_rate 0 --display_interval 20 &
exit
我在python程序中调用top命令 如下
temp = commands.getoutput('/usr/bin/top -u root -n 1|grep Cpu') 如果在本地运行的话都ok但是用今天下午这个脚本运行就出这个问题了,就提示TERM environment variable not set. 在python中设置TERM=“xterm”后 就提示top failed tty get。。。。
另外 python程序中有写文件的代码 也并没有写到blade02--blade09中 不知道写到哪里去了
请高手帮忙啊 !!!!!1