Skip to main content

Command Palette

Search for a command to run...

How to Monitor Network With Windows Script

Published
1 min readView as Markdown
How to Monitor Network With Windows Script
P

I have over 6 years of experience in IT industry related to Systems and Network. I have been managing data centers with a focus on both on-premise and cloud servers.

အားလုံးပဲ မင်္ဂလာပါ။ ဒီနေ့မှာတော့ Windows Bat File ကို သုံးပြီးတော့ Network Monitoring script လေး ရေးပြသွားမှာဖြစ်ပါတယ်။

အရင်ဆုံး ကျွန်တော်တို့ Text Document အလွတ်တစ်ခု Create လုပ်ပါမယ်။ ပြီးရင် ကျွန်တော် command လေး ထည့်ပါမယ်။ Command ကို အောက်မှာ copy ယူပါ။

@echo off & cls

set IP=8.8.8.8

:top

PING -n 1 %IP% | FIND "TTL="

IF ERRORLEVEL 1 (
    SET OUT=4F
    echo Request timed out.
) ELSE (
    SET OUT=2F
)

color %OUT%

ping -n 2 -w 1000 127.0.0.1 >nul

GoTo top

set IP = 8.8.8.8 နေရာမှာ ကိုယ် Ping ထားချင်တဲ့ Server IP ဒါမှမဟုတ် Website (amazonaws.com) စသဖြင့် ကိုယ်ထားချင်တဲ့ဟာကို ပြောင်းထားလို့ရပါတယ်။


ပြီးရင် ကျွန်တော်တို့ Text File လေးကို Save ပါမယ်။ Save တဲ့အခါ bat file အနေနဲ့ Extension ပြောင်းပြီး save ပေးရပါမယ်။

ဒီ ping.bat File လေးကို Double Click or Run As Administrator နှိပ်ပြီး Run လိုက်မယ်ဆိုရင်

reply ပြန်ရင် Background က စိမ်းနေမှာဖြစ်ပြီး

reply မပြန်ရင် Background က အနီရောင်ဖြစ်နေမှာပါ။

Ping ပြန်မိသွားရင်တော့ Background က ပြန်စိမ်းလာမှာပဲဖြစ်ပါတယ်။


ဒီ Tips & Trick လေးက လွယ်ကူပြီး ရိုးရှင်းတဲ့အတွက် အသုံးတည့်မယ်လို့ မျှော်လင့်ပါတယ်။ အားလုံးပဲ အချိန်ပေးပြီး ဖတ်ရှုပေးတဲ့အတွက်လဲ ကျေးဇူးတင်ပါတယ် ခင်ဗျ။

Author By PoneMyat

More from this blog

Application Deployment on AWS with Infrastructure as Code: Terragrunt, Atlantis & AWX - Part 1

Infrastructure-as-Code (IaC) ကို စတင်အသုံးပြုတဲ့အခါ Terraform က လူသုံးများတဲ့ ရွေးချယ်မှုတစ်ခုဖြစ်ပါတယ်။ Project နဲ့ Infrastructure အရွယ်အစား မကြီးသေးတဲ့အချိန်မှာ Terraform တစ်ခုတည်းနဲ့ Infrastructure

Aug 17, 20264 min read39
Application Deployment on AWS with Infrastructure as Code: Terragrunt, Atlantis & AWX - Part 1
V

Vital Tech Blog

26 posts