Tips
To make the bdf output appear in single line instead of splitting into two lines
# bdf | awk '{if(NF==1){l=$0;getline;sub(" *"," ");print l$0}else print}'
# bdf | tail +2 |grep ^/dev/|awk '{print $3 /1024 }' | awk '{sum += $1} END {print sum}'
# bdfmegs | awk '{sum += $3} END {print sum}'
The following script can be used to list the file systems in MB and GB format
Attach:bdfmegs
How to stress the CPU using a one line command
#perl -e 'fork; fork; 1 while {}'
The above command launches 4 fork processes, you wan't more just add more forks they grow exponentialy
To get the ioscan output in single line for all disks
# ioscan -funC disk | awk '$1=="disk" { getline L2; print $0,L2 }'
To get only the claimed disks and remove extra spaces
# ioscan -funNC disk | awk '{if ($5=="CLAIMED") {L1=$0;getline; sub (" *","");print L1,$0}}'
To find out the slot numbers of the Hot-Swappable disks
# sasmgr get_info -D /dev/sasd0 -q raid Fri Sep 25 14:43:23 2009 ---------- PHYSICAL DRIVES ---------- LUN dsf SAS Address Enclosure Bay Size(MB) /dev/rdsk/c8t0d0 0x5000c50005267f31 1 5 70007 /dev/rdsk/c8t1d0 0x500000e012b796f2 1 8 70007
SNMP
# snmpget -v1 -c public aembwqc1 system.sysDescr.0 # snmpwalk -Os -c public -v 1 localhost system # snmpwalk -Os -c public -v 1 localhost # snmpwalk -Os -c public -v 2c localhost # snmptranslate -On -IR ipAdEntAddr .1.3.6.1.2.1.4.20.1.1 # snmpwalk -v 2c -c public localhost:9999 ipAdEntAddr IP-MIB::ipAdEntAddr.127.0.0.1 = IpAddress: 127.0.0.1 # snmpwalk -v 2c -c public localhost:9999 system.sysDescr.0 SNMPv2-MIB::sysDescr.0 = STRING: HP-UX aemsapa2 B.11.23 U ia64