Admin Quick Command

  • View
    236

  • Download
    0

Embed Size (px)

Citation preview

  • 8/2/2019 Admin Quick Command

    1/35

    ttp://www.rootvg.net/adminquickref.htm

    Quick Reference Administering AIX V5.2 version 1.0OOTVG.NET does not warrant that the contents of this QuickRef will meet your requirements or that the exampes areror-free. The QuickRef could include technical inaccuracies or typographical errors. Also read the disclaimer. ROO

    ET may make improvements/changes in this QuickRef at any time.2003 ROOTVG.NET, All Rights Reserved.

    or several commands you must have root authority.lick here to use the navigation menu on the left to go to a specific section directly.

    ystem installation and maintenance management

    slevel Reports the latest installed maintenance level of the system.oslevel -r: determines the highest recommended maintenance level reached for the current

    version of AIX.oslevel -lr 5100-04: lists which fileset updates are missing if after installing ML 04 on 5100-0

    the command oslevel -r still shows 5100-03.

    log Creates and maintains fixed-size log files.

    alog -o -t boot : view the boot log (the log that holds boot information).alog -L : lists the logs defined in the alog database.

    rrpt Generates a report of logged errors in the system error log.errpt -a : displays a complete detailed report.

    errpt -c > /dev/console : formats and displays each of the errors at logtime (concurrent erro

    logging) on /dev/console.

    rrdemon Starts the error logging daemon errdemon that reads error records from the /dev/error file and

    creates error log entries in the default system error log /var/adm/ras/errlog./usr/lib/errdemon : starts the error logging daemon.

    /usr/lib/errdemon -l : displays the path to the system error log file and error log size./usr/lib/errdemon -s 2000000 : changes the maximum size of the error log file to 2 MB.

    yslogd The syslogd daemon logs messages from kernel, daemons and system applications using /et

    syslog.conf.

    *.debug errlog (add this line to to syslog.conf to redirect all syslog messages to the

    system error log).stopsrc -s syslogd : stops the syslogd daemon.

    startsrc -s syslogd : starts the syslogd daemon.

    refresh -s syslogd : refreshes the syslogd daemon.

    rrlogger Logs an operator message.errlogger new disk added on scsi1 adapter : logs "new disk added on scsi1 adapter"

    the system error log.

    rrclear Deletes entries from the system error log. Software and operator errors (older than 30 days) andhardware errors (older than 90 days) are removed using crontab.

    rrinstall Installs or replaces messages in the error logging message sets of the error log message catalog

    rrupdate Updates the Error Record Template Repository (default file /var/adm/ras/errtmplt).

    ttp://www.rootvg.net/adminquickref.htm(1 of 35)2007-06-19 1:24:31

    http://www.rootvg.net/disclaimer.htmhttp://www.rootvg.net/menu.htm#QuickRef%20Administering%20AIX%20V5.2http://wu%28%27oslevel%27%29/http://wu%28%27alog%27%29/http://wu%28%27errpt%27%29/http://wu%28%27errdemon%27%29/http://wu%28%27errdemon%27%29/http://wu%28%27syslogd%27%29/http://wu%28%27syslogd%27%29/http://sysfile%28%27syslog.conf%27%29/http://sysfile%28%27syslog.conf%27%29/http://wu%28%27errlogger%27%29/http://wu%28%27errclear%27%29/http://wu%28%27errinstall%27%29/http://wu%28%27errupdate%27%29/http://wu%28%27errupdate%27%29/http://wu%28%27errinstall%27%29/http://wu%28%27errclear%27%29/http://wu%28%27errlogger%27%29/http://sysfile%28%27syslog.conf%27%29/http://sysfile%28%27syslog.conf%27%29/http://wu%28%27syslogd%27%29/http://wu%28%27syslogd%27%29/http://wu%28%27errdemon%27%29/http://wu%28%27errdemon%27%29/http://wu%28%27errpt%27%29/http://wu%28%27alog%27%29/http://wu%28%27oslevel%27%29/http://www.rootvg.net/menu.htm#QuickRef%20Administering%20AIX%20V5.2http://www.rootvg.net/disclaimer.htm
  • 8/2/2019 Admin Quick Command

    2/35

    ttp://www.rootvg.net/adminquickref.htm

    iag Menu driven program to run a wide choice of tasks and service aids (diagnostics, hardware errorreport, format, microcode and bootlist management, ...).Diagnostics modes:Concurrent mode: diag is used during normal operation (only devices not in use can be tested).Single-user mode: run diag aftershutdown -m.

    Stand-alone mode: boot from Diagnostics CD (press F5 when acoustic beep is heard)

    orboot and press F6 when acoustic beep is heard to load diag from hard disk.

    ifdiag returns "diag is not supported on this model" use:SMS mode: boot and press F1 when acoustic beep is heard, select "test the computer". Some ol

    models use a SMS diskette.

    lt_disk_install Installs an alternate disk with a mksysb install image or clones the currently running system to analternate disk.Note: install bos.alt_disk_install fileset to use alt_disk_install.

    alt_disk_install -C hdisk2 : Clones the current rootvg to hdisk2.

    alt_disk_install -C -b update_all -l /dev/cd0 hdisk4 : Creates clone of the current

    rootvg on hdisk4, installs a ML on the clone and changes the bootlist to hdisk4.alt_disk_install -X old_rootvg : Removes the original rootvg from the ODM, after booting

    from the new alternate disk (you can still reboot from old_rootvg).

    imadm Performs Alternate Disk Migration (to a new version or release) of AIX using NIM resources.nimadm -c aix1 -s spot2 -l lpp2 -d "hdisk1 hdisk2" -Y : migrates totarget NIM clien

    aix1, using NIM SPOT resource spot2, the NIM lpp_source lpp2, and hdisk1 and hdisk2 target disand agreeing to all required software license agreements for the software being installed (-Y).nim -o alt_disk_install -a source=rootvg -a disk='hdisk2' -a phase=12

    holland : clones a rootvg on client holland to hdisk1, but only run phase1 and phase2 (leaving t

    alt_inst file systems mounted).

    roblem determination

    ysdumpdev Changes the primary or secondary dump device designation in a running system. The default primdump device is LV /dev/hd6 and the default secondary dump device is /dev/sysdumpnull. Adedicated primary dump device LV /dev/lg_dumplv is created (if sufficient disk space is available)systems with at least 4 Gigabytes of real memory.sysdumpdev -l : displays current dump device settings.

    sysdumpdev -P -p /dev/hd7 : changes the primary dump device permanently from the def

    to LV /dev/hd7.sysdumpdev -e : estimates the dump size (in bytes) for the current running system.

    sysdumpdev -L : displays statistical information about the last dump.

    chdev -l sys0 -a autostart=true : automatically reboot after a crash (default is false).

    umpcheck Checks the disk resources used by the system dump and logs in the system error log. Run defaucron at 3:00 pm local time each day./usr/lib/ras/dumpcheck -p : requests a dumpcheck. The result is printed to stdout (-p).

    /usr/lib/ras/dumpcheck -r : discontinues running dumpcheck (removes the crontab entry).

    ttp://www.rootvg.net/adminquickref.htm(2 of 35)2007-06-19 1:24:32

    http://wu%28%27diag%27%29/http://wu%28%27alt_disk_install%27%29/http://wu%28%27nimadm%27%29/http://wu%28%27sysdumpdev%27%29/http://wu%28%27dumpcheck%27%29/http://wu%28%27dumpcheck%27%29/http://wu%28%27sysdumpdev%27%29/http://wu%28%27nimadm%27%29/http://wu%28%27alt_disk_install%27%29/http://wu%28%27diag%27%29/
  • 8/2/2019 Admin Quick Command

    3/35

    ttp://www.rootvg.net/adminquickref.htm

    db Displays system images for examining a dump.kdb /var/adm/ras/vmcore.0 /unix : starts kdb using the uncompressed dump file /var/adm

    ras/vmcore.0 and kernel file /unix.

    nap Gathers system configuration information and compresses the information into a pax file.snap -a -o /dev/rmt0 : gathers all system configuration information (needs approximately 8 M

    space in directory /tmp/ibmsupt) and creates a compressed pax image (snap.pax.Z) of directory /ibmsupt.

    napcore Gathers the core file, program, and libraries used by a program to directory /tmp/snapcore (defauand compresses the information into a pax image. The collected information allows debugging anresolving problems within an application.snapcore -d /tmp/snapcore2 core.xx : gathers all needed information for core dump file

    core.xxand writes it to directory /tmp/snapcore2/snapcore_32811.pax.Z, where 32811 is the proid ($pid) of the snapcore command.uncompress -c snapcore_32811.pax.Z | pax : displays the contents of the pax archiv

    heck_core Used by snapcore to gather all information about a core dump. The bos.rte.serv_aid fileset m

    be installed.

    /usr/lib/ras/check_core core.xx : displays a list containing the program that caused coredump core.xxand the used libraries.

    hconf Manages the system hang detection parameters for the system hang daemon shdaemon.

    shconf -d : displays if priority problem detection and lost I/O detection are enabled or not.

    shconf -E -l prio -H : displays the current shdaemon settings.

    ystem initialization and boot managementhe numeric 1 key (F1 on graphical display), when pressed during POST (double beep), starts the SMS interface.he numeric 5 key (F5 on graphical display), when pressed during POST, initiates a system boot in service mode using efault service mode boot list. Sequence: 1. diskette (if installed), 2. CD-ROM (if installed), 3. hard disk, 4. tape drive (ifstalled), 5. network (a. Token ring, b. Ethernet).he numeric 6 key (F6 on graphical display) works like the numeric 5 key, but uses the customized service mode bootlishis is the preferred method of loading AIX diagnostics from the boot hard disk.

    pl_varyon * Used to vary on the root volume group during system boot processing.ipl_varyon -i : Inquiry mode - skips ipl device processing. Checks which disks are already

    bootable.

    osboot Creates boot image. It does not update the bootlist in the NVRAM.bosboot -a -d /dev/hdisk0 : Re-create boot image on hdisk0.

    bosboot -a -d /dev/ipldevice -D : creates a boot image with the KDB debugger enabled.

    mklv Creates a logical volume.mklv -y hd5 -t boot rootvg 1 : re-create boot LV (BLV) hd5.

    slv Displays information about a logical volume.lslv -l hd5 : determines the boot disk.

    mkboot Creates the boot image, the boot record, and the service record.mkboot -c -d /dev/hdisk0 : clears the boot record of PV hdisk0.

    ttp://www.rootvg.net/adminquickref.htm(3 of 35)2007-06-19 1:24:32

    http://wu%28%27kdb%27%29/http://wu%28%27snap%27%29/http://wu%28%27snapcore%27%29/http://wu%28%27shconf%27%29/http://wu%28%27bosboot%27%29/http://wu%28%27mklv%27%29/http://wu%28%27lslv%27%29/http://wu%28%27mkboot%27%29/http://wu%28%27mkboot%27%29/http://wu%28%27lslv%27%29/http://wu%28%27mklv%27%29/http://wu%28%27bosboot%27%29/http://wu%28%27shconf%27%29/http://wu%28%27snapcore%27%29/http://wu%28%27snap%27%29/http://wu%28%27kdb%27%29/
  • 8/2/2019 Admin Quick Command

    4/35

    ttp://www.rootvg.net/adminquickref.htm

    hpv Changes the characteristics of a physical volume in a volume group.chpv -c hdisk1 : clears the boot record of PV hdisk1.

    ootinfo Determines and displays various boot information, including boot device type and boot device na(NOT supported in AIX 4.2 or later).bootinfo -b : returns the last boot device.

    bootinfo -B hdisk0 : returns 1 if disk is bootable, 0 if not.

    ootlist Displays or alters the list or ordering of boot devices available to the system.Normal boot list: possible boot devices for normal mode.Service boot list: possible boot devices for service mode.Previous boot device: last device from which the system booted.Support of these boot lists is model dependent.bootlist -m normal -o : displays the normal boot list.

    bootlist -m service -o : displays the service boot list (if available).

    bootlist -m normal cd0 hdisk0 hdisk1 : makes changes to the normal boot list.

    bootlist -m prevboot : invalidates the last device from which the system booted.

    altorfasthalt Writes data to disk (sync) and then stops the system. The system does not restart. Do not use thi

    command if other users are logged into the system.

    ebootor

    astboot

    Restarts the system. Can be used if no other users are logged into the system.

    hutdown Halts the operating system. Checks the existence of the executable /etc/rc.shutdown file (added bthe administrator) that specifies all the applications and other user processes to close down.By default the shutdown command powers down the system (if supported and issued).shutdown -Fr : fast system shutdown and restart.

    shutdown -m +1 : brings the system down to maintenance (single user) mode after waiting o

    minute.shutdown -l : logs the output during the shutdown to /etc/shutdown.log.

    ast Displays information about previous logins using the /var/adm/wtmp file.last reboot : displays the time between reboots.

    last shutdown : lists last shutdowns of the system.

    ptime Shows how long the system has been up.uptime : displays the current time, the length of time the system has been up, the number of us

    online, and the load average.

    ync Updates the i-node table and writes buffered files to the hard disk.

    sync;sync;sync;reboot : writes everything from the buffer to the hard disk and reboots thesystem.

    sfont Lists the fonts available for use by the display.

    hfont Changes the default font selected at boot time.

    mkfont Adds the font code associated with a display to the system.

    mkfontdir Creates a fonts.dir file from a directory of font files.

    hlang Sets LANG environment variable in the /etc/environment file for next login.

    ttp://www.rootvg.net/adminquickref.htm(4 of 35)2007-06-19 1:24:32

    http://wu%28%27chpv%27%29/http://wu%28%27bootlist%27%29/http://wu%28%27halt%27%29/http://wu%28%27halt%27%29/http://wu%28%27halt%27%29/http://wu%28%27reboot%27%29/http://wu%28%27reboot%27%29/http://wu%28%27reboot%27%29/http://wu%28%27shutdown%27%29/http://wu%28%27last%27%29/http://wu%28%27uptime%27%29/http://wu%28%27sync%27%29/http://wu%28%27lsfont%27%29/http://wu%28%27chfont%27%29/http://wu%28%27mkfont%27%29/http://wu%28%27mkfontdir%27%29/http://wu%28%27chlang%27%29/http://sysfile%28%27environment%27%29/http://sysfile%28%27environment%27%29/http://wu%28%27chlang%27%29/http://wu%28%27mkfontdir%27%29/http://wu%28%27mkfont%27%29/http://wu%28%27chfont%27%29/http://wu%28%27lsfont%27%29/http://wu%28%27sync%27%29/http://wu%28%27uptime%27%29/http://wu%28%27last%27%29/http://wu%28%27shutdown%27%29/http://wu%28%27reboot%27%29/http://wu%28%27reboot%27%29/http://wu%28%27reboot%27%29/http://wu%28%27halt%27%29/http://wu%28%27halt%27%29/http://wu%28%27bootlist%27%29/http://wu%28%27chpv%27%29/
  • 8/2/2019 Admin Quick Command

    5/35

    ttp://www.rootvg.net/adminquickref.htm

    htz Changes the system time zone information in the /etc/environment file.

    hhwkbd Changes the low-function terminal (LFT) keyboard attributes stored in the Object Data Manager(ODM) database.

    skbd Lists the keyboard maps currently available to the low-function terminal (LFT) subsystem.

    hkbd Changes the default keyboard map used by the low-function terminal (LFT) at system startup.

    hkey Changes your encryption key.

    slicense Displays the number of fixed licenses and the status of floating licensing. There are two types of ulicensing, fixed and floating. Fixed licensing is always enabled. Floating licensing can be enableddisabled.lslicense -A : displays the number of available fixed licences on the system.

    hlicense Changes the number of fixed licenses and the status of the floating licensing (updates login.cfg

    chlicense -I -u 50I -u 50 : changes the fixed license number immediately to 50 (without

    rebooting).chlicense -f on : enables the floating licensing.

    sitab Lists records in the /etc/inittab file.

    hitab Changes records in the /etc/inittab file.

    mkitab Adds records to the /etc/inittab file.

    mitab Removes records from the /etc/inittab file.

    elinit

    r

    nit

    Initializes and controls processes.0-9 Tells the init process to put the system in one of the run levels 0-9. S,s,M,m Tells the init procto enter the maintenance mode. a,b,c Tells the init process to examine only those records in the /

    inittab file with a, b, or c in the run-level field. Q,q Tells the init process to re-examine the entire /einittab file. N Sends a signal that stops processes from being respawned.telinit q : requests the init command to re-examine the /etc/inittab file.

    who Identifies the users currently logged in.who -r : displays the runlevel.

    who /var/adm/wtmp : displays a history of logins, logouts, system startups, and system

    shutdowns.

    estbase Restores customized information from the boot image.Attention: The command is executed onlyduring system boot phase 1. Do not execute it in a run-time environment.

    avebase Saves base customized device data in the ODM onto the boot device.savebase -d /dev/hdisk0 : save the ODM to the boot logical volume.

    ardware installation and configuration management

    vailable hardware platforms: MCA-based uni-processor models (rs6k), MCA-based symmetric multiprocessor modelss6ksmp), ISA-bus models (rspc), PCI-bus models (CHRP). AIX V5.2 is not supported on MCA and PReP architectureardware. The "AIX Statement of Direction" gives a complete list of unsupported models.

    ttp://www.rootvg.net/adminquickref.htm(5 of 35)2007-06-19 1:24:32

    http://wu%28%27chtz%27%29/http://sysfile%28%27environment%27%29/http://wu%28%27chhwkbd%27%29/http://wu%28%27lskbd%27%29/http://wu%28%27chkbd%27%29/http://wu%28%27chkey%27%29/http://wu%28%27lslicense%27%29/http://wu%28%27chlicense%27%29/http://sysfile%28%27login.cfg%27%29/http://wu%28%27lsitab%27%29/http://sysfile%28%27inittab%27%29/http://wu%28%27chitab%27%29/http://sysfile%28%27inittab%27%29/http://wu%28%27mkitab%27%29/http://sysfile%28%27inittab%27%29/http://wu%28%27rmitab%27%29/http://sysfile%28%27inittab%27%29/http://wu%28%27telinit%27%29/http://wu%28%27telinit%27%29/http://wu%28%27telinit%27%29/http://wu%28%27who%27%29/http://wu%28%27restbase%27%29/http://wu%28%27savebase%27%29/http://www.rootvg.net/Docs/AIX52MCA.pdfhttp://www.rootvg.net/Docs/AIX52MCA.pdfhttp://wu%28%27savebase%27%29/http://wu%28%27restbase%27%29/http://wu%28%27who%27%29/http://wu%28%27telinit%27%29/http://wu%28%27telinit%27%29/http://wu%28%27telinit%27%29/http://sysfile%28%27inittab%27%29/http://wu%28%27rmitab%27%29/http://sysfile%28%27inittab%27%29/http://wu%28%27mkitab%27%29/http://sysfile%28%27inittab%27%29/http://wu%28%27chitab%27%29/http://sysfile%28%27inittab%27%29/http://wu%28%27lsitab%27%29/http://sysfile%28%27login.cfg%27%29/http://wu%28%27chlicense%27%29/http://wu%28%27lslicense%27%29/http://wu%28%27chkey%27%29/http://wu%28%27chkbd%27%29/http://wu%28%27lskbd%27%29/http://wu%28%27chhwkbd%27%29/http://sysfile%28%27environment%27%29/http://wu%28%27chtz%27%29/
  • 8/2/2019 Admin Quick Command

    6/35

    ttp://www.rootvg.net/adminquickref.htm

    scfg Displays configuration, diagnostic and VPD information about the system.lscfg -vp : Displays the system model, machine serial, processor type, number of processors,

    processor clock speed, cpu type, total memory size, network information, filesystem information,paging space information, and devices information.lscfg | grep proc | wc -l : lists the # of processors.

    rtconforlsconf Displays system configuration information.prtconf -s : displays the processor clock speed.

    prtconf -k : displays the kernel type in use.prtconf -m : displays memory.

    nap Gathers system configuration information.snap -a : gathers system configuration information. The output is written to the /tmp/ibmsupt

    directory.

    name Displays the name of the current operating system.uname -a : displays the machine ID and version banner.

    uname -x : displays the operating system in use, the host name, the machine ID number of the

    hardware, the release number of the operating system, the operating system version and the syst

    model name.

    mach Displays the processor architecture of the machine.

    etconf Displays system configuration variable values.getconf HARDWARE_BITMODE : displays hardware bit mode (64 or 32 bit).

    getconf KERNEL_BITMODE : displays kernel bit mode (64 or 32 bit).

    getconf DISK_SIZE /dev/hdisk2 : displays disk size in MB.

    getconf REAL_MEMORY : displays real memory size in MB.

    fg2html A system configuration to HTML converter (Open Source)

    le Determines the file type.file prog: displays user process bit mode of program prog. Returns:

    executable (RISC System/6000) or object module not stripped (32 bit program),or64-bit XCOFF executable or object module not stripped (64 bit program).file /unix : the returned link shows which kernel is running: unix_up = 32-bit uniprocessor kerne

    unix_mp = 32-bit multiprocesssor kernel, unix_64 = 64-bit multiprocessor kernel.

    fgmgr Configures devices by running the programs in /etc/methods directory and optionally installs devicsoftware.cfgmgr : runs the Phase 2 configuration rules (second boot phase for normal boot) (same as us

    the -s flag).cfgmgr -v : makes devices available that where not powered on when the system started.

    cfgmgr -l scsi1 : configures detected devices attached to the scsi1 adapter.

    cfgmgr -i /usr/sys/inst.images : installs device software (using the directory /usr/sys/inst

    images) automatically during configuration.

    hcons Redirects the system console to device or file, effective next startup.chcons -a login=enable /dev/tty0 : changes the system console to device /dev/tty0. Use

    dev/lft0 for the default LFT display.chcons /tmp/console.out : redirects the system console to file /tmp/console.out.

    ttp://www.rootvg.net/adminquickref.htm(6 of 35)2007-06-19 1:24:32

    http://wu%28%27lscfg%27%29/http://wu%28%27prtconf%27%29/http://wu%28%27prtconf%27%29/http://wu%28%27prtconf%27%29/http://wu%28%27snap%27%29/http://wu%28%27uname%27%29/http://wu%28%27mach%27%29/http://wu%28%27getconf%27%29/http://freshmeat.net/projects/cfg2html/?topic_id=253http://wu%28%27file%27%29/http://wu%28%27cfgmgr%27%29/http://wu%28%27chcons%27%29/http://wu%28%27chcons%27%29/http://wu%28%27cfgmgr%27%29/http://wu%28%27file%27%29/http://freshmeat.net/projects/cfg2html/?topic_id=253http://wu%28%27getconf%27%29/http://wu%28%27mach%27%29/http://wu%28%27uname%27%29/http://wu%28%27snap%27%29/http://wu%28%27prtconf%27%29/http://wu%28%27prtconf%27%29/http://wu%28%27lscfg%27%29/
  • 8/2/2019 Admin Quick Command

    7/35

    ttp://www.rootvg.net/adminquickref.htm

    sdisp Lists the displays and the default display currently available on the system.

    hdisp Changes the display used by the LFT subsystem.chdisp -p gda1 : changes the default display permanently to gda1.

    sattr Displays attribute characteristics and possible values of attributes for devices in the system.lsattr -EHl sys0l sys0: displays system attributes (realmem ...)

    lsattr -EHl proc0 : displays the state, type and frequency of processor proc0.

    lsattr -El rmt0 : lists the current attribute values for the tape device rmt0.lsattr -El tty0 -a speed : lists the current value of the speed attribute for serial port tty0.

    sdev Displays devices in the system and their characteristics.Examples:lsdev -P -H : lists the Predefined (supported) Devices (in the PdDv object class).

    lsdev -C -H : lists the Customized (configured/defined) Devices (in the CuDv object class).

    lsdev -C -c disk : lists all the PVs (class disk) in the system along with the status and location

    code.

    stdgrp Displays devices in a device class.

    listdgrp disk : list the devices in the disk class.etdev Lists devices that match the specified criteria.

    getdev type=proc_rspc : lists all devices of type proc_rspc.

    etdgrp Lists device classes that match the specified criteria.getdgrp : display all device classes.

    hdev Changes a device's characteristics.chdev -l hdisk2 -a pv=yes : assigns a PVID to hdisk2.

    mkdev Adds a device to the system.

    mkdev -l hdisk2 : make the already defined disk device hdisk2 available to use.mkdev -l hdisk1 -a pv=yes : makes an available disk a PV (assigning a PVID), if it does n

    already have one.mkdev -c tty -t tty -s rs232 -p sa0 -w s1 -a login=enable -a term=ibm3151 : a

    an ibm3151 RS232terminal using adapter sa0 port s1 with login enabled.

    mdev Removes a device from the system.rmdev -l tty0 -d : removes the tty0 device definition from the CuDv object class (ODM).

    rmdev -l hdisk1 : unconfigures PV hdisk1 and changes its state from available to defined

    (definition is not removed from the CuDv object class (ODM).

    hysical Volume Managementee also lsdev, chdev, mkdev and rmdev.

    ttp://www.rootvg.net/adminquickref.htm(7 of 35)2007-06-19 1:24:32

    http://wu%28%27lsdisp%27%29/http://wu%28%27chdisp%27%29/http://wu%28%27lsattr%27%29/http://wu%28%27lsdev%27%29/http://wu%28%27listdgrp%27%29/http://wu%28%27getdev%27%29/http://wu%28%27getdgrp%27%29/http://wu%28%27lsdev%27%29/http://wu%28%27mkdev%27%29/http://wu%28%27mkdev%27%29/http://wu%28%27mkdev%27%29/http://wu%28%27mkdev%27%29/http://wu%28%27lsdev%27%29/http://wu%28%27getdgrp%27%29/http://wu%28%27getdev%27%29/http://wu%28%27listdgrp%27%29/http://wu%28%27lsdev%27%29/http://wu%28%27lsattr%27%29/http://wu%28%27chdisp%27%29/http://wu%28%27lsdisp%27%29/
  • 8/2/2019 Admin Quick Command

    8/35

    ttp://www.rootvg.net/adminquickref.htm

    spv Displays information about a physical volume (PV) within a volume group.lspv : lists the name, PVID and VG for each configured PV.

    lspv hdisk2 : lists the characteristics of PV hdisk2.

    lspv -M hdisk3 : lists the mapping and stale PPs for hdisk3.

    lspv -l hdisk0 : lists LV allocation within PV hdisk0.

    lspv -p hdisk1 : lists PP intra-allocation by PV region and PP state (free, used, stale, vgda) o

    hdisk1.

    querypv * Queries the attributes of a physical volume.

    hpv Changes the characteristics of a physical volume in a volume group.chpv -a n hdisk1 : turn off the allocation permission of free PPs for PV hdisk1.

    chpv -a y hdisk1 : turn the allocation permission for hdisk1 back on.

    chpv -v r hdisk3 : set the state of PV hdisk3 to unavailable (use when PV is to be removed fr

    the system or is lost due to failure).chpv -v a hdisk4 : make PV hdisk4 available to the system (from state removed to active).

    chpv -h y hdisk2 : marks hdisk2 (with no allocated LPs) as a hot spare disk in a VG with

    mirrored LVs.

    migratepv Moves allocated PP's from one PV to one or more other PP's in the same VG.The command is not allowed if the VG is varied on in concurrent mode.migratepv hdisk1 hdisk3 hdisk5 : moves all PPs from hdisk1 to hdisk3 and hdisk5.

    migratepv -l lv02 hdisk2 hdisk4 : moves all PPs in LV lv02 from hdisk2 to hdisk4.

    ile System Management

    X supported file system types:

    andard Journaled Fileystem (JFS)

    max. file size 2 GB, max. file system size 1 TB

    rge file enabled JFS max. file size 64 GB, max. file system size 1 TB

    nhanced Journaled Fileystem (JFS2)

    max. file size tested 1 TB (AIX currently supports up to 16 TB using the 64-bit kernel, 1 using the 32-bit kernel), max. file system size tested 1 TB, architectural max. file systemsize 4 PB.The JFS2 outline log can be up to 1 GB (32-bit kernel) and up to 64 GB (64-bit kernel).TJFS2 inline log size can be from 256 KB up to 16 GB.

    eneral Parallel File SystemPFS)

    Provides a cluster-wide file system allowing users shared access to files spanning multidisk drives.

    AM File System Up to 8 RAM disks can be created (2 GB size limitation is removed in AIX V5.2). Size

    cannot be changed afterwards.etwork File System (NFS) NFS allows programs on one system to access files on another system transparently by

    mounting the remote directory.

    D-ROM File System (CDRFS) A read-only local file system implementation under the logical file system (LFS) layer.Supported are ISO 9660:1988(E) standard, the High Sierra Group Specification, the RoRidge Group Protocol, the CD-ROM eXtended Architecture File Format (in Mode 2 Formsector format only). CDs are automatically mounted by default.

    ttp://www.rootvg.net/adminquickref.htm(8 of 35)2007-06-19 1:24:32

    http://wu%28%27lspv%27%29/http://wu%28%27chpv%27%29/http://wu%28%27migratepv%27%29/http://wu%28%27migratepv%27%29/http://wu%28%27chpv%27%29/http://wu%28%27lspv%27%29/
  • 8/2/2019 Admin Quick Command

    9/35

    ttp://www.rootvg.net/adminquickref.htm

    VD-ROM File System (UDFS) A read-only file system stored on DVD-ROM media. UDFS format versions 1.50, 2.00, a2.01 are supported.DVDs are automatically mounted by default.

    ache File System (CacheFS) CacheFS is used to enhance read performance of remote file systems (NFS) or slowdevices such as CD-ROM. CacheFS handles files larger than 2 GB.

    efault AIX file systems:

    lv description

    hd4 The / (root) file system contains files and directories critical for system operation.sr hd2 Files that can be shared by machines of the same hardware architecture are located in the /usr file syst

    Architecture-independent, shareable text files, such as manual pages, are located in the /usr/sharedirectory.

    ar hd9var Variable per-client files, such as spool and mail files, are located in the /var file system.

    ome hd1 The /home file system is the mount point for user home directories.

    mp hd3 The /tmp file system contains system-generated temporary files.

    pt hd10opt The /opt file system is reserved for the installation of add-on application software packages.

    roc - The /proc pseudo file system provides access to the state of each active process and thread in the syst

    by mappping processes and kernel data structures to corresponding files.f Reports information about space on file systems.

    df -m /usr : displays information about file system /usr in MB (-m) blocks (use -g for GB).

    uot Summarizes file system ownership.quot -f /home : displays the number of files and bytes owned by each user in the /home file

    system.

    u Summarizes disk usage.du -sg /home : displays the total disk usage in GB (-g) for all files in directory tree /home.

    nd Recursively searches the directory tree with a matching expression.find . -type f -exec grep "unix" {} \; -print : looks for string "unix" and prints the names

    the files in which it is found.

    leplace Displays the placement of file blocks within logical or physical volumes.fileplace -v data3 : displays the placement of a file in its LV, including statistics on how widel

    the file is spread across the volume and the degree of fragmentation in the volume (-v).

    sfs Displays the characteristics of file systems. Uses /etc/filesystems (system file with stanzas o

    known file systems and their characteristics).lsfs : shows all file systems in the /etc/filesystems file.

    lsfs -q /usr : shows the LV size, file system size, the fragment size, the compression algorithmand the number of bytes per i-node (nbpi) of the /usr file system.

    lsfs -v jfs2 : shows all file systems of vfs type jfs2.

    ttp://www.rootvg.net/adminquickref.htm(9 of 35)2007-06-19 1:24:32

    http://wu%28%27df%27%29/http://wu%28%27quot%27%29/http://wu%28%27du%27%29/http://wu%28%27find%27%29/http://wu%28%27fileplace%27%29/http://wu%28%27lsfs%27%29/http://sysfile%28%27filesystems%27%29/http://sysfile%28%27filesystems%27%29/http://wu%28%27lsfs%27%29/http://wu%28%27fileplace%27%29/http://wu%28%27find%27%29/http://wu%28%27du%27%29/http://wu%28%27quot%27%29/http://wu%28%27df%27%29/
  • 8/2/2019 Admin Quick Command

    10/35

    ttp://www.rootvg.net/adminquickref.htm

    rfs Adds a file system. The smallest file system is equal to one PP.crfs -v jfs -g datavg -a size=32M -m /user : creates a JFS of 32 MB with /user as the

    mount point in VG datavg.crfs -v jfs2 -g rootvg -a size=128M -m /data -A yes -p rw -a agblksize=2048

    creates a JFS2 of 128 MB with /data as the mount point, automatically mounted at system restart

    A), with 4K as the smallest file system block size that can be allocated to a file.

    mkfs Makes a new file system on a specified existing device (LV).

    mkfs -s 64M /data /dev/lvdata : creates an empty 64 MB file system on LV lvdata.mkfs -o name=/user /dev/lvuser : creates an empty file system on the /dev/lvuser device

    with mount point /user. The new file system occupies the entire device and has the default fragmesize (4096 bytes) and the default nbpi ratio (4096).

    hfs Changes attributes of a file system.chfs -a size=+16M /data : increases the size of the /data file system by 16 MB.

    chfs -a size=64M /data : changes the size of the /data file system to 64 MB (provided it was

    previously no larger than this).chfs -A yes /data : sets the mount=true attribute in /etc/filesystems for file system with mount

    point /data.mfs Removes a file system.

    rmfs -r /data : removes file system /data, it's mount point (-r) and it's LV.

    duce fs Official procedure 1:1. Make a backup of the file system.2. Remove the file system.3. Create a new file system using the same name and reduced size.4. Restore the backup of the file system into the new file system.Official procedure 2:

    1. Make a mksysb (VG rootvg) or savevg (other VGs).2. Restore the VG using the shrink file systems option.

    mount Makes a file system available for use.mount : lists the mounted file systems.

    mount all ormount -a : mounts all file systems in /etc/filesystems marked by the mount=true

    attribute (file systems marked by the mount=automatic attribute are not mounted - they are mounby the boot process).mount /dev/lvdata : mounts the file system (in LV lvdata) using the default mount point from

    filesystems.mount -v cdrfs -o ro /dev/cd0 /mnt : mounts the CDROM on /mnt.

    mount

    r

    nmount

    Unmounts a previously mounted file system, directory, or file.umount all : unmounts all file systems in /etc/filesystems marked by the mount=true attribute (

    systems marked by the mount=automatic attribute are not unmounted).umount -f /mnt : forces the unmount of the /mnt NFS file system.

    ttp://www.rootvg.net/adminquickref.htm(10 of 35)2007-06-19 1:24:32

    http://wu%28%27crfs%27%29/http://wu%28%27mkfs%27%29/http://wu%28%27chfs%27%29/http://wu%28%27rmfs%27%29/http://wu%28%27mount%27%29/http://wu%28%27umount%27%29/http://wu%28%27umount%27%29/http://wu%28%27umount%27%29/http://wu%28%27umount%27%29/http://wu%28%27umount%27%29/http://wu%28%27umount%27%29/http://wu%28%27mount%27%29/http://wu%28%27rmfs%27%29/http://wu%28%27chfs%27%29/http://wu%28%27mkfs%27%29/http://wu%28%27crfs%27%29/
  • 8/2/2019 Admin Quick Command

    11/35

    ttp://www.rootvg.net/adminquickref.htm

    dmount Makes a file system available for use on a device managed by the cdromd daemon (automatic

    mounts a CD-ROM or DVD-ROM when it is inserted in a device, and provides the server functionall cd/dvd related commands).cdmount cd0 : mounts a file system on cd0.

    startsrc -s cdromd : starts the cdromd daemon which reads the /etc/cdromd.conf

    configuration file.

    dcheck Asks cdromd daemon information about a device.

    cdcheck -m cd0 : asks cdromd if a CD is mounted on cd0.

    deject Ejects a media from a CD drive managed by cdromd.cdeject cd0 : ejects a CD from cd0.

    dumount Unmounts a previously mounted file system on a device managed by cdromd.cdumount cd0 : unmount a file system on cd0.

    user Identifies processes using a file or file structure.fuser -u /data : lists the process numbers and user login names of processes using the /data

    system.

    efragfs Increases a file system's contiguous free space by reorganizing scattered allocations.defragfs /home : defragments the /home file system.

    defragfs -s /data : generates a report on the fragmentation in the /data file system.

    mktemp lmktemp largefile 1073741824 : Create a 1GB file named largefile.

    sck Checks file system consistency and interactively repairs the file system.By default, the /, /usr, /var, and /tmp file systems have a check=false attribute in their /etc/filesystestanzas.fsck -p /dev/lv00 : fixes minor problems with the /dev/lv00 file system automatically and if the

    primary superblock is corrupt, the secondary superblock is verified and copied to the primary

    superblock.dd count=1 bs=4k skip=31 seek=1 if=/dev/lvdata of=/dev/lvdata : copies the

    backup superblock of the /dev/lvdata file system over the primary superblock.fsck -V jfs2 /data : checks JFS2 with mount point /data for consistency and repairs problems

    found.

    d Converts and copies a file.dd count=1 bs=4k skip=31 seek=1 if=/dev/lvdata of=/dev/lvdata : restores the

    backup of the superblock over the primary superblock (use when the superblock of the JFS on /dlvdata is corrupted (or dirty).

    ogform Rebuild the JFS log.logform /dev/hd8 : rebuilds the jfslog of rootvg, after booting the machine into maintenance

    mode (attention: The logform command should only be run on closed LVs).logform -V jfs2 /dev/jfs2log : rebuilds the jfs2log /dev/jfs2log.

    ttp://www.rootvg.net/adminquickref.htm(11 of 35)2007-06-19 1:24:32

    http://wu%28%27cdmount%27%29/http://publib16.boulder.ibm.com/doc_link/en_US/a_doc_lib/cmds/aixcmds1/cdromd.htm#cdromdhttp://publib16.boulder.ibm.com/doc_link/en_US/a_doc_lib/cmds/aixcmds1/cdromd.htm#cdromdhttp://sysfile%28%27cdromd.conf%27%29/http://wu%28%27cdcheck%27%29/http://wu%28%27cdeject%27%29/http://wu%28%27cdumount%27%29/http://wu%28%27fuser%27%29/http://wu%28%27defragfs%27%29/http://wu%28%27fsck%27%29/http://wu%28%27dd%27%29/http://wu%28%27logform%27%29/http://wu%28%27logform%27%29/http://wu%28%27dd%27%29/http://wu%28%27fsck%27%29/http://wu%28%27defragfs%27%29/http://wu%28%27fuser%27%29/http://wu%28%27cdumount%27%29/http://wu%28%27cdeject%27%29/http://wu%28%27cdcheck%27%29/http://sysfile%28%27cdromd.conf%27%29/http://publib16.boulder.ibm.com/doc_link/en_US/a_doc_lib/cmds/aixcmds1/cdromd.htm#cdromdhttp://publib16.boulder.ibm.com/doc_link/en_US/a_doc_lib/cmds/aixcmds1/cdromd.htm#cdromdhttp://wu%28%27cdmount%27%29/
  • 8/2/2019 Admin Quick Command

    12/35

    ttp://www.rootvg.net/adminquickref.htm

    napshot Modifies, creates or queries properties a JFS2 snapshot (a consistent block level image of a filesystem). The bos.rte.file fileset must be installed.

    snapshot -o snapfrom=/data /dev/snapsb : creates a snapshot for the /data file syste

    on the exisiting /dev/snapsb LV.snapshot -d /dev/snapsb : deletes the snapshot and the LV containing the snapshot.

    acksnap Creates and backs up a JFS2 snapshot.backsnap -m /tmp/snapshot/data -s size=16M -i -f /dev/rmt0 /data : creates a 1

    MB LV, creates a snapshot for the /data file system on the created LV, mounts the snapshot on /tsnapshot/data and backups the files and directories in that file system by name to /dev/rmt0.

    sdb Examines and modifies snapshot superblock, snapshot map, block xtree copy, and segmentheaders. Mounted file systems cannot be modified.fsdb /data : debugs file system /data.

    umpfs Dumps file system information (superblock, i-node map, and disk map) for debugging.dumpfs /dev/hd2 : prints the information for /dev/hd2.

    svfs Lists entries in the /etc/vfs file.

    rvfs Creates entries in the /etc/vfs file.

    hvfs Changes entries in the /etc/vfs file.

    mvfs Removes entries in the /etc/vfs file.

    mkramdisk Creates a RAM disk using a portion of RAM (pinned by default). Use only for data that can be losSetup procedure creating a 8 MB RAM disk:mkramdisk 8mls -l /dev | grep rammkfs -V jfs /dev/ramdiskx

    mkdir /ramdiskxmount -V jfs -o nointegrity /dev/ramdiskx /ramdiskx

    where x is the logical RAM disk number.

    To remove the RAM filesystem:unmount /ramdiskxrmramdisk /dev/ramdiskx

    fsadmin Administers disk space used for CacheFS.cfsadmin -c /cache1 : creates a cache directory named cache1.

    mount -V cachefs -o backfstype=nfs,cachedir=/cache1 server2:/data /ldata

    CacheFS-mounts the file system /data from remote host server2 on mount point /ldata of the clienusing cachedir /cache1.cfsadmin -l /cache1 : lists file systems and statistics for cache1.

    cfsadmin -d all /cache1 : removes all cached file systems from the /cache1 directory.

    mkcfsmnt Mounts a CacheFS directory.mkcfsmnt -d /mnt -t nfs -h server2 -p /home -c /cache1 -N : mounts the /home fil

    system of server2 locally on the /mnt directory using /cache1 as CacheFS.

    ttp://www.rootvg.net/adminquickref.htm(12 of 35)2007-06-19 1:24:32

    http://wu%28%27snapshot%27%29/http://wu%28%27backsnap%27%29/http://wu%28%27fsdb%27%29/http://wu%28%27dumpfs%27%29/http://wu%28%27lsvfs%27%29/http://sysfile%28%27vfs%27%29/http://wu%28%27crvfs%27%29/http://sysfile%28%27vfs%27%29/http://wu%28%27chvfs%27%29/http://sysfile%28%27vfs%27%29/http://wu%28%27rmvfs%27%29/http://sysfile%28%27vfs%27%29/http://wu%28%27mkramdisk%27%29/http://wu%28%27cfsadmin%27%29/http://wu%28%27mkcfsmnt%27%29/http://wu%28%27mkcfsmnt%27%29/http://wu%28%27cfsadmin%27%29/http://wu%28%27mkramdisk%27%29/http://sysfile%28%27vfs%27%29/http://wu%28%27rmvfs%27%29/http://sysfile%28%27vfs%27%29/http://wu%28%27chvfs%27%29/http://sysfile%28%27vfs%27%29/http://wu%28%27crvfs%27%29/http://sysfile%28%27vfs%27%29/http://wu%28%27lsvfs%27%29/http://wu%28%27dumpfs%27%29/http://wu%28%27fsdb%27%29/http://wu%28%27backsnap%27%29/http://wu%28%27snapshot%27%29/
  • 8/2/2019 Admin Quick Command

    13/35

    ttp://www.rootvg.net/adminquickref.htm

    achefslog Controls the logging of a cache file system.cachefslog -f /cache1/cachelog /mnt : sets up the file /cache1/cachelog to log CacheF

    statistics.

    achefswssize Displays the work space size for a cache file system.cachefswssize /cache1/cachelog : displays the work space size of the cache filesystem

    being logged in the file /cache1/cachelog..

    sck_cachefs Checks the integrity of data cached with CacheFS.fsck_cachefs -o noclean /cache1 : forces a check on the cache directory.

    ile Management

    rocfiles procfiles -n `ls /proc` : lists all the process and files they have open.

    nd find / -xdev -type f -mtime -1 -ls | sort +6nr | head -n 20 : lists the top-20 largest fil

    in / that where used within the last 24 hours.

    ogical Volume ManagementVs automatically created at system installation are:

    d5 boot LV (boot image). Available only at startup.

    d6 Default paging space.

    d8 Default logging space (jfslog) for the journaled file systems.

    d4 / (root) file system.

    d2 /usr file system.

    d9var /var file system.

    d10opt /opt file system.

    d3 /tmp file system.

    d1 /home file system. Users' home directories.

    ote: hd7 was used in earlier AIX versions as dump device.aximum LV size is 1 TB (32-bit kernel) or 128 TB (64-bit kernel).dedicated dump device lg_dumplv is created in systems with at least 4 Gigabytes of real memory.

    slv Displays information about a logical volume (LV).Total LVsize=PPsize * LPs assigned to LV * Number of LV copies.lslv lvdata : lists all the attributes related to LV lvdata.

    lslv -m lvdata : lists the LP to PP/PV mapping of LV lvdata.

    mklv Creates a logical volume. The smallest LV is equal to one PP.mklv -y lvdata -c 3 datavg 10 : creates LV lvdata in VG datavg with ten LPs and a total of

    three copies of the data.mklv -y lvdb datavg 50M : creates LV lvdb with a minimum size of 50MB (b/B=512B, k/K=K

    m/M=MB, g/G=GB). Rounded to whole LVs to make up 50 MB.mklv -a c datavg 2 : creates LV lv00 with a size of two LPs and intra-physical volume allocat

    policy center (e=[outer] edge, m=[outer] middle, c=center, im=inner middle, ie=inner edge).

    ttp://www.rootvg.net/adminquickref.htm(13 of 35)2007-06-19 1:24:32

    http://wu%28%27cachefslog%27%29/http://wu%28%27cachefswssize%27%29/http://wu%28%27fsck_cachefs%27%29/http://wu%28%27procfiles%27%29/http://wu%28%27find%27%29/http://wu%28%27lslv%27%29/http://wu%28%27mklv%27%29/http://wu%28%27mklv%27%29/http://wu%28%27lslv%27%29/http://wu%28%27find%27%29/http://wu%28%27procfiles%27%29/http://wu%28%27fsck_cachefs%27%29/http://wu%28%27cachefswssize%27%29/http://wu%28%27cachefslog%27%29/
  • 8/2/2019 Admin Quick Command

    14/35

    ttp://www.rootvg.net/adminquickref.htm

    hlv Changes the characteristics of a logical volume.chlv -w p lvdata : turns on passive MWC for LV lvdata (big VG only).

    mlv Removes logical volumes from a volume group.rmlv -f lvdata : remove LV lvdata without requiring user confirmation (attention: all data on thi

    is destroyed).

    xtendlv Increases the size of a logical volume by adding unallocated physical partitions.extendlv lvdata 12 : adds twelve more LPs to LV lvdata.

    extendlv lvraw 64M : adds 64 MB to LV lvraw. Rounded to whole LVs needed to make up 6

    MB.

    querylv* Queries the attributes of a logical volume.

    educelv*! Reduces the number of allocated logical partitions of a logical volume (attention: if not used withcare, data is lost). Official procedure to reduce a LV:1. Back up all data in the logical volume.2. Remove the logical volume.3. Recreate the logical volume with the reduced logical partition allocation.4. Restore the data.

    plv Copies the contents of a logical volume to a new logical volume.cplv -v datavg -y lvnew lvold : copies the contents of lvold to new LV lvnew in VG datavg

    cplv -e lvtest -f lvdata : copies the contents of LV lvdata to a smaller, existing LV lvtest with

    the same VG, without requiring user confirmation (attention: if lvtest is smaller than lvdata, then dwill be lost, probably resulting in corruption).

    mklvcopy Adds copies to a logical volume.mklvcopy lvdata 3 : increases the number of copies in each LP in LV lvdata to three.

    mlvcopy Removes copies from a logical volume.

    rmlvcopy lvuser 2 : decreases the number of copies in each LP in LV lvuser to two.migratelp Moves an allocated LP from one PP to another PP on a different PV in the same VG.

    migratelp datalv/23 hdisk3/105 : moves the 23th LP of LV datalv to the 105th PP of PV

    hdisk3.See lspv -p to display the free PPs of PV hdisk3.

    plitlvcopy Splits copies from one logical volume and creates a new logical volume from them.splitlvcopy -y newlv oldlv 2 : splits one copy of each LP belonging to the LV oldlv which

    currently has 3 copies of each LP, and creates the LV newlv.

    etlvcb*Displays a formatted output of the data in the LVCB of a LV.getlvcb -TA hd3 : displays the information held in the LVCB of LV hd3.

    utlvcb*! Writes the control block information (only the specified fields) into block 0 of a logical volume (LVCputlvcb -t jfs lvdata : writes the LV type jfs to the LVCB of LV lvdata.

    ttp://www.rootvg.net/adminquickref.htm(14 of 35)2007-06-19 1:24:32

    http://wu%28%27chlv%27%29/http://wu%28%27rmlv%27%29/http://wu%28%27extendlv%27%29/http://publib-b.boulder.ibm.com/Redbooks.nsf/RedbookAbstracts/sg245433.htmlhttp://publib-b.boulder.ibm.com/Redbooks.nsf/RedbookAbstracts/sg245433.htmlhttp://wu%28%27cplv%27%29/http://wu%28%27mklvcopy%27%29/http://wu%28%27rmlvcopy%27%29/http://wu%28%27migratelp%27%29/http://wu%28%27splitcopy%27%29/http://publib-b.boulder.ibm.com/Redbooks.nsf/RedbookAbstracts/sg245433.htmlhttp://publib-b.boulder.ibm.com/Redbooks.nsf/RedbookAbstracts/sg245433.htmlhttp://publib-b.boulder.ibm.com/Redbooks.nsf/RedbookAbstracts/sg245433.htmlhttp://publib-b.boulder.ibm.com/Redbooks.nsf/RedbookAbstracts/sg245433.htmlhttp://wu%28%27splitcopy%27%29/http://wu%28%27migratelp%27%29/http://wu%28%27rmlvcopy%27%29/http://wu%28%27mklvcopy%27%29/http://wu%28%27cplv%27%29/http://publib-b.boulder.ibm.com/Redbooks.nsf/RedbookAbstracts/sg245433.htmlhttp://publib-b.boulder.ibm.com/Redbooks.nsf/RedbookAbstracts/sg245433.htmlhttp://wu%28%27extendlv%27%29/http://wu%28%27rmlv%27%29/http://wu%28%27chlv%27%29/
  • 8/2/2019 Admin Quick Command

    15/35

    ttp://www.rootvg.net/adminquickref.htm

    olume Group Management

    ach disk (PV) belongs to a Volume group (VG). A standard VG is a collection of 1 to 32 PVs (1 to 128 for a big VG). A an belong to only one VG. A maximum of 255 VGs can be defined per system.

    When a VG is created, the PVs within the VG are partitioned into contiguous, equal-sized PPs (units of disk space). PPsre the smallest unit of allocatable storage space in a VG. The PP size is determined at VG creation (can't be changedynamically afterwards), and all PVs that are placed in the VG inherit this size. The PP size can range from 1 MB to 102

    B, but must be a power of two. If not specified at creation time, the default PP size for a VG is 4 MB for disks up to 4 Ghe minimum PP size needed is determined by the OS), but it must be larger for PVs greater than 4 GB due to the fact e LVM, by default, will only track up to 1016 PPs/PV. The number of PPs/PV (1016) can be increased with a factor 1-

    or 1-64 for a big VG) at creation time or later (which will reduce the number of PVs in the VG) and/or the number of PVsG can be increased from 32 to 128 at creation time or later (big or gigantic VG).

    mporting a VG involves copying the VGDA data for the imported volume group into the ODM. When a volume group isxported, the data held in the ODM about that volume group is removed from the ODM database.

    svg Displays information about VGs.lsvg : lists all VGs.

    lsvg rootvg : lists the characteristics of VG rootvg.

    lsvg -o : lists only the active VGs (those that are varied on).

    lsvg -p rootvg : lists the PVs in VG rootvg (state, size, distribution).

    lsvg -l rootvg : lists the LVs in VG rootvg (type, size, state).

    lsvg -M rootvg : displays a map of all LVs.

    queryvg! Queries the attributes of a VG using VG id, or PV name of a PV that is part of a VG.lqueryvg -At -p hdisk0 : returns all attributes for the VG (static attributes, LV details and PV

    details).

    mkvg Creates a VG.

    mkvg -y datavg -s 32 hdisk2 hdisk4 : creates the VG datavg that contains PVs hdisk2 ahdisk4, with PP size set to 32 MB.mkvg -B -y uservg : create a big VG uservg (supports 128 PVs and 512 LVs).

    hvg Sets the characteristics of a VG.chvg -a{y|n} datavg : VG datavg is automatically activated (y=varyonvg) or not (n=varyoffv

    during system startup.chvg -u datavg : unlock the VG datavg.

    chvg -B datavg : changes the VG to big VG format (supports 128 PVs and 512 LVs). Mappin

    size is 4*original size.chvg -t 2 datavg : changes the limit of the number of PPs/PV by factor=2 (1016*2=2032 PPs

    PV). Which decreases the number of disks (#PVs/factor=16 PVs/VG).chvg -sy datavg : attempts to automatically synchronize (AUTO SYNC) stale partitions in VG

    datavg (default this not done for a VG).chvg -L256 uservg : changes the LTG size to 256KB of VG uservg for better disk I/O

    performance. LTG size should be less than or equal to the maximum transfer size of all disks in thVG. Check each disk in the VG with:lquerypv -M hdiskx : checks the maximum supported LTG size of hdiskx.

    chvg -b n datavg : turns off the bad block relocation policy of VG datavg (default is yes for a

    chvg -h y -s y uservg : sets policy in VG uservg to automatically (-h y) migrate PPs from o

    ttp://www.rootvg.net/adminquickref.htm(15 of 35)2007-06-19 1:24:32

    http://wu%28%27lsvg%27%29/http://publib-b.boulder.ibm.com/Redbooks.nsf/RedbookAbstracts/sg245433.htmlhttp://wu%28%27mkvg%27%29/http://wu%28%27chvg%27%29/http://wu%28%27chvg%27%29/http://wu%28%27mkvg%27%29/http://publib-b.boulder.ibm.com/Redbooks.nsf/RedbookAbstracts/sg245433.htmlhttp://wu%28%27lsvg%27%29/
  • 8/2/2019 Admin Quick Command

    16/35

    ttp://www.rootvg.net/adminquickref.htm

    failing disk to one spare disk with automatic synchronization of stale PPs (-s y).

    yncvg Synchronizes LV copies that are not current (stale).syncvg -v datavg : synchronizes the copies on VG datavg.

    syncvg -p hdisk3 : synchronizes the copies on physical volumes hdisk3.

    ynclvodm Resynchronize the ODM. The VG must be active.synclvodm rootvg : synchronizes the device configuration database with the LVM informatio

    for rootvg (use when the device configuration database is not consistent with the LVM information

    the LVCBs and the VGDAs).

    vgrecover Repairs the ODM.

    mirrorvg Mirrors all the LVs that exist on a given VG.mirrorvg -S -c 3 rootvg : triply mirrors VG rootvg, returns the mirrorvg command immediate

    and starts a background syncvg (-S).mirrorvg -m datavg hdisk3 : creates an exact mapped mirror of the LVs in VG datavg.

    nmirrorvg Removes the mirrors that exist on VGs or specified disks.unmirrorvg rootvg : default unmirroring of rootvg (rootvg now has only 1 copy).

    mportvg Imports a new VG definition from a set of PVs.It is highly recommended that you run the fsck command before you mount the file systems.importvg -y datavg hdisk9 : imports VG datavg from PV hdisk9.

    importvg -y uservg 0009898xy2727d4f : imports VG uservg from PV with PVID

    0009898xy2727d4f.importvg -L datavg : imports VG datavg and learns about possible changes. Use if the VG w

    not exported and used on another machine.

    xportvg Exports the definition of a VG from a set of PVs.exportvg datavg : removes VG datavg from the system.

    edefinevg Redefines the set of PVs of the given VG in the device configuration database.

    xtendvg Adds PVs to a VG.extendvg datavg hdisk2 : adds PV hdisk2 to VG datavg.

    educevg Removes PVs from a VG. When all PVs are removed from the VG, the VG is deleted.reducevg datavg hdisk3 : removes PV hdisk3 from VG datavg.

    reducevg datavg 000005265ac63976 : removes PV using it's PVID 000005265ac63976

    from VG datavg (use when a disk was removed without first running reducevg).

    eorgvg Reorganizes the PP allocation for a VG. Using the reorgvg command with the VG name and no o

    arguments reorganizes only the first LV in the VG.reorgvg datavg lvdata1 lvdata3 : reorganizes LVs lvdata1 and lvdata3 on VG datavg.

    ttp://www.rootvg.net/adminquickref.htm(16 of 35)2007-06-19 1:24:32

    http://wu%28%27syncvg%27%29/http://wu%28%27synclvodm%27%29/http://wu%28%27mirrorvg%27%29/http://wu%28%27unmirrorvg%27%29/http://wu%28%27importvg%27%29/http://wu%28%27exportvg%27%29/http://wu%28%27redefinevg%27%29/http://wu%28%27extendvg%27%29/http://wu%28%27reducevg%27%29/http://wu%28%27reorgvg%27%29/http://wu%28%27reorgvg%27%29/http://wu%28%27reducevg%27%29/http://wu%28%27extendvg%27%29/http://wu%28%27redefinevg%27%29/http://wu%28%27exportvg%27%29/http://wu%28%27importvg%27%29/http://wu%28%27unmirrorvg%27%29/http://wu%28%27mirrorvg%27%29/http://wu%28%27synclvodm%27%29/http://wu%28%27syncvg%27%29/
  • 8/2/2019 Admin Quick Command

    17/35

    ttp://www.rootvg.net/adminquickref.htm

    ecreatevg Recreates a VG (with unique IDs, names, and mount points) on a set of disks that are mirrored franother set of disks. Imports and varies on the VG. Procedure after the real duplication of the PV(like mirroring):chdev -l hdisk5 -a pv=clear : to avoid potential collisions of LVM component names (PVID

    VGname, ...) of hdisk5.recreatevg -y newvg -L /newfs -Y newlv hdisk5 : newvg is the newly assigned VG

    name, /newfs and newlv are used for prefixes of the newly assigned file systems and LVs, and

    hdisk5 is the duplicated target PV name.plitvg Splits a single mirror copy of a fully mirrored VG.

    splitvg -y snapvg -c 2 datavg : splits second mirror copy of the VG datavg and creates

    snapshot VG snapvg.

    oinvg joinvg datavg : joins the the original VG datavg with the snapshot VG snapvg.

    aryoffvg Deactivates a VG.varyoffvg uservg : deactivates the VG uservg.

    aryonvg Activates a VG.varyonvg -f datavg : used to force a varyon on VG datavg even when inconsistencies are

    detected (between the configuration data for each VG held in the ODM database and VGDA.varyonvg -r uservg : varies on VG uservg in read-only mode.

    ystem Paging Space Management

    sps Lists paging space and attributes. Configuration file: /etc/swapspaces (contains a list of swapdevices).lsps :

    hps Changes attributes of a paging space.

    chps -a {y|n} paging00 : specifies that the paging space paging00 is active (y) or inactive (at subsequent system restarts.chps -s 10 paging02 : adds ten LPs to paging02 without rebooting.

    chps -d 5 paging01 : removes five LPs from paging01 without rebooting.

    chps -d 50 hd6 : removes fifty LPs from hd6 without rebooting.

    mkps Adds an additional paging space to the system.mkps -a -n -s20 datavg : creates a permanent paging space pagingxxin VG datavg of 20

    and activates it immediately.

    mps Removes a paging space from the system (exept hd6).rmps paging00 : removes deactivated paging space paging00.

    wapoff Deactivates one or more paging space.swapoff paging01 : deactivates paging space paging01.

    wapon Activates a paging space.swapon paging01 : activate paging space paging01.

    swapon -a : activates all paging spaces defined in /etc/swapspaces.

    ttp://www.rootvg.net/adminquickref.htm(17 of 35)2007-06-19 1:24:32

    http://wu%28%27recreatevg%27%29/http://wu%28%27splitvg%27%29/http://wu%28%27joinvg%27%29/http://wu%28%27varyoffvg%27%29/http://wu%28%27varyonvg%27%29/http://wu%28%27lsps%27%29/http://wu%28%27chps%27%29/http://wu%28%27mkps%27%29/http://wu%28%27rmps%27%29/http://wu%28%27swapoff%27%29/http://wu%28%27swapon%27%29/http://wu%28%27swapon%27%29/http://wu%28%27swapoff%27%29/http://wu%28%27rmps%27%29/http://wu%28%27mkps%27%29/http://wu%28%27chps%27%29/http://wu%28%27lsps%27%29/http://wu%28%27varyonvg%27%29/http://wu%28%27varyoffvg%27%29/http://wu%28%27joinvg%27%29/http://wu%28%27splitvg%27%29/http://wu%28%27recreatevg%27%29/
  • 8/2/2019 Admin Quick Command

    18/35

    ttp://www.rootvg.net/adminquickref.htm

    wap Displays paging characteristics and enables the allocation and deallocation of paging devices.swap -l : displays device, major and minor numbers, and total and free space.

    swap -a /dev/paging01 : activates paging space paging01 (like swapon).

    swap -d /dev/paging01 : deactivates paging space paging01 (like swapoff).

    migratepv migratepv -l hd6 hdisk0 hdisk2 : moves hd6 from hdisk0 to PV hdisk2 within the same V

    (always use VG rootvg for hd6 performance).

    Communications Management

    c.tcpip Script that initializes selected TCP/IP daemons using SRC at each system restart: inetd, lpd,

    portmap, sendmail, syslogd (started by default) and gated orrouted, named, time

    xntpd, rwhod, snmpd, dhcpcd, mrouted, autoconf6 (not started by default unless th

    are uncommented).stopsrc -g tcpip : stops all running TCP/IP daemons.

    stopsrc -s named : stops the named daemon.

    /etc/rc.tcpip : starts all selected TCP/IP daemons. Don't use startsrc -g tcpip (would start all

    subsystems in the tcpip group).startsrc -s named : starts the named daemon.

    refresh -s inetd : refresh the inetd subsystem (re-reads /etc/inetd.conf).

    etc/tcp.clean sh /etc/tcp.clean : stops all running TCP/IP daemons (not portmap and nfsd) and removes a

    etc/locks/lpd TCP/IP lock files.

    netd daemon Provides Internet service management for a network. Starts by default using the /etc/inetd.co

    configuration file. Daemons controlled by the inetd daemon: ftpd, rlogind, rexecd, rshd,

    talkd, telnetd, and uucpd (started by default) and tftpd, fingerd, and comsat (not start

    by default unless they are uncommented).resfresh -s inetd : informs the inetd daemon of the changes to its configuration file. The ports

    inetd listens on are in /etc/services (unless they are commented).

    sdev Displays devices in the system and their characteristics.lsdev -Cc if : lists IP interfaces.

    scfg Displays configuration, diagnostic, and VPD.lscfg -l ent0 -v : displays the VPD for ent0.

    sattr Displays attribute characteristics and possible attribute values for devices.lsattr -HEl en0 : displays effective values for interface en0.

    etstat Shows network status.netstat -in : shows status of IP interfaces with numeric addresses.

    netstat -rn : shows status of TCP/IP routes with numeric addresses.

    netstat -C : shows routing table, user-configured and current costs of each route.

    netstat -v : shows device driver statistics.

    rp Displays and modifies address resolution.arp -a : displays local ARP cache (ip to mac address table).

    ttp://www.rootvg.net/adminquickref.htm(18 of 35)2007-06-19 1:24:32

    http://wu%28%27swap%27%29/http://wu%28%27migratepv%27%29/http://sysfile%28%27rc.tcpip%27%29/http://wu%28%27inetd%27%29/http://wu%28%27lpd%27%29/http://wu%28%27portmap%27%29/http://wu%28%27sendmail%27%29/http://wu%28%27syslogd%27%29/http://wu%28%27gated%27%29/http://wu%28%27routed%27%29/http://wu%28%27named%27%29/http://wu%28%27timed%27%29/http://wu%28%27xntpd%27%29/http://wu%28%27rwhod%27%29/http://wu%28%27snmpd%27%29/http://wu%28%27dhcpcd%27%29/http://wu%28%27mrouted%27%29/http://wu%28%27autoconf6%27%29/http://wu%28%27inetd%27%29/http://sysfile%28%27inetd.conf%27%29/http://wu%28%27ftpd%27%29/http://wu%28%27rlogind%27%29/http://wu%28%27rexecd%27%29/http://wu%28%27rshd%27%29/http://wu%28%27talkd%27/http://wu%28%27telnetd%27%29/http://wu%28%27uucpd%27%29/http://wu%28%27tftpd%27%29/http://wu%28%27fingerd%27%29/http://wu%28%27comsat%27%29/http://sysfile%28%27services%27%29/http://wu%28%27lsdev%27%29/http://wu%28%27lscfg%27%29/http://wu%28%27lsattr%27%29/http://wu%28%27netstat%27%29/http://wu%28%27arp%27%29/http://wu%28%27arp%27%29/http://wu%28%27netstat%27%29/http://wu%28%27lsattr%27%29/http://wu%28%27lscfg%27%29/http://wu%28%27lsdev%27%29/http://sysfile%28%27services%27%29/http://wu%28%27comsat%27%29/http://wu%28%27fingerd%27%29/http://wu%28%27tftpd%27%29/http://wu%28%27uucpd%27%29/http://wu%28%27telnetd%27%29/http://wu%28%27talkd%27/http://wu%28%27rshd%27%29/http://wu%28%27rexecd%27%29/http://wu%28%27rlogind%27%29/http://wu%28%27ftpd%27%29/http://sysfile%28%27inetd.conf%27%29/http://wu%28%27inetd%27%29/http://wu%28%27autoconf6%27%29/http://wu%28%27mrouted%27%29/http://wu%28%27dhcpcd%27%29/http://wu%28%27snmpd%27%29/http://wu%28%27rwhod%27%29/http://wu%28%27xntpd%27%29/http://wu%28%27timed%27%29/http://wu%28%27named%27%29/http://wu%28%27routed%27%29/http://wu%28%27gated%27%29/http://wu%28%27syslogd%27%29/http://wu%28%27sendmail%27%29/http://wu%28%27portmap%27%29/http://wu%28%27lpd%27%29/http://wu%28%27inetd%27%29/http://sysfile%28%27rc.tcpip%27%29/http://wu%28%27migratepv%27%29/http://wu%28%27swap%27%29/
  • 8/2/2019 Admin Quick Command

    19/35

    ttp://www.rootvg.net/adminquickref.htm

    o Manages network tuning parameters. Changes are valid until the next reboot.no -a : displays kernel variable values.

    no -o ipforwarding : displays if ipforwarding is on (=1) or off (=0).

    no -o ipforwarding=1 : specifies the kernel should forward packets (acting as an IP router).

    config Configures or displays network interface parameters for TCP/IP.ifconfig -a : displays information about all interfaces in the system.

    ifconfig en0 : displays network interface parameters for en0.

    ifconfig en0 inet 194.186.152.2 netmask 255.255.255.0 up : assigns IP-address194.186.152.2 with network mask 255.255.255.0 to interface en0 of address family inet and turnsthe network card.ifconfig en0 down : turns off network card en0.

    oute Makes manual entries into the network routing tables until next reboot.route -rn : displays route table.

    route add -inet -net 9.19.98.1 9.19.99.10 : adds a network route to the routing table for

    destination host 9.19.98.1 through gateway 9.19.99.10.

    sattr Displays attribute characteristics and possible values of attributes for devices.

    lsattr -El en0 : lists the current attribute values for en0.

    slookup Queries Internet domain name servers.nslookup : enters interactive mode.

    nslookup nserver1 : returns the domain name and Internet address of nserver1.

    aceroute Displays the route that IP packets take to a network host.traceroute server2 : displays all the hops from local host to server2.

    ptrace daemon Provides interface-level packet tracing for Internet protocols.

    preport Generates a trace report from the specified trace file created by the iptrace command.

    ing Sends an echo request to a network host.ping -c 6 server1 : checks the network connection to host server1 by sending 6 echo reques

    ping -f server2 : invokes the flood-ping option to host server2.

    ping -R : displays the full round trip route of a packet.

    pray Sends a one-way stream of packets to a host and reports performance statistics using the RPC(default) or ICMP protocol (two-way stream).spray server1 -c 1000 -d 4 : sends 1000 packets at intervals of 4 microseconds to server1

    ost Resolves a host name into an Internet address or an Internet address into a host name. System

    files: /etc/hosts (local hosts table).host server1 : displays the Internet address and name aliases of host server1.

    host 192.186.154.3 : displays the host whose address is 192.186.154.3.

    ostid Sets or displays the identifier of the current local host.

    ostname Sets or displays the name of the current host system.hostname tulip : changes the hostname to tulip until the next reboot.

    chdev -l inet0 -a hostname=server1 : changes the hostname permanently to server1.

    mktcpip Sets the required values for starting TCP/IP on a host.

    ttp://www.rootvg.net/adminquickref.htm(19 of 35)2007-06-19 1:24:32

    http://wu%28%27no%27%29/http://wu%28%27ifconfig%27%29/http://wu%28%27route%27%29/http://wu%28%27lsattr%27%29/http://wu%28%27nslookup%27%29/http://wu%28%27traceroute%27%29/http://wu%28%27iptrace%27%29/http://wu%28%27ipreport%27%29/http://wu%28%27ping%27%29/http://wu%28%27spray%27%29/http://wu%28%27host%27%29/http://sysfile%28%27hosts%27%29/http://wu%28%27hostid%27%29/http://wu%28%27hostname%27%29/http://wu%28%27mktcpip%27%29/http://wu%28%27mktcpip%27%29/http://wu%28%27hostname%27%29/http://wu%28%27hostid%27%29/http://sysfile%28%27hosts%27%29/http://wu%28%27host%27%29/http://wu%28%27spray%27%29/http://wu%28%27ping%27%29/http://wu%28%27ipreport%27%29/http://wu%28%27iptrace%27%29/http://wu%28%27traceroute%27%29/http://wu%28%27nslookup%27%29/http://wu%28%27lsattr%27%29/http://wu%28%27route%27%29/http://wu%28%27ifconfig%27%29/http://wu%28%27no%27%29/
  • 8/2/2019 Admin Quick Command

    20/35

    ttp://www.rootvg.net/adminquickref.htm

    who Displays which users are logged in to hosts (that run rwhod) on the local network.rwho -a : lists all users currently logged in to hosts on the local network.

    uptime Displays the status of each host (that runs rwhod) that is on the local network.ruptime -al : lists a status report of each host on the local network sorted by load average.

    snamsv Shows name service information stored in the database /etc/resolv.conf (name resolver).

    hnamsv Changes TCP/IP-based name service configuration on a host.

    mknamsv Configures TCP/IP-based name service on a host for a client.

    mnamsv Unconfigures TCP/IP-based name service on a host.

    ser/Group Management

    ispuid Displays all valid user IDs on the system.

    ogins Displays user and system login information.logins -p : lists all the logins with no passwords.

    suser Displays attributes of user accounts.lsuser ALL : displays all the attributes of all the users.

    mkuser Creates a new user account. System files: /etc/passwd (contains basic user attributes) and /e

    group (contains basic group attributes). The default attributes are in the /usr/lib/security/

    mkuser.default file.

    mkuser erik : creates the erik user account.

    asswd Changes a user's password. System files: /etc/security/passwd (contains password

    information).

    passwd hans : changes the password of user hans.wdadm Administers users' passwords (by root or a member of the security group).

    hsec Changes the attributes in the security stanza files.chsec -f /etc/security/login.cfg -s default -a pwdprompt="Password:" : chang

    the system-wide password (echo's user name) prompt to Password (doesn't echo user name.chsec -f /etc/security/login.cfg -s default -a usernameecho=false : hides the u

    name from login and system messages.

    mkuser.sys Customizes a new user account.

    huser Changes attributes for the specified user.

    muser Removes a user account.rmuser -p erik : removes user erik.

    rm -r /home/erik : removes erik's home directory.

    ispgid Displays all valid groups on the system.

    sgroup Displays the attributes of groups.lsgroup ALL : lists all groups.

    ttp://www.rootvg.net/adminquickref.htm(20 of 35)2007-06-19 1:24:32

    http://wu%28%27rwho%27%29/http://wu%28%27ruptime%27%29/http://wu%28%27lsnamsv%27%29/http://sysfile%28%27resolv.conf%27%29/http://wu%28%27chnamsv%27%29/http://wu%28%27mknamsv%27%29/http://wu%28%27rmnamsv%27%29/http://wu%28%27dispuid%27%29/http://wu%28%27logins%27%29/http://wu%28%27lsuser%27%29/http://wu%28%27mkuser%27%29/http://sysfile%28%27passwd%27%29/http://sysfile%28%27group_security%27%29/http://sysfile%28%27group_security%27%29/http://sysfile%28%27mkuser.default%27%29/http://sysfile%28%27mkuser.default%27%29/http://wu%28%27passwd%27%29/http://sysfile%28%27passwd_security%27%29/http://wu%28%27pwdadm%27%29/http://wu%28%27chsec%27%29/http://wu%28%27mkuser.sys%27%29/http://wu%28%27chuser%27%29/http://wu%28%27rmuser%27%29/http://wu%28%27dispgid%27%29/http://wu%28%27lsgroup%27%29/http://wu%28%27lsgroup%27%29/http://wu%28%27dispgid%27%29/http://wu%28%27rmuser%27%29/http://wu%28%27chuser%27%29/http://wu%28%27mkuser.sys%27%29/http://wu%28%27chsec%27%29/http://wu%28%27pwdadm%27%29/http://sysfile%28%27passwd_security%27%29/http://wu%28%27passwd%27%29/http://sysfile%28%27mkuser.default%27%29/http://sysfile%28%27mkuser.default%27%29/http://sysfile%28%27group_security%27%29/http://sysfile%28%27group_security%27%29/http://sysfile%28%27passwd%27%29/http://wu%28%27mkuser%27%29/http://wu%28%27lsuser%27%29/http://wu%28%27logins%27%29/http://wu%28%27dispuid%27%29/http://wu%28%27rmnamsv%27%29/http://wu%28%27mknamsv%27%29/http://wu%28%27chnamsv%27%29/http://sysfile%28%27resolv.conf%27%29/http://wu%28%27lsnamsv%27%29/http://wu%28%27ruptime%27%29/http://wu%28%27rwho%27%29/
  • 8/2/2019 Admin Quick Command

    21/35

    ttp://www.rootvg.net/adminquickref.htm

    hgroup Changes attributes for groups (don't use in combination with NIS).

    hgrpmem Changes the administrators or members of a group.

    mkgroup Creates a new group.

    mgroup Removes a group.

    srck Verifies the correctness of a user definition.

    rpck Verifies the correctness of a group definition.

    wdck Verifies the correctness of local authentication information.

    ast Displays information about previous logins using the /var/adm/wtmp file.last root : display all logins and logoffs by user root.

    last -t 31081125 : displays all users still logged in at 11.25 am on August 31th.

    who Identifies the users currently logged in.who /var/adm/wtmp : displays a history of logins and logouts, system startups and shutdow

    wall Writes a message to all users or users of a specific group that are logged in.

    wall -g staff : broadcasts to group staff.

    epquota Summarizes quotas for a file system.repquota -u /home : prints a summary of user quotas in the /home file system.

    repquota -a : prints quotas for all file systems enabled with quotas in the /etc/filesystems

    dquota Edits user and group quotas.

    uota Displays disk usage and quotas.quota : displays the quotas of the current user.

    quota -u erik : displays quotas as the root user for user erik.

    uotacheck Checks file system quota consistency.quotacheck /home : checks the user and group quotas in the /home file system.

    uotaonor

    uotaoff

    Turns on and off file system quotas.quotaon -u /home : turns on user quotas for the /home file system.

    quotaoff -v -a : turns off user and group quotas for all file systems (-a) in the /etc/filesystems

    rint Management

    he AIX print subsystem (default), a combination of the System V and Berkeley Software Distribution (BSD) printing

    andard, and the System V R4 print subsystem are available. Both print subsystems cannot be set to the active state ae same time using the normal procedures.ystem file /etc/qconfig (stanzas that describe the printqueues and devices). Spooling uses the /var/spool/qdaemon

    rectory. Daemon: qdaemon.

    witch.prt Displays the current active print subsystem, or switch between the active and inactive printsubsystem. Read also AIX System V Printing.

    switch.prt -d : displays the current print subsystem that is active.

    IX print subsystem

    ttp://www.rootvg.net/adminquickref.htm(21 of 35)2007-06-19 1:24:32

    http://wu%28%27chgroup%27%29/http://wu%28%27chgrpmem%27%29/http://wu%28%27mkgroup%27%29/http://wu%28%27rmgroup%27%29/http://wu%28%27usrck%27%29/http://wu%28%27grpck%27%29/http://wu%28%27pwdck%27%29/http://wu%28%27last%27%29/http://wu%28%27who%27%29/http://wu%28%27wall%27%29/http://wu%28%27repquota%27%29/http://sysfile%28%27filesystems%27%29/http://wu%28%27edquota%27%29/http://wu%28%27quota%27%29/http://wu%28%27quotacheck%27%29/http://wu%28%27quotaon%27%29/http://wu%28%27quotaoff%27%29/http://sysfile%28%27qconfig%27%29/http://wu%28%27qdaemon%27%29/http://www-1.ibm.com/support/search.wss?rs=111&lang=en&loc=en_US&r=10&cs=utf-8&rankfile=0&cc=&spc=&stc=&apar=include&q1=system+V+printing&q2=lab&dc=&sort=rk&tc=SWG10&Go.x=12&Go.y=13http://www-1.ibm.com/support/search.wss?rs=111&lang=en&loc=en_US&r=10&cs=utf-8&rankfile=0&cc=&spc=&stc=&apar=include&q1=system+V+printing&q2=lab&dc=&sort=rk&tc=SWG10&Go.x=12&Go.y=13http://wu%28%27qdaemon%27%29/http://sysfile%28%27qconfig%27%29/http://wu%28%27quotaoff%27%29/http://wu%28%27quotaon%27%29/http://wu%28%27quotacheck%27%29/http://wu%28%27quota%27%29/http://wu%28%27edquota%27%29/http://sysfile%28%27filesystems%27%29/http://wu%28%27repquota%27%29/http://wu%28%27wall%27%29/http://wu%28%27who%27%29/http://wu%28%27last%27%29/http://wu%28%27pwdck%27%29/http://wu%28%27grpck%27%29/http://wu%28%27usrck%27%29/http://wu%28%27rmgroup%27%29/http://wu%28%27mkgroup%27%29/http://wu%28%27chgrpmem%27%29/http://wu%28%27chgroup%27%29/
  • 8/2/2019 Admin Quick Command

    22/35

    ttp://www.rootvg.net/adminquickref.htm

    prt Starts a print job.

    pr Enqueues print jobs.

    p Sends requests to a line printer.

    nq Enqueues a file.

    hprtsv Changes a print service configuration on a client or server machine.

    sque Displays the queue stanza name.lsque -q ps : displays the name of queue stanza ps.

    mkque Adds a printer queue to the system.

    mkquedev Adds a printer queue device to the system.

    mque Removes a printer queue from the system.

    mquedev Removes a printer or plotter queue device from the system.

    hque Changes the queue name.

    hvirprt Changes the attribute values of a virtual printer.

    sallq Lists the names of all configured queues.

    sallqdev Lists all configured printer and plotter queue device names within a specified queue.

    sprtsv Shows print service information stored in the database.

    squedev Displays the device stanza name.

    hquedev Changes the printer or plotter queue device names.

    mkvirprt Makes a virtual printer.

    mvirprt Removes a virtual printer.

    mkprtsv Configures TCP/IP-based print service on a host.

    mprtsv Unconfigures a print service on a client or server machine.

    ystem V R4 print subsystem

    p Sends print requests.

    ancel Cancels print requests previously sent with the lp command.

    pstat Displays the status of all print requests made by the user.

    ccept Allows the queuing of print requests.

    eject Prevents queuing of print requests.

    nable Activates the named printers, enabling them to print requests.

    isable Deactivates the named printers, disabling them to print requests.

    padmin Configures the lp print service by defining printers and devices.

    ttp://www.rootvg.net/adminquickref.htm(22 of 35)2007-06-19 1:24:32

    http://wu%28%27qprt%27%29/http://wu%28%27lpr%27%29/http://wu%28%27lp%27%29/http://wu%28%27enq%27%29/http://wu%28%27chprtsv%27%29/http://wu%28%27lsque%27%29/http://wu%28%27mkque%27%29/http://wu%28%27mkquedev%27%29/http://wu%28%27rmque%27%29/http://wu%28%27rmquedev%27%29/http://wu%28%27chque%27%29/http://wu%28%27chvirprt%27%29/http://wu%28%27lsallq%27%29/http://wu%28%27lsallqdev%27%29/http://wu%28%27lsprtsv%27%29/http://wu%28%27lsquedev%27%29/http://wu%28%27chquedev%27%29/http://wu%28%27mkvirprt%27%29/http://wu%28%27rmvirprt%27%29/http://wu%28%27mkprtsv%27%29/http://wu%28%27rmprtsv%27%29/http://wu%28%27lp%27%29/http://wu%28%27cancel%27%29/http://wu%28%27lpstat%27%29/http://wu%28%27accept%27%29/http://wu%28%27reject%27%29/http://wu%28%27enable%27%29/http://wu%28%27disable%27%29/http://wu%28%27lpadmin%27%29/http://wu%28%27lpadmin%27%29/http://wu%28%27disable%27%29/http://wu%28%27enable%27%29/http://wu%28%27reject%27%29/http://wu%28%27accept%27%29/http://wu%28%27lpstat%27%29/http://wu%28%27cancel%27%29/http://wu%28%27lp%27%29/http://wu%28%27rmprtsv%27%29/http://wu%28%27mkprtsv%27%29/http://wu%28%27rmvirprt%27%29/http://wu%28%27mkvirprt%27%29/http://wu%28%27chquedev%27%29/http://wu%28%27lsquedev%27%29/http://wu%28%27lsprtsv%27%29/http://wu%28%27lsallqdev%27%29/http://wu%28%27lsallq%27%29/http://wu%28%27chvirprt%27%29/http://wu%28%27chque%27%29/http://wu%28%27rmquedev%27%29/http://wu%28%27rmque%27%29/http://wu%28%27mkquedev%27%29/http://wu%28%27mkque%27%29/http://wu%28%27lsque%27%29/http://wu%28%27chprtsv%27%29/http://wu%28%27enq%27%29/http://wu%28%27lp%27%29/http://wu%28%27lpr%27%29/http://wu%28%27qprt%27%29/
  • 8/2/2019 Admin Quick Command

    23/35

    ttp://www.rootvg.net/adminquickref.htm

    pfilter Administers filters used.

    pforms Administers the use of preprinted forms.

    pmove Moves print requests between destinations.

    psched Starts the print service.

    pshut Stuts down the print service.

    psystem Registers remote systems with the print service.

    pusers Set printing queue priorities.

    oftwareManagement

    fileset is themalleststallable base

    nit for the AIXperating systemxample: bos.

    erf.pefstat). Aackage is aroup ofeparatelystallableesets thatrovide a set of

    lated functionsxample: bos.erf). A Licensedrogram ProductPP) is a

    ompleteoftware productcluding allackagesssociated with

    at licensedrogramxample: bos).bundle is a list

    f software thatan containesets,ackages, andPPs that areuited for a

    ttp://www.rootvg.net/adminquickref.htm(23 of 35)2007-06-19 1:24:32

    http://wu%28%27lpfilter%27%29/http://wu%28%27lpforms%27%29/http://wu%28%27lpmove%27%29/http://wu%28%27lpsched%27%29/http://wu%28%27lpshut%27%29/http://wu%28%27lpsystem%27%29/http://wu%28%27lpusers%27%29/http://wu%28%27lpusers%27%29/http://wu%28%27lpsystem%27%29/http://wu%28%27lpshut%27%29/http://wu%28%27lpsched%27%29/http://wu%28%27lpmove%27%29/http://wu%28%27lpforms%27%29/http://wu%28%27lpfilter%27%29/
  • 8/2/2019 Admin Quick Command

    24/35

    ttp://www.rootvg.net/adminquickref.htm

    articular usexamples: CDE,DE, GNOME).ach fileset in aroduct can bevided into threearts: usr, root,nd share.arceling of aoftware productused forskless andataless clients.hus it can bestalled on oneachine (the

    erver) and thene used remotelyy otherachines on aetwork (theents).

    he usr part of aoftware productan be shared byachines withe same

    ardwarerchitecturetored in /usr).he root partptional) of a

    oftware productannot be sharedy machines. Inclient/servernvironment,

    ese are thees for whichere must be a

    nique copy forach client of aerver. Most ofe root softwareassociatedith theonfiguration of

    ttp://www.rootvg.net/adminquickref.htm(24 of 35)2007-06-19 1:24:32

  • 8/2/2019 Admin Quick Command

    25/35

    ttp://www.rootvg.net/adminquickref.htm

    e machine orroduct (stored ine root (/) fileee. The /etc/bjreposrectory

    ontains the rootart of an

    stallableoftwareroduct's VPD).he share partptional) can be

    hared amongachines, even ifey havefferentardwarerchitectures.Thehare part of aroduct is alwaysackaged in aeparatelystallableackage (stored/usr/share).

    he format for a

    oftware productvel in AIX 5.2 is

    s follows:

    ersionnumber.leasenumber.odificationlevel.

    xlevel

    onfigassist Displays the Configuration Assistant wizard (graphics display).

    nstall_assist Starts the Installation Assistant application (ASCII display).

    eninstall A generic software product installer for installp, InstallShield Multi-Platform (ISMP), the Red HatPackage Manager (RPM) installer and Uniform Device Interface (UDI).geninstall Ld /dev/cd0 : lists the contents of the CD media.

    geninstall -d /tmp/RPM * : installs all RPM packages in the /tmp/RPM directory.

    geninstall -d /dev/cd0 R:cdrecord : installs the cdrecord RPM package.

    nstall_wizard Invokes the Web-based System Manager Install Wizard or the SMIT install menu.install_wizard -d /dev/cd0 : invokes the Web-based System Manager Install Wizard using

    install CD in /dev/cd0.

    ttp://www.rootvg.net/adminquickref.htm(25 of 35)2007-06-19 1:24:33

    http://wu%28%27configassist%27%29/http://wu%28%27install_assist%27%29/http://wu%28%27geninstall%27%29/http://wu%28%27install_wizard%27%29/http://wu%28%27install_wizard%27%29/http://wu%28%27geninstall%27%29/http://wu%28%27install_assist%27%29/http://wu%28%27configassist%27%29/
  • 8/2/2019 Admin Quick Command

    26/35

    ttp://www.rootvg.net/adminquickref.htm

    encopy Allows software products of various packaging formats (installp, RPM, ISMP, UDI) to be copied.Wraps to the bffcreate command.gencopy Ld /dev/cd0 : lists the contents of the CD media.

    gencopy d /dev/cd0 I:bos.perf R:cdrecord : copies bos.perf and cdrecord images fr

    CD media to the default directory (/usr/sys/inst.images).

    nstallp Install, update, and perform maintenance tasks on software.installp -aXYd /dev/cd0 bos.perf : installs (automatically committed) all filesets within bo

    perf from /dev/cd0, expands file systems if necessary (-X), and accepts software licenses (-Y).installp -pad /dev/cd0 X11.Dt : previews installation of X11.Dt from /dev/cd0.

    installp -u -V2 X11.Dt : removes fileset X11.Dt with a verbose display of successes, warning

    and failures.installp -ld /dev/cd0 : lists all software products and their separately installable options on /d

    cd0.installp -cgX all : commits all applied updates and removes the filesets for the previous versi

    installp -C : cleans up after a failed installation.

    mkinstallp Creates software packages in installp format.

    pm Installs, upgrades, queries, and deletes Linux RPM packages and maintains the RPM packagedatabase (located in /var/opt/freeware/lib/rpm).rpm -qa: queries installed RPM packages.

    rpm -Uvh * : installs the RPM packages in the current directory.

    slpp Displays information about installed filesets/fileset updates.lslpp -l bos.net.nfs.client : displays the maintenance level and state.

    lslpp -L all : lists all installed software.

    lslpp -L bos.dosutils : check if software installed.

    lslpp -f bos.perf : displays the names of all the files of fileset bos.perf.

    lslpp -ha : lists installation history of filesets.lslpp -w /usr/sbin/nfsd : lists the fileset that the file belongs to.

    lslpp -E bos.rte : displays the license agreements of the installed filesets.

    lslpp -v :shows only the filesets that do not have the required prerequisites or are not complete

    installed.

    nulag Manages license agreements (front end).inulag -l : lists all available software license agreements.

    pkg Creates emergency fix (efix) packages that can be installed by the efix manager, emgr.epkg perf : runs the epkg command in interactive mode and creates efix package perf.

    mgr Starts the emergency fix (efix) manager, which installs, removes, lists, and checks system efixes.The efix manager installs packages created with the epkg command and maintains a databasecontaining efix information. Databases are in the /usr/emgrdata/DBS directory.emgr -l : lists all efixes on the system.

    emgr -X -e perf.040503.epkg.Z : installs efix package perf.040603.epkg.Z and automatica

    expand file systems if needed.

    ttp://www.rootvg.net/adminquickref.htm(26 of 35)2007-06-19 1:24:33

    http://wu%28%27gencopy%27%29/http://wu%28%27installp%27%29/http://wu%28%27mkinstallp%27%29/http://gosearch%28%27rpm%27%29/http://wu%28%27lslpp%27%29/http://wu%28%27inulag%27%29/http://wu%28%27epkg%27%29/http://wu%28%27emgr%27%29/http://wu%28%27emgr%27%29/http://wu%28%27epkg%27%29/http://wu%28%27inulag%27%29/http://wu%28%27lslpp%27%29/http://gosearch%28%27rpm%27%29/http://wu%28%27mkinstallp%27%29/http://wu%28%27installp%27%29/http://wu%28%27gencopy%27%29/
  • 8/2/2019 Admin Quick Command

    27/35

    ttp://www.rootvg.net/adminquickref.htm

    ppmgr Manages an existing installp image source.lppmgr -d /images -u : lists all duplicate and conflicting updates in image source directory /

    images.lppmgr -d /images -u -r : removes all duplicate and conflicting updates in image source

    directory /images.

    ppchk Verifies that files of an installable software product (fileset) match the SWVPD database informatfor file sizes, checksum values, or symbolic links.

    lppchk -v : verifies that all filesets have all required requisites and are completely installed.lppchk -c X11.Dt : checks that file checksums and sizes of X11.Dt are consistent with SWVP

    lppchk -l 'bos*' : verifies the symbolic links of all 'bos*' software products.

    ompare_report Compares fileset levels to those available and generates a report of filesets needed.compare_report -s -r /tmp/LatestFixData52 -l : compares the software installed on a

    system (-s) to the report of available updates (-r) LatestFixData52, available from the suppor

    Web site at IBM.

    slevel Reports the latest installed maintenance level of the system.oslevel -r: determines the highest recommended maintenance level reached for the current

    version of AIX.oslevel -lr 5100-04: lists which fileset updates are missing if after installing ML 04 on 5100-0

    the command oslevel -r still shows 5100-03 (so, preferrably no output!).

    nstfix Installs filesets associated with keywords or fixes.instfix -i | grep ML : displays all ML's installed.

    instfix -ik "IY39231 IY38794" : checks if fixes IY39231 and IY38794 are installed.

    instfix -k IY42424 -d /dev/fd0 : installs fix IY42424 from diskette.

    nstall_all_

    updates

    Updates installed system software to the latest level that is on the media and verifies the current

    recommended maintenance level.install_all_updates -d /dev/cd0 : installs all installp updates on /dev/cd0 and verifies the

    current recommended maintenance level.install_all_updates -d /images -rc : commit installs all installp updates and installs any

    installable rpm updates in directory /images.

    whence Displays the absolute path name.whence nfsd : displays the full path of the nfsd program.

    what Displays identifying information in files.

    which_fileset Displays which fileset owns a command.

    The bos.content_listfileset must be installed.which_fileset topas : displays which fileset owns the topas command.

    nutoc Creates a .toc file.inutoc : creates the .toc file for the /usr/sys/inst.images directory.

    Backup and Restore Management

    ttp://www.rootvg.net/adminquickref.htm(27 of 35)2007-06-19 1:24:33

    http://wu%28%27lppmgr%27%29/http://wu%28%27lppchk%27%29/http://wu%28%27compare_report%27%29/https://techsupport.services.ibm.com/server/aix.fdc?toggle=FIXDATAhttps://techsupport.services.ibm.com/server/aix.fdc?toggle=FIXDATAhttp://wu%28%27oslevel%27%29/http://wu%28%27instfix%27%29/http://wu%28%27install_all_updates%27%29/http://wu%28%27install_all_updates%27%29/http://wu%28%27whence%27%29/http://wu%28%27what%27%29/http://wu%28%27which_fileset%27%29/http://wu%28%27inutoc%27%29/http://wu%28%27inutoc%27%29/http://wu%28%27which_fileset%27%29/http://wu%28%27what%27%29/http://wu%28%27whence%27%29/http://wu%28%27install_all_updates%27%29/http://wu%28%27install_all_updates%27%29/http://wu%28%27instfix%27%29/http://wu%28%27