Skip to main content

Command Palette

Search for a command to run...

How to Monitor Network With Windows Script

Published
1 min read
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

Why need to associate IAM OIDC Provider for Amazon EKS Cluster?

Amazon EKS cluster မှာ OpenID Connect (OIDC) provider ကို associate လုပ်ရခြင်းရဲ့ အဓိကအကြောင်းရင်းကတော့ Security နဲ့ Access Control ကို ပိုမိုကောင်းမွန်အောင်ပြုလုပ်နိုင်ဖို့ဖြစ်ပါတယ်။ အဓိကအားဖြင့် အချက် (၂) ချက်ရှိပါတယ်။ To use IAM Roles for Service...

Oct 10, 20252 min read37
V

Vital Tech Blog

25 posts