bootinfo 和getconf命令

The command /usr/sbin/bootinfo has traditionally been used to find out information regarding system boot devices, kernel versions, and disk sizes. This command has been depricated in favor of the command /usr/bin/getconf.

The bootinfo man page has been removed, and the command is only used in AIX by the booting and software installation utilities. It should not be used in customer-created shell scripts or run by hand.

 

The getconf command will report much of the same information that bootinfo will:

 

What was the device the system was last booted from?
$ getconf BOOT_DEVICE
hdisk0

What size is a particular disk in the system?
$ getconf DISK_SIZE /dev/hdisk0
10240

What partition size is being used on a disk in the system?
$ getconf DISK_PARTITION /dev/hdisk0
16

Is the machine capable of running a 64-bit kernel?
$ getconf HARDWARE_BITMODE
64

Is the system currently running a 64-bit or 32-bit kernel?
$ getconf KERNEL_BITMODE
64

How much real memory does the system have?
$ getconf REAL_MEMORY
524288

###############################################################################################

  1. What was the device the system was last booted from?  
  2. $ getconf BOOT_DEVICE  
  3. hdisk0  
  4.  
  5. # bootinfo -b  
  6. hdisk0  
  7.  
  8. What size is a particular disk in the system?  
  9. $ getconf DISK_SIZE /dev/hdisk0  
  10. 10240 
  11.  
  12. # bootinfo -s hdisk0        
  13. 140013 
  14.  
  15. What partition size is being used on a disk in the system?  
  16. $ getconf DISK_PARTITION /dev/hdisk0  
  17. 16 
  18.  
  19. Is the machine capable of running a 64-bit kernel?  
  20. $ getconf HARDWARE_BITMODE  
  21. 64 
  22.  
  23. #bootinfo -y  
  24. 64 
  25.  
  26. Is the system currently running a 64-bit or 32-bit kernel?  
  27. $ getconf KERNEL_BITMODE  
  28. 64 
  29. # bootinfo -K  
  30. 64 
  31.  
  32. How much real memory does the system have?  
  33. $ getconf REAL_MEMORY  
  34. 524288 
  35.  
  36. # bootinfo -r  
  37. 16056320 
  38.  

摘抄网络的部分命令及说明:


  1. bootinfo -s hdisk0  
  2. 返回磁盘大小,可以是本地磁盘,也可以是存储的磁盘,单位是mb   
  3.  
  4. bootinfo -k(小写)  
  5. 返回当前的启动模式/返回机器的钥匙的位置  
  6. 1 Key is in Secure position.  
  7. 2 Key is in Service position.  
  8. 3 Key is in Normal position.  
  9.  
  10. bootinfo -K(大写)  
  11. 返回当前系统运行的内核为32位还是64位  
  12.  
  13. bootinfo -m  
  14. 返回机器类型码  
  15.  
  16. bootinfo -c  
  17. -c Displays bootp daemon reply packet information stored with IPL control block.  
  18.  
  19. bootinfo -t  
  20. 返回当前启动类型  
  21. 1 Disk boot  
  22. 3 CD-ROM boot  
  23. 4 Tape boot  
  24. 5 Network boot  
  25.  
  26. bootinfo -z  
  27. 返回机器是否支持多处理器  
  28. 0 不支持  
  29. 1 支持  
  30.  
  31. bootinfo -T  
  32. 返回机器的硬件平台类型,比如rspc  
  33.  
  34. bootinfo -r  
  35. 返回实际内存容量,单位为kbytes  
  36.  
  37. bootinfo -b  
  38. 返回最后一次启动的设备  
  39.  
  40. bootinfo -y  
  41. 返回机器硬件是32位还是64位  
  42.  
  43. bootinfo -e  
  44. 是否可以从磁带启动  
  45. 1 是  
  46. 0 否 
posted @ 2013-01-05 12:24  kevin.gg  阅读(589)  评论(0)    收藏  举报