comandi_monitoraggio_risorse
-
Upload
alessandro -
Category
Documents
-
view
6 -
download
3
description
Transcript of comandi_monitoraggio_risorse
tra [ ] parametri opzionali
Comandi di monitoraggio risorse e prestazioni
hdparm [opzioni] deviceimpostazione parametri hd e monitoraggio prestazioni opzioni principali
-t, -T prestazioni lettura hdesempio hdparam –Tt /dev/sda
iostat [opzioni] [device] [intervallo]monitoraggio utlizzo della CPU e prestazioni hd a intervalli specificati da intervallo, o una sola volata se intervallo non è specificatoopzioni principali
-k, -m visualizzazione in KB, MB-x statistiche estese
esempio iostat –mx /dev/sda 3 visualizza le statistiche estese in MB di sda ogni 3 secondi
top
ps
vmstat [opzioni] [intervallo]informazioni sulla memoria, processi, paginazione, a intervalli specificati da intervallo, o una sola volata se intervallo non è specificatoopzioni principali
-s altre statistiche-d statistiche sui dischi-S unità di misura (k o m)
netstatstatistiche sulle interfacce di reteesempio netstat –i 3 visualizza le statistiche ogni 3 secondi
cat /proc/cpuinfoinformazioni sul processore
fdisk –l | grep Diskcapacità dei dischi
ksar is a java program for viewing sar output in graphical format
1. Launching kSar1. Windows & Mac os X:
The simplest way is too double-click on the kSar-x.x.x.jar2. Command line (unix & other):
You need a functional java installation and launch : java -jar kSar-x.x.x.jar
2. Grabbing statistics1. Using a local text file of a sar output:
This will parser a output text file of the sar command. you need to have a special precaution to make this file, since the parser is not locale time aware.
The parser is waiting for C locale output fileeg. : LC_ALL=C sar -A > mysar22.txt
3. Managing graphs1. Interactive zooming:
Using the move, you can interactively zoom onto up a part of a graph. To select a zone to zoom, click on the upper left conner and while still holding the mouse button move to the lower-right of the zone you want to zoom
sar Collect, report, or save system activity information.richide sysstat
sar examples
To view real-time reporting about CPU utilization # sar -u 3 10Where,¦3 = interval¦10 = count
To view process creation statistics, enter: # sar -c 3 10
To view I/O and transfer rate statistics, enter: # sar -b 3 10
To view paging statistics, enter: # sar -B 3 10
To view block device statistics, enter: # sar -d 3 10
To view statistics for all interrupt statistics, enter: # sar -I XALL 3 10
To view device specific network statistics, enter: # sar -n DEV 3 10 # sar -n EDEV 3 10
To view CPU specific statistics, enter: # sar -P ALL # Only 1st CPU stats # sar -P 1 3 10
To view queue length and load averages statistics, enter: # sar -q 3 10
To view memory and swap space utilization statistics, enter: # sar -r 3 10 # sar -R 3 10
To view status of inode, file and other kernel tables statistics, enter: # sar -v 3 10
To view system switching activity statistics, enter: # sar -w 3 10
To view swapping statistics, enter: # sar -W 3 10
To view statistics for a given process called Apache with PID # 3256, enter: # sar -x 3256 3 10
solitamnete i dati vengono memorizzati in files per giornate in /var/log/saper vedere i dati di un particolare file
# sar -A -f /var/log/sa/saxx