ping脚本
#!/bin/bash
for x in{100..200} ####区间为192.168.100.100-192.168.100.200
do
x=$(($x-100))
if fping -c 1 192.168.100.$x >/dev/null 2>&1; ###### -c 1
then
echo "学号为$x 在"
else
echo "学号为$x 不在"
fi
done
ping脚本的更多相关文章
- Linux批量ping脚本
根据鸟哥的ping脚本,我重新修改了一下.用到的知识有:read.Linux按行读取.shell输出效果调整等 其中Linux按行读取文件比较重要,可参看文下链接 1 脚本功能: 批量ping当前路径 ...
- 批量IP自动ping脚本
批量IP自动ping脚本ping.sh 在同一目录新建一个名为pingip的文件,并以每行一个IP的方式罗列.使用sh命令执行ping.sh #!/bin/bash IP_LIST=`cat ping ...
- Shell - 长 ping 脚本监控网络时延
生产环境中, 网络时延是一个很重要的指标. 为了方便检查网络时延的大小, 我们可以通过ping命令实现长时间的网络监控. 1 ping 命令的使用 1.1 常用参数 -i: 每次执行ping操作的间隔 ...
- ping脚本--无网不利
一.本文主要涉及的内容 二.预备知识 1.打印网络接口列表 2.提取IP地址的小套路 3.更改网卡的MAC地址 4.高速的ping工具:fping 三.套路连招 1.通过一个for循环和ping列出所 ...
- python 批量ping脚本不能用os.system
os.system(cmd)通过执行命令会得到返回值. ping通的情况下返回值为0. ping不通的情况: 1.请求超时,返回值1 2.无法访问目标主机,返回值为 0,和ping通返回值相同 所 ...
- YAML_02 playbook的ping脚本检测
ansible]# vim ping.yml --- - hosts: all remote_user: root tasks: - ping: ansible]# ansible- ...
- 批量Ping执行Bash脚本
#!/bin/bash # Ping Batch Script # 连接超时时间 TMOUT= # 最大线程数 MAX_THREAD= # 保留内存大小 MIN_MEM= # 默认ip配置,可通过 - ...
- HAProxy之三----keepalived配合脚本对HAProxy、ping网关实现高可用检测
调用脚本参数含义 vrrp_script<SCRIPT_NAME> { #定义一个检测脚本,在global_defs之外配置 script <STRING>|<QUOTE ...
- Cacti添加Advance Ping监控模板
Cacti脚本 1.Advance Ping 脚本及模板 注:要使用此模板,编译PHP时必须加上--enable-sockets选项来支持套接字. 1).功能:此模板用来监控一个TCP/U ...
随机推荐
- unix下输出重定向
> 为重定向符号 >> 重定向不覆盖原文件内容 example: 1. 标准输出重定向 echo "123" > /home/123.txt ---- 标准 ...
- 366. Find Leaves of Binary Tree
Given a binary tree, collect a tree's nodes as if you were doing this: Collect and remove all leaves ...
- 虚机centos和本机Windows之间文件的拷贝无法用xftp时用FileZilla也行
步骤如下: 1.如果Centos没有安装ssh,则需要先安装: 2.查看虚拟机中IP地址,命令如下: ifconfig 3.在windows中安装ftp软件 FileZilla启动软件如图: 6 这 ...
- Varnish介绍
“Varnish是一款高性能的开源HTTP加速器,挪威最大的在线报纸 Verdens Gang (http://www.vg.no) 使用3台Varnish代替了原来的12台squid,性能居然比以前 ...
- The first day to learn Englisht
IF you want to go fast,to alone. IF you want to go far,go with others.
- PHP开发调试环境配置(基于wampserver+Eclipse for PHP Developers )
1 软件准 WampServer 下载地址:http://www.wampserver.com/en/#download-wrapper 我下的是 里面包含了搭建PHP必须的4个软件: 1. ...
- software_testing_work3_question2
package com.Phantom; import java.rmi.server.Operation; import java.util.Scanner; public class Work3_ ...
- codeforces 731C(DFS)
题目链接:http://codeforces.com/contest/731/problem/C 题意:有n只袜子(1~n),k种颜色(1~k),在m天中,左脚穿下标为l,右脚穿下标为r的袜子,问最少 ...
- Maven项目pom.xml文件详解
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/20 ...
- Git 的详细使用
本文翻译自Understanding Git Source Control in Xcode (译者myShire)欢迎您加入我们的翻译小组. 在应用程序开发过程中,很重要的一部分工作就是如何进行 ...