dubo的个人博客分享 http://blog.sciencenet.cn/u/dubo

博文

查看集群结点无任务负载较小时,自动提交程序 脚本

已有 3585 次阅读 2013-1-18 21:55 |个人分类:Linux|系统分类:科研笔记| 程序, Comment

 
#!/bin/bash
i=1
while [ $i != 0 ]
do
sleep 10
uptime > load.txt
wait
awk '{print $10 }' load.txt > now_load.txt
wait
sed -e 's/,//' now_load.txt > now.txt
rm load.txt now_load.txt -f
load_char=`sed -n "1p" now.txt`
min=0.1
if (echo ${load_char} ${min} | awk '!($1>$2){exit 1}')
then
echo $load_char
else
#=================your comment begin============
echo "Now we will run your program"
./wld >& log_wld &
#=================your commend end==============
fi
rm now.txt  ${min} -f
done


https://blog.sciencenet.cn/blog-464042-654486.html

上一篇:ssh登录时间太长
下一篇:VassistX卸载或禁用
收藏 IP: 202.113.8.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...
扫一扫,分享此博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-11-25 20:46

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部