Filesystems
Partition | Mountpoint | Notes |
hd1 | /home | none |
hd2 | /usr | none |
hd3 | /tmp | none |
hd4 | / | root |
hd5 | BLV | (Boot Logical Volume) |
hd6 | none | Paging space |
hd8 | none | JFS2 log |
hd9var | /var | none |
hd10opt | /opt | none |
hd11admin | /admin | New in 6.1 |
livedump | /var/adm/ras/livedump | New in 6.1 TL3 |
| /proc | procfs pseudo filesystem |
rmfs /mymount (Add -r to remove mount point) | Remove mount point entry and the LV for /mymount |
chfs -a size=+1G /var | Grow the /var filesystem by 1 Gig |
chfs -a size=1G /var | Grow the /var filesystem to 1 Gig |
du -smx / | Find the file usage on a filesystem |
lsfs | List lesystems in a grep-able format |
lsfs -q /home | Get extended information about the /home filesystem |
mklv -t jfs2log -y datalog1 datavg 1 | Create a log device on datavg VG |
logform /dev/datalog1 | Format the log device just created |
Error Logging
alog - boot, console messages, NIM, others
errlog - hardware, kernel, and some apps
syslog - Internet dameons, and apps
alog -o -t boot | Display the contents of the boot log |
alog -o -t console | Display the contents of the console log |
alog -L | List all log types that alog knows |
errpt (Add -a or -A for varying levels of verbosity) | Display the contents of the system error log |
errclear x | Clear all errors up until x days ago |
errpt -aDj FE2DEE00 | List info on error ID FE2DEE00 (IDENTIFIER column in errpt output) |
errpt -c | Put a tail on the error log |
errpt -s `date +%m%d0000%y` | List all errors that happened today |
errpt -N hdisk0 | To list all errors on hdisk0 |
/usr/lib/errdemon -l | To list details about the error log |
/usr/lib/errdemon -s 2097152 | To change the size of the error log to 2 MB |
{*}.debug /var/log/messages | syslog.conf line to send all messages to log file |
Devices
lsdev | List all devices on a system |
lsdev -Cc disk | List all disk devices on a system (See next item for a list of classes) |
lsdev -C -r class | List all customized (existing) device classes (-P for complete list) |
rmdev -dl hdisk5 | Remove hdisk5 |
getconf DISK DEVNAME hdisk1 (or) bootinfo -o hdisk1 | Get device address of hdisk1 |
getconf DISK SIZE /dev/hdisk1 (or) bootinfo -s hdisk1 | Get the size (in MB) of hdisk1 |
lsdev -Cc disk -p scsi0 | List all disks belonging to scsi0 |
lsslot -c pci -l ent0 | Find the slot of a PCI Ethernet adapter |
lscfg -l ent1 | Find the (virtual) location of an Ethernet adapter |
lscfg | Find the location codes of all devices in the system |
lspath -l hdisk0 | List all MPIO paths for hdisk0 |
lscfg -vl fcs0 | Find the WWN of the fcs0 HBA adapter |
swcons /console.out | Temporarily change console output to /console.out (Use swcons to change back.) |
fcstat fcs0 | Get statistics and extended information on fcs0 |
Users & Groups
lsuser -f root | List all settings for root user in grepable format |
lsuser -a id ALL | List all users names |
lsuser -a fsize wfavorit | Find the fsize value for user wfavorit |
chuser fsize=-1 wfavorit | Change the fsize value for user wfavorit |
Tasks
lspv hdisk1 | Find the free space on PV hdisk1 |
oslevel -r (or) oslevel -s | Find the OS, (ML/)TL (-r), and service pack version / date (-s) |
getconf -a | List all attributes of system |
getconf KERNEL BITMODE | Find the type of kernel loaded (use -a to get all options) |
invscout (or) lscfg -pv | Find the level of firmware on a system |
lsattr -El sys0 | List all attributes for the kernel device |
prtconf | Print a dump of system information |
pagesize -a | Get all page sizes supported on this system |
Mirroring rootvg to hdisk1
extendvg rootvg hdisk1
mirrorvg rootvg
bosboot -ad hdisk0
bosboot -ad hdisk1
bootlist -m normal hdisk0 hdisk1
Mount a CD/DVD ROM
mount -rv cdrfs /dev/cd0 /mnt
mount -v udfs -o ro /dev/cd0 /mnt
Create a VG, LV, and FS, mirror, and create mirrored LV
mkvg -s 256 -y datavg hdisk1 (PP size is 1/4 Gig)
mklv -t jfs2log -y dataloglv datavg 1
logform /dev/dataloglv
mklv -t jfs2 -y data01lv datavg 8 (2 Gig LV)
crfs -v jfs2 -d data01lv -m /data01 -A yes
extendvg datavg hdisk2
mklvcopy dataloglv 2 (Note use of mirrorvg in next example)
mklvcopy data01lv 2
syncvg -v datavg
lsvg -l datavg (will now list 2 PPs for every LP)
mklv -c 2 -t jfs2 -y data02lv datavg 8 (2 Gig LV)
crfs -v jfs2 -d data02lv -m /data02 -A yes
mount -a
Move a VG from hdisk1 to hdisk2
extendvg datavg hdisk2
mirrorvg datavg hdisk2
(Wait for mirrors to synchronize)
unmirrorvg datavg hdisk1
reducevg datavg hdisk1
Change port type of HBA
rmdev -d -l fcnet0
rmdev -d -l fscsi0
chdev -l fcs0 -a link type=pt2pt
cfgmgr
Networking
lsattr -El inet0 -a bootup option | Determine if rc.bsdnet is used over rc.net |
/etc/rc.tcpip | TCP/IP related daemon startup script |
netstat -r | To view the route table |
lsattr -EHl inet0 -a route | To view the route table from the ODM DB |
route add default 192.168.1.1 | Temporarily add a default route |
ifconfig en0 192.168.1.2 netmask 255.255.255.0 | Temporarily add an address to an interface |
ifconfig en0 192.168.1.3 netmask 255.255.255.0 alias | Temporarily add an alias to an interface |
chdev -l en1 -a netaddr=192.168.1.1 -a netmask=0xffffff00 | To permanently add an IP address to the en1 interface |
chdev -l en0 -a alias4=192.168.1.3,255.255.255.0 | Permanently add an alias to an interface |
chdev -l en0 -a delalias4=192.168.1.3,255.255.255.0 | Remove a permanently added alias from an interface |
lsattr -El en0 | List ODM (next boot) IP conguration for interface |
chdev -l inet0 -a hostname=bombay | Permanently set the hostname |
lsdev -Cc tcpip | List networking devices |
lsdev -Cc if | List Network Interfaces |
lsattr -Ehl inet0 | List attributes of inet0 |
lsattr -El ent0 | List (networking layer) attributes of ent0 |
lsattr -El en0 | List (physical layer) attributes of en0 |
lsattr -El ent0 -a media speed | Set (desired) speed is found through the entX device |
entstat -d ent0 | Find actual (negotiated) speed, duplex, and link |
chdev -l ent0 -a media speed=1000 Full Duplex -P | Set the ent0 link to Gig full duplex |
no -p -o use isno=0 | |
Interface Specific Network Options |
entstat -d ent0 (or) netstat -v ent0 | Get (long) statistics for the ent0 device (remove -d for shorter results) |
netstat -anf inet | List all open, and in use TCP and UDP ports |
rmtcpip | Remove all TCP/IP conguration from a host |
netcdctrl -t dns -e hosts -f | Flush the netcd DNS cache |
/etc/netsvc.conf and then $NSORDER. irs.conf and $NSORDER
are typically not used.
LVM
chdev -l hdisk1 -a pv=yes | Put a PVID on a disk |
chdev -l hdisk1 -a pv=clear | Remove a PVID from a disk |
lspv | List all PVs in a system (along) with VG membership |
mkvg -y datavg -s 64 hdisk1 | Create a VG called datavg using hdisk1 using 64 Meg PPs |
mklv -t jfs2 -y datalv datavg 16 | Create a LV on (previous) datavg that is 1 Gig in size |
lsvg -l datavg | List all LVs on the datavg VG |
lsvg -p datavg | List all PVs in the datavg VG |
varyoffvg datavg | Take the datavg VG offline |
exportvg datavg | Remove the datavg VG from the ODM |
importvg -y datavg hdisk5 | Import the VG on hdisk5 as datavg |
varyonvg datavg | Vary-on the new datavg VG (can use importvg -n) |
lsvg | List all VGs (known to the ODM) |
lsvg -o | List all VGs that are on line |
chvg -g datavg | Check to see if underlying disk in datavg has grown in size |
migratepv -l datalv01 hdisk4 hdisk5 | Move a LV from one PV to another |
reducevg hdisk3 | Delete a VG by removing all PVs with the reducevg command |
System Resource Controller
startsrc -s xntpd | Start the xntpd service |
stopsrc -g nfs | Stop the NFS related services |
refresh -s named | Refresh the named service |
lssrc -a | List all registered services on the system |
lssrc -l -s ctrmc | Show status of ctrmc subsystem |
CPU | mpstat, topas -P, w, lparstat, ps, iostat -tT 1, tprofy, curty |
Memory | vmstat, svmon, ps -o fields , topas, ipcs -m |
Network I/O | entstat, netstat, netpmony, topas -E |
Disk I/O | iostat, fcstat, lvmstat, filemony, fileplace, topas -D |
Application | truss, probevue, tprofy, svmon -P pid , ps -o fields -p pid |
topas | The ~ character toggles to nmon-mode in topas |
Check for disk stat history collection
lsattr -HEl sys0 -a iostat
Enable historical disk statistic collection
chdev -l sys0 -a iostat=true
Working with packages
lslpp -f bos.games | List all files in bos.games fileset |
lslpp -w /usr/games/fortune | Find out what fileset fortune belongs to |
oslevel -g | List packages that are above the current OS level |
oslevel -rl 5300-05 | Find packages below a specied (ML/)TL |
lslpp -L | List all filesets |
lslpp -Lc | List all filesets in a grepable or awkable format |
which fileset filemon | Find the package that contains the filemon utility |
installp -ac -d /dev/cd0 bos.content list | Install the database (from CD/DVD) for which fileset |
mksysb -i /mnt/server1.mksysb.`date +%m%d%y` | Create a mksysb backup of the rootvg volume group |
installp -C | Cleanup after a failed install |
Memory & Swap
lsps -a | List size, summary, and paging activity by paging space |
lsps -s | List summary of all paging space |
lsattr -El sys0 -a realmem | List the total amount of physical RAM in system |
mkps -a -s 64 -n rootvg | Create a new paging device on rootvg of 64 PPs |
chps -s 8 hd6 | Extend the existing paging space by 8 PPs |
ODM
odmget -q name=hdisk0 Cu Dv | Query Cu Dv for a specic item |
odmget -q “name like hdisk?” Cu Dv | Query Cu Dv using the like syntax |
odmget -q “name like hdisk? and parent like vscsi?” Cu Dv | Query Cu Dv using a complex query |
Kernel Tuning
no -D (Changed values will be listed) | Reset all networking tunables to the default values |
no -a | List all networking tunables |
no -o use isno=1 | Set a tunable temporarily (until reboot) |
no -r -o use isno=1 | Set a tunable at next reboot |
no -p -o use isno=1 | Set current value of tunable as well as reboot |
no -L | List all settings, defaults, min, max, and next boot values |
lsattr -El sys0 | List all sys0 tunables |
vmo -h minperm% | Get information on the minperm% vmo tunable |
chdev -l sys0 -a maxuproc=2048 | Change the maximum number of user processes to 2048 |
smtctl | Check to see if SMT is enabled |
/etc/tunables/ | Directory containing tunables settings |
NFS
exportfs | List all exported file systems |
exportfs -av | Refresh exports after editing /etc/exports |
exportfs -i -o rw root=server1 /proj | Temporarily export the /proj directory, allowing root access by server1 |