Andrew's Linux and Unix Administration Notes

Solaris

LDOMs (Logical Domains)
List LDOMs on control domain: ldm list
List LDOM resources on control domain: ldm list-bindings
Getting Console Access to an LDOM: ldm list (and note CONSole port number) then telnet localhost portnumberhere

Solaris Containers/Zones:
List Containers: /usr/sbin/zoneadm list -vc
List zone config: zonecfg -z zonenamehere info

Set erase character: stty erase ^?

Storage:
Mapping logical to physical device names: paste -d= <(iostat -x | awk '{print $1}') <(iostat -xn | awk '{print $NF}') | tail +3

NFS:
Show what clients have an NFS share mounted: showmount -a

Package Management:
List Files installed by a package: pkgchk -l HDVMAgent | grep Pathname: | awk '{print $2}'

Red Hat Linux

Mail Check mail queue: mailq Foce sendmail to attempt to resend email: sendmail -v -q Resize Terminal Window: /usr/bin/resize Change Terminal Window for Mac: export DISPLAY=xterm; Find Port WWN's: for i in `find /sys/class/scsi_host -name port_name`; do echo $i; cat $i; done Find Node WWN's: for i in `find /sys/class/scsi_host -name node_name`; do echo $i; cat $i; done