General OS commands

From Stuff!
Jump to: navigation, search

Memory / Swapfile

List size, summary, and paging activity by paging space

lsps -a

List summary of all paging space

lsps -s

List the total amount of physical RAM in system

lsattr -El sys0 -a realmem

Create a new paging device on rootvg of 64 PPs

mkps -a -s 64 -n rootvg

Extend the existing paging space by 8 PPs

chps -s 8 hd6

NFS

List all exported file systems

exportfs

Refresh exports after editing /etc/exports

exportfs -av

Temporarily export the /proj directory, allowing root access by server1

exportfs -i -o rw root=server1 /proj

--(un)share(all) are symlinks to exportfs for Unix compatibility.
--[mk|rm|ch]nfs are provided to maintain /etc/exports

Getting info about the system

Find the OS, (ML/)TL (-r), and service pack version / date (-s)

oslevel -r oslevel -s

List all attributes of system

getconf -a

Find the type of kernel loaded (use -a to get all options)

getconf KERNEL BITMODE

bootinfo and getconf can return much of the same information, getconf returns more and has the grepable -a option.

Find the level of firmware on a system

invscout (or) lscfg -pv

List all attributes for the kernel "device"

lsattr -El sys0

Print a "dump" of system information

prtconf

Get all page sizes supported on this system

pagesize -a

Users and Groups

List all settings for root user in grepable format

lsuser -f root

List just the user names

lsuser -a id ALL | sed 's/ id.*$//'

Find the fsize value for user myname

lsuser -a fsize myname

Change the fsize value for user myname

chuser fsize=-1 myname

(/usr)/bin/sh and (/usr)/bin/ksh are the same file.
Use bsh for the Bourne shell.