One liner AIX

Mise à jour: 12 juillet 2010
Version: 1.0
Author: Jean-Louis Bicquelet-Salaün
Location: http://jlbicquelet.free.fr
Copyright: (c) 2010 Jean-Louis BICQUELET-SALAÜN

One liner AIX

Just for fun, a one liner special AIX.

  1. How can I get the main IP adress of my server ?
    ifconfig -a | grep inet |awk '{ print $2}' | head -n 1
  2. How can I get the number of processors ?
    lsdev -Cc processor | grep Available | wc -l | sed 's/ //g'
  3. What is the type of my server ?
    lsattr -El sys0 -a modelname -F value
  4. What is the memory size of my server ?
     lsattr -El sys0 -a realmem |awk '{ print $2/1024}'
  5. How can I get the size of the disk ?
    lscfg -vl hdisk0 | awk '{ print $6}' | sed 's/(//'
  6. How can I have the list of my disks ?
     lscfg | grep hdisk | grep -v EMC | grep -v Power | awk '{ print $2}'
  7. How can I count the number of disks ?
    lscfg | grep hdisk | grep -v EMC | grep -v Power | wc -l
  8. What is the frequency of my processor ?
    lsattr -El proc0  -a frequency -F value
  9. What is the firmware level of my frame ?
    lsmcode -c
  10. How can I get comment obtenir la liste des cartes fibres d'un serveur ?
     lscfg |grep fcs | cut -c 69-
  11. How can we know the speed of fiber channel card?
     fcstat  fcs0 | grep Speed