当前位置: 首页 > news >正文

嘉兴网站建设技术开发做一个微信小程序需要多少钱

嘉兴网站建设技术开发,做一个微信小程序需要多少钱,电商网站网络服务,服务器做网站教程1、SSH 工具本身支持多窗口 比如 MobaXterm: 2、编写脚本通过 ssh 在多台机器批量执行shell命令 创建 ssh_hosts 配置文件,定义需要批量执行的节点(必须能够通过 ssh 免密登录,且存在同名用户) vim ssh_hostsbig…

1、SSH 工具本身支持多窗口

比如 MobaXterm:
在这里插入图片描述
在这里插入图片描述

2、编写脚本通过 ssh 在多台机器批量执行shell命令

创建 ssh_hosts 配置文件,定义需要批量执行的节点(必须能够通过 ssh 免密登录,且存在同名用户)

vim ssh_hosts
bigdata0
bigdata1

创建 dosshcmd.sh 脚本:

vim dosshcmd.sh
#! /bin/shdoSshCmd() {hosts=`sed -n '/^[^#]/p' /home/z/scripts/ssh_hosts`for host in $hostsdo echo \[**************** HOST: $host ****************]ssh $host "$@"echo ""donereturn 0
}if [ $# -lt 1 ]
thenecho "$0 cmd"exit
fiecho CMD: "$@"
doSshCmd "$@

赋予执行权限

chmod u+x dosshcmd.sh

3、验证:

1) 验证简单命令:
[root@bigdata0 scripts]# ./dosshcmd.sh free -g
CMD: free -g
[**************** HOST: bigdata0 ****************]total        used        free      shared  buff/cache   available
Mem:             93          13          31           0          49          79
Swap:             3           0           3[**************** HOST: bigdata1 ****************]total        used        free      shared  buff/cache   available
Mem:             93          15           2           0          75          77
Swap:             3           0           3
2) 验证脚本执行:

编写一个通过 jps 找到 pid,然后通过 ps 查看进程信息的简单脚本:

vim find_java_resources.sh
#! /bin/shpids=`jps|grep -i "$1"| cut -d ' ' -f 1`
echo ----find pids: $pids
for pid in $pids
doecho ----PID: $pid----if [ $# -eq 1 ];then ps -q $pid -aux|awk '{print $1, $2, $3, $4, $5, $6, $7, $8, $9, $10}'|column -t elseps -q $pid ${@:2}|awk '{print $1, $2, $3, $4, $5, $6, $7, $8, $9, $10}'|column -tfiecho " "
done

赋予执行权限

chmod u+x find_java_resources.sh

分发:

[root@bigdata0 scripts]# scp find_java_resources.sh bigdata1:`pwd`
find_java_resources.sh                              100%  265     0.3KB/s   00:00    
[root@bigdata0 scripts]#

查看集群每个节点 yarn 任务资源占用

[root@bigdata0 scripts]# ./dosshcmd.sh /home/z/scripts/find_java_resources.sh yarn
CMD: /home/z/scripts/find_java_resources.sh yarn
[**************** HOST: bigdata0 ****************]
----find pids: 31878 31879
----PID: 31878----
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME
root     31878 24.7  1.2 26774340 1204428 ?    Sl   11:10   2:49 ----PID: 31879----
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME
root     31879 25.9  1.2 26743664 1210208 ?    Sl   11:10   2:57​
[**************** HOST: bigdata1 ****************]
----find pids: 30703
----PID: 30703----
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME
root     30703 24.4  2.9 26776844 2854336 ?    Sl   11:14   2:48 

也可以用 watch 监控

watch "./dosshcmd.sh /home/z/scripts/find_java_resources.sh yarn"
http://www.dinnco.com/news/8821.html

相关文章:

  • 蓝色扁平化网站品牌推广和品牌营销
  • 门户网站建设注意事项郑州seo招聘
  • 照明网站设计湖南网站seo公司
  • 营销管理网站百度竞价包年推广是怎么回事
  • 男的做直播哪个网站做seo需要投入的成本
  • 四六级查成绩网站怎么做网站流量分析工具
  • 卡通设计类网站欣赏5月新冠病毒最新消息
  • 宠物网站开发与实现结论深圳今天重大事件新闻
  • 使用阿里云建网站女生学市场营销好吗
  • 广州网站建设求职简历域名注册 阿里云
  • 专业集团网站建设创意营销
  • 磁县专业做网站网站推广优化的方法
  • 公司为什么要做网站网站建设优化推广系统
  • 建筑案例网站谷歌seo最好的公司
  • 男女同房做爰网站新手如何找cps推广渠道
  • 雅虎做网站推广做小程序的公司
  • 怎样联系自己建设网站域名免费注册0元注册
  • 百度站内搜索提升关键词排名百度资源平台
  • 网站开发上传视频教程宁波seo怎么做引流推广
  • 济南企业如何建网站搜索引擎关键词快速优化
  • 免费做网站用什么软件广州网络推广公司有哪些
  • 在线销售型的网站软文技巧
  • 无网站营销上海最新事件
  • 昆明网站建设yn119seo搜索价格
  • 济南一哥网站建设公司seo网站推广服务
  • dede免费手机网站模板下载游戏推广员是诈骗吗
  • 做心灵鸡汤网站栏目排版app推广公司
  • 用英文介绍购物网站刷赞业务推广网站
  • 自适应网站建设价格网站seo外包价格
  • mvc 做网站20条优化措施