顯示具有 AIX 標籤的文章。 顯示所有文章
顯示具有 AIX 標籤的文章。 顯示所有文章

2018年1月4日 星期四

AIX 查 RAM,CPU,HD,IP

AIX UNIX RAM
# prtconf -m
# bootinfo -r
# lsattr -El sys0 -a realmem
# lsattr -El mem0

Show CPU
# prtconf -s
# pmcycles -m
# lsdev -Cc processor

# bindprocessor -q

Show Hard disks/Capacity
# lsdev -Cc disk
# lspv
# bootinfo -s hdisk0

Show IP Addresses
# ifconfig -a | grep inet
# lsattr -El en0 -a netaddr

paging space
lsps -a

參考來源:http://www.unixmantra.com/2013/09/aix-listing-cpu-memory-ram-harddisks-ip-address.html

2013年11月27日 星期三

du 計算檔案、資料夾大小

查詢掛載點下前 5 名佔用最多空間的資料夾 (單位為 KB)
#du -s /var/* | sort -rn | head -5

參考來源:http://www.weithenn.org/cgi-bin/wiki.pl?du-%E8%A8%88%E7%AE%97%E6%AA%94%E6%A1%88%E3%80%81%E8%B3%87%E6%96%99%E5%A4%BE%E5%A4%A7%E5%B0%8F

2013年10月7日 星期一

LINUX、AIX sh while script

LINUX
# watch -d -n 1 ‘netstat –ant'
-n 表示每一秒更新一次輸出。
-d 表示將有變更的部份以高亮標示(Highlight)

AIX
root@aix # vi watch.sh 

#!/bin/ksh
# 
# $1 = 監控的間隔時間,以秒為單位.
# $2 = 請將所有要輸入的指令以雙引號(")或單引號(')包起來.
# 
# Exit the watch.sh use Ctrl + C 
#

while true
do
  clear
  echo "Interval $1 sec, Command: $2"
  eval $2
  sleep $1
done

root@aix # chome +x watch.sh

#以下比方說要執行監控,每秒更新一次.
root@aix # ls -l /home/user | grep .profile
root@aix # ./watch.sh 1 "ls -l /home/user | egrep '.profile'"

參考來源:
http://xxooxp.blogspot.tw/2011/09/aixlinux-watch.html

2013年7月24日 星期三

How to check the LPAR in a AIX box?

On a normal AIX LPAR you can use  oslevel -s  instead.
For more info you can use commands like  lsconf, prtconf, lparstat -i, lsdev .
To get info about IP-Adresses you can try  ifconfig -a .

參考:http://www.unix.com/aix/167218-how-check-lpar-aix-box.html

2012年6月21日 星期四

PieTTY or PuTTY 在 AIX Telnet 設定

PieTTY or PuTTY 在 AIX Telnet 設定
Telnet Function keys 設定(F1~F12)

選項 > 詳細設定 > Termial > Keyboard
在 The Functioin keys and keypad 選 VT100+


2012年5月17日 星期四

監控命令 vmstat 的使用

-----------命令使用------------------------------
vmstat 2 11 每2秒採集一次數據~共11次
------------性能問題表現----------------------------
內存不足: pi,po長期不等於0
cpu負載大: id經常小於20,r經常大於4
IO性能不好: b中的隊列大於3
------------參數解釋--------------------------------
kthr
r--在運行隊列中等待的進程數
b--在等待io的進程數

memoy
avm--
free--空閑的內存(k表示)

page
re--回收的頁面
pi--進入頁面數(k表示)
po--出頁面數(k表示)
fr--空餘的頁面數(k表示)
sr--通過時鐘算法掃描的頁面


faults 顯示每秒的中斷數
in--設備中斷
sy--系統中斷
cy--cpu交換

cpu
cs--用戶進程使用的時間
sy--系統進程使用的時間
id--cpu空閑的時間

資料來源:監控命令vmstat的使用(AIX系統)