วิธีการเขียน Script ตรวจสอบ Server Performance สำหรับเครื่อง Windows 2008 R2

ขอนำเสนอ Powershell Script สำหรับใช้ Monitor Server Performance สำหรับเครื่อง Windows 2008 R2 ขึ้นไปดังนี้ การติดตั้ง PowerShell Editor และ วิธีใช้งานบน Windows 2008 1. ติดตั้งโดยไปที่ Server Manager -> Features -> Add Features 2. เลือกหัวข้อ Windows PowerShell Integrated Script Environment (ISE) 3. ให้เลือกใช้งาน Version X86 ซึ่งเมื่อลงแล้ว Icon จะอยู่ที่ Accessories -> Windows PowerShell -> Windows PowerShell ISE (x86) คำสั่งในการเปิด Execution Policy Set-ExecutionPolicyUnrestricted … Read more

วิธีการเขียน Script ตรวจสอบ Server Performance สำหรับเครื่อง Linux Server

ขอนำเสนอ PHP Script และ Terminal linux program สำหรับใช้ Monitor Server Performance สำหรับ Ubuntu Linux ดังนี้ คำสั่งตรวจสอบ Hostname hostname -A วิธีตรวจสอบ Traffic จาก ifconfig ด้วย PHP5 Script <?php //Net Traffic exec(“ifconfig | grep ‘RX bytes'”,$net); $neteth0 = explode(“:”,$net[0]); $netin1 = explode(” “,$neteth0[1]); $netin = $netin1[0]; $netout1 = explode(” “,$neteth0[2]); $netout = $netout1[0]; unset($net); unset($neteth0); unset($netin1); unset($netout1); … Read more