AIX Useseful Commands

xiaoxiao2021-03-06  72

compress -c file.txt> file.Z Create a compressed file. uuencode (infile) (extract-file-name)> (output file) Converts a binary file to an ASCII file for transfer by modem or email uudecode (encoded file) Extracts a binary file from encoded file and calls it the extract-file-name examples: - uuencode maymap maymap>

maymap.enc uudecode maymap.enc od -c / tmp Displays contents of the / tmp directory file ls -i Lists files with their inode numbers echo * Lists files, can be used if ls is corrupt / missing chtz (timezone eg GMT0BST) Changes the timezone in / etc / environment file chlang (language eg en_GB) Changes the language in / etc / environment file ar -v -t (archive file) List contents of an archive ar -v -x (archive file) Extracts the archive ar -v -t / usr / lib / libc_r.a library find / source -print | cpio -pdm / target copying directories Using CPIO, CREATES / TARGET / SOURCE DIRECTORY. DUMP-NTV (Binary Executable) Displays the contents of an executable file dump -c Displays string information dump -o Displays object file headers dump -l Displays line numbers dump -s Displays the text section snap -ao / dev / rmt0 Create a snapshot onto tape snap -ad (directo RY) CREATE A Snapshot INTO A Named Directory Other Than THE DEFAULT (/ TMP / IBMSUPT) / USR / DT / BIN / DTCONFIG -D DISABLES Desktop logins / USR / DT / BIN / DTCONFIG-E Enables Desktop logins / var / dt / XPID PID of the dtlogin process -------------------------------------------- ------------------------------------ Licensees / Software Installation ---------- -------------------------------------------------- -------------------- LSLICENSE Displays Number of current User licenses chlicense -u (number) Changes the number of user licensees (FTP,

REXEC AND RSH (WITHOUT -I FLAG) Do Not NEED An Aix User License To Be Aable To Access The System. Oslevel Returns Operating System Level 4. 3. 3. 0 <--------- Preventive Maintenance Level | | | | | ---------------- MODIFICATION | ------------------ Release ---- ------------------- Version Oslevel -L 4.3.3.0 Displays All FileSets That Are "Downlevel" WHENCE (Program) Returns Full Path of Program Whereis (Program) Returms Full Path of Program What (Program) Displays Identifying Info from The Executable Like Version Number,

when compiled. lslpp -L all list all installed software lslpp -L (program set name) Check if software installed lslpp -f Lists filesets vs packages lslpp -ha Lists installation history of filesets lslpp -w / usr / bin / swapon Lists the fileset that the file belongs to lppchk -c Checks file checksums against SWVPD lppchk -l Checks symbolic links against SWVPD instfix -ik (fix number eg IX66617) Checks id fix is ​​installed instfix -ik 4330-02_AIX_ML instfix -i | grep ML Displays all ML's installed instfix -k IX38794 -d / dev / cd0 Installs a fix from cdrom / usr / sbin / install_assist Smitty Installation Assistant /usr/sys/inst.images/sys.bundles Software bundle files alt_disk_install -c hdisk1 Clones a running rootvg onto hdisk1 Alt_disk_install -w wakes up alt vg alt_disk_install -s sends alt vg to sleep! all _disk_install -x Removes alt vg from disk / usr / lpp / bosinst / blvset -d / dev / hdisk0 -p 4.2 Resets the pad string in the BLV to the correct AIX version Needed if the migration option is missing when installing installp.. - ad (device) (fileset) (level) Install apply and commit fileset installp -pad (device) (fileset) (level) Preview install installp -u (fileset) Remove fileset installp -ld (device) List all software on device example: - Installp -Pad / DEV / RMT0 X11.BASE 4.3.3.0 Installp -c Cleans Up After a Premature Cancel or Interrupted Installation. ----------------------- -------------------------------------------------- ------- Terminals / DISP

Lays ------------------------------------- ----------------------------- / usr / share / lib / terminfo directory with all support terminal info files. Tty displays what the tty / pty number of the terminal is. termdef reports the termtype setup in smit for the tty port that termdef is run on. chdev -l (device eg tty1) -a term = vt100 Sets tty to a vt100 terminal type penable tty0 adds getty line into / etc / inittab for tty0 and starts getty pdisable tty0 disables the getty line and disables getty penable / pdisable -a option is for all stty erase ^? Set backspace key for vt100 terminals stty erase ^ H Set backspace key for wyse50 terminals lscons Displays the console device chcons -a login = enable (device eg / dev / tty1) Changes the console device lsdisp Display adapter device information chdisp Change default display used by LFT subsystem Create ttys on ports 0 TO 7 on adapter sa2: - for i in 0 1 2 3 4 5 6 7 do mkdev -c TTY1 -T TTY -S RS232 -P SA2 -W $ I -A login = enable -a term = VT100 DONE Portmir - T / DEV / TTY0 MIRROR CURRENT TERMINAL ONTO / DEV / TTY0 Portmir -o Turns Off Port mirroring ---------------------------------------------------------------------------------------------------- -------------------------------------------------- Network ------------------------------------------------------------------------------- ------------------------------ Host (ip or hostname) Resolves a hostname / ip address hostname (Hostname) Sets the Hostname Until Next Reboot Lsdev -cc if Lists All Available / Defined Network Interfaces Chdev -L (Device Name) -a Hostname = (HOS

tname) Changes hostname permanently chdev -l inet0 -a hostname = thomas ifconfig (device name) Displays network card settings ifconfig (device name) up Turns on network card chdev -l (device name) -a state = up Turns on network card ifconfig (device name) down Turns off network card ifconfig (device name) detach Removes the network card from the network interface list ifconfig en0 inet 194.35.52.1 netmask 255.255.255.0 up ifconfig lo0 alias 195.60.60.1 Create alias ip address for loopback route (add / delete) (destination) (destination) (destination) (DESTINATION) (GATEWAY) (DESTINATION) (DESTINATION) (GATEWAY) (GATEWAY) - DOS NOT UPDATE The ODM DATABASE AND WILL BE LOST 194.60.89.0 194.60.90.4 ChDEV -l inet0 -a "Net,-Hopcount, 1, -Netmask, 255.255.0, 10.0.15.254" (Destination) (Gateway AddS Route and Adds Entry Into ODM, Route Survives) reboot, route -rn Display route table odmget -q "attribute = route" CuAt Displays routes in the ODM. lsattr -EHl inet0 Displays routes set in ODM and hostname odmget -q "name = inet0" CuAt Displays routes set in ODM and hostname refresh -s inetd Refresh inetd after changes to inetd.conf kill -1 (inetd PID) Refresh inetd after changes to inted.conf netstat -i Displays interface statistics entstat -d (ethernet adapter eg en0) Displays ethernet statistics arp -a Displays ip To Mac Address Table from ARP Cache No -a Displays Network Options Use -o to set individual options or -d to set inde

vidual options to default. no -o option = value (this value is reset at reboot) no -o "ipforwarding = 1" traceroute (name or ipaddress) Displays all the hops from source to destination supplied. ping -R (hostname or ipaddress ) Same as traceroute except repeats. spray (hostname or ipaddress) Send a stream of packets to a host stopsrc -g tcpip Stops all running TCP / IP daemons /etc/tcp.clean Stops all running TCP / IP daemons and removes all lock files /etc/rc.tcpip start all TCP / IP Daemons. do not use startsrc -g tcpip as this will start all TCP / IP daem INCLUDING ROUTED & GATED ----------------- -------------------------------------------------- ------------- NFS --------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------- Expor tfs Lists all exported filesystems exportfs -a Exports all fs's in / etc / exports file exportfs -u (filesystem) Un-exports a filesystem mknfs Configures and starts NFS services rmnfs Stops and un-configures NFS services mknfsexp -d / directory Creates an NFS export directory mknfsmnt Creates an NFS mount directory mount hostname: / filesystem / mount-point Mount an NFS filesystem nfso -a Display NFS Options nfso -o option = value Set an NFS Option nfso -o nfs_use_reserved_port = 1 ------- -----------------------------------------

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------- ------------- mksysb ------ mkszfile -f create /image.data file (4.x onwards) mkszfile -X creates /fs.size file (3.x) mksysb -i (Device of File) Creates A MKSYSB Image MKSYSB Does Not Save Any Raw Data and Will Not Backup A FileSystem That IS Not Mounted. Savevg ------ Savevg-IF (Device Or File) Creates A Savevg Image restvg -q -f (Device or File) Restore from a savevg image ensure That The Restvg Command Is Run from / MKVGData (VG) Creates New Vgname.Data File CPIO Archive ------------ Find (filesystem) -print | cpio -ocv> (filename or device) eg find ./usr/ -print | CPIO -ocv> / dev / rmt0 cpio restore ---------- CPIO -ICT < (Filename Or Device) | More Lists Archive CPIO -ICDV <(filename or device) cpio -icdv <(filename or device) "files or directories to restore") EG CPIO -ICDV

V / RMT0 "TCPIP / Resolve.conf" restore a named file aix archive ---------- Find (filesystem) -print | backup -iqvf (filename or device) backup by filename. EG FIND / USR / -Print | Backup -iqvf / dev / rmt0 backup - (FileName Or Device) ("FileSystem") backup by inode. EG backup -0 -f / dev / rmt0 "/ usr" -u Option Updates / etc / dumpdates file aix restore --------- RESTORE -QTVF (FileName or Device) RESTORES All RESTORE -QVXF (FileName or Device) ("files or directories to restore") restore -qvxf /dev/rmt0.1 "./etc/passwd" restore / etc / passwd file restore -s4 -qtvf /dev/rt0.1 Lists Contents of a MKSYSB Tape Backups Across A Network ------------------------ To Run The Backup on a local machine (cpio) and backup on the remote Machine's (REMHOST) TAPE DRIVE (/ DEV / RMT0) Find / Data -Print | CPIO -ocv | DD OBS = 32K | RSH Remhost / "DD IBS = 32K OBS = 64K of = / dev / rmt0" to restore / read the backup (cpio) on the remote machine DD IBS = 64k if = / dev / rmt0 | CPI -ICVT to restore / Read THE BACAL MACHINE from the remote machine's (remhost) Tape drive (/ dev / rmt0) RSH Remhost "DD IBS = 64K OBS = 32K if = / dev / rmt0" | DD IBS = 32K / | CPIO - ICVT TO Run THE BACKUP (CPI) ON A Remote Machine (Remhost) And Backup To The Local Machines Tape Drive (/ DEV / RMT0) RSH Remhost "Find / Data -Print | CPIO -OCV | DD IBS = 32K" / | DD IBS = 32k OBS = 64k of = / dev / rmt0 TAR CBF -. | RSH Remhost "DD IBS = 512 OBS = 512 of = / dev / rmt0" SAME

AS ABOVE BUT USING TAR INSTEAD OF CPIO. ----------------------------------------- --------------------------------------- Copying Diskettes and tape ------- -------------------------------------------------- ----------------------- Copying diskettes ----------------- DD if = / dev / fd0 of = (filename) BS = 36B DD if = (filename) of = / dev / fd0 bs = 36b conv = sync or flcopy COPYING TAPES ----------- DD if = / dev / rmt0 of = (filename) DD if = (filename) of = / dev / rmt0 or tcopy -------------------------------- ----------------------------------------------- Vi Commands -------------------------------------------------- ------------------------------: g / xxx / s // YYY / GLOBAL CHANGE WHERE XXX IS To Be Changd by YYY sed 's (ctrl v ctrl m) g // g' old.filename> new.filename Strips out ^ m characters from ascii files that have been transferred as binary. To enter crontrol characters type ctrl v then ctrl? where? is whatever Ctrl Character You NEED. ------------------------------------------------------------------ ------------------------------------------------- -------------------------------------------------- --------------- lscfg lists all installed devices lscfg -v lists all installed devices in detail lscfg -vl (device name) lists device details bootinfo -b reports last device the system booted from bootinfo -k reports keyswitch position 1 = Secure, 2 = Service, 3 = Normal Bootinfo -r Reports Amount of Memory (/ by 1024) Bootinfo -s (Disk

device) reports size of disk drive bootinfo -T reports type of machine ie rspc, rs6ksmp, rspc or chrp lsattr -El sys0 -a realmem reports amount of useable memory mknod (device) c (major no) (minor no) Creates a / DEV / Device File. mknod / dev / null1 c 2 3 LSDEV-C Lists All Customied Devices IE Installed Lsdev -p Lists All Pre-Defined Devices IE Supported Lsdev - (CLASS) -T (Type) -S (subtype) -A (attribute) = (new value) Change a device attribute chdev -l sys0 -a maxuproc = 80 lsattr-((device) -d lists the defaults in the pre -Defined db lsattr-eh -l sys0 -a modelname rmdev -l (Device) Change Device State from available to defined RMDEV -L (Device) -d delete the device rmdev -l (Device) -Sr s Stops Device, r unconfigures Child Devices LsResource -L (Device) Displays Bus Resource Attributes of A Device. cfgmgr configures de vices cfgmgr -i / dev / cd0 Configure devices and install drivers from / dev / cd0 if required cfgmgr -S Run in serial, used with a larger number of disks cfgmgr -l scsi0 Configure devices on adapter scsi0 only diag Run hardware diagnostic menu smitty diag Run hardware diagnostic menu (7020-40P and 7248-43P machines can not run diagnostics, use diagnostics in the SMS menus instead diag -d (device) Run diagnostics against a device. lsslot Displays all hot swap slots lsslot -c pci Lists all pci Hot Swap Slots Lsslot -c PCI-A Lists All Available PCI Hot Swap Slots Drslot Reconfgiures PCI Hot-Plug S

Lots Drslot -i -c PCI -S U0.1-P1-I3 Display A Slot, Flashs The Led Next To the Slot So That It Can Be Identified. Power Management (PCI Machines) ---------- --------------------- Pmctrl -a Displays The Power Management State Rmdev -l PMC0 Unconfigure Power Management Mkdev -l PMC0 Configure Power Management ------- -------------------------------------------------- ------------------------------------------------- -------------------------------------------------- ----- RMT0.X where x = a b ca = density 0 = high 4 = low b = retension 0 = no 2 = yes c = rewind 0 = yes 1 = no tctl -f (Tape Device) FSF (NO) Skips Forward (no) Tape Markers TCTL -F (TAPE Device) BSF (NO) Skips Back (no) Tape Markers TCTL -F (TAPE Device) REWIND REWIND The TAPE TCTL -F (TAPE Device) Offline Eject The Tape TCTL-F (Tape Device) STATUS SHOW Status of Tape Drive Chdev -l Rmt0 -a Block_size = 512 Changes Block Size To 512 Bytes (4mm = 1024, 8mm = Variable But 1024 Recommended) DD IF = / dev / RMT0 BS = 128k Count = 1 | WC -C Displays the block size of an unknow tape. Set block size to 0 first. bootinfo -e answer of 1 = machine can boot from a tape drive answer of 0 = machine CAN NOT boot from tape drive diag -c -d (tape device) Hardware RESET A TAPE DRIVE. DIAG -C -D RMT0 TAPECHK (NO OF FILES) Checks Number of Files on Tape.

Rewinds the Tape !!! -------------------------------------------------------------------------------------------------------- ------------------------------------ Printers / Print Queues ---------- -------------------------------------------------- -------------------- SPLP (Device) Displays / Changes Printer Driver Settings SPLP / DEV / LP0 Export $ LPDEST = "PQNAME" set default printer Queue for login session lsvirprt Lists / changes virtual printer attributes lsallq Displays all queues rmvirprt -q queuename -d queuedevice Removes a virtual printer qpri -. # (job No) -a (new priority) Change a queue job priority qhld -. # (job No) Put a Hold On Hold QHLD -R # (Job No) Release A Held Job Qchk -a Status of Jobs in Queues LPSTAT LPSTAT -P (Queue) Status of Jobs in a named Queue Qcan -x (Job No) Cancel a Job from a Queue Cancel (JOB NO) ENQ -U -P (Queue) Enable a Queue Enable (Queue) Enq -d -p (Queue) DISABLE A Queue Disable (QUEUE) QMOV -M (New Queue) - # (Job No) Move A Job To Another Queue Startsrc -s qdaemon start qdaemon sub-system lssrc -s qdaemon list status of qdaemon sub-system stop -s qdaemon stop qdaemon sub-system -------------------- -------------------------------------------------- ---------- File Systems -------------------------------------- ------------------------------------------ Physical Volumes (PV's) --- -------------------- LSPV

Lists all physical volumes (hard disks) lspv (pv) Lists the physical volume details lspv -l (pv) Lists the logical volumes on the physical volume lspv -p (pv) Lists the physical partition usage for that PV lspv -M (pv Lists the PP Allocation Table for That PV. If The Pv State Is "Missing" But The Disk is Okay, Use "Varionvg VG" to change the state of the pv to "Active". Chdev -l (PV) -A PV = YES MAKES A New HDisk a Pysical Volume. ChPV -V R (PV) Removes a Disk from The System. ChPV -V A (PV) Adds The Removed Disk Back Into The System. Chpv -a Y (PV) Changes PV Allocatable state to YES chpv -a n (pv) Changes pv allocatable state to NO migratepv (old pv) (new pv) Moves all LV's from one PV to another PV, both PV's must be in the same volume group. migratepv can not migrate striped logical Volumes, USE CPLV AND RMLV. Replacepv (OLD PV) (N EW PV) (4.3.3 onwards) Volume Groups ---------------------- LSVG Lists All Volume Groups LSVG (VG) LSTS The Volume Group Details LSVG - l (vg) Lists all logical volumes in the volume group lsvg -p (vg) Lists all physical volumes in the volume group lsvg -o Lists all varied on volume groups varyonvg (vg) Vary On a volume group varyonvg -f (vg) Forces the Varyon Process Varyonvg-S (VG) VG IN Maintenance Mode. Lv Commands Can Be Used on VG, But Lv, S Cannot Be Opened for I / O. Varyoffvg (VG) VARY OFF A VOLUME GROUP SYNCLVODM (VG Tries To RESYNC VGDA, LV Control Bloc

Ks and odm. synclvodm -v (vg) Rebuilds the LVCB. (The VG Needs to be varied on before running synclvodm) MKVG -Y (VG) -S (PP size) (PV) CREATE A VOLUME Group MKVG -Y DATAVG - s 4 hdisk1 reducevg (vg) (pv) Removes a volume group reducevg -d (vg) (pv) Removes a volume group and delete all LV's on the PV reducevg (vg) (PVID) Removes the PVID disk reference from the VGDA when A Disk Has Vanished WITHOUT The Reducevg (VG) (PV) Command Being Run First. Reducevg -df (VG) (PV) DELETES All LV's from the vg and removes the vg from the disk. if the last disk in the vg kil dam VG is deleted. extendvg (vg) (new pv) Adds another PV into a VG. exportvg (vg) Exports the volume group, removes the VG entries and removes all FS entries from / etc / filesystems but leaves the mount points. Note : Can not export a VG if it has active paging space, turn off paging, reboot before exporting VG Exporting removes entries from filesystems file but does not remove the mount points chvg -a y (vg) Auto Vary On a volume group at system.. START. CHVG -U (VG) UNLOCKS A LOCKED VOLUME GROUP. LQueryvg -atp (PV) Details Volume Group Info for The Hard Disk. Importvg -y (VG Name) (PV) Import A Volume Group from a disk. importvg (PV) ) Same As Above But VG Will Be Called VG00 ETC. 4.3 OnWards, Importvg Will Automatic THE VG. CHVG -Q (Y / N) Turns ON / OFF Quorum Checking ON A VG. REORGVG (VG) (LV) ) Reorganised a fragmented lv, mu

St State An LV At The Command Line Else The First LV in The VG Is Picked. Does Not Reorg The PP's of Striped Lv's. Logical Volumes ------------------------------------------------------------------------------------------------------------ ---- LSLV (LV) Lists The Logical Volume Details LSLV -L (LV) Lists the Physical Volume Which THE LV IS ON LSATTR - EHL (LV) Displays More Logical Volume Details MKLV (VG) (NO OF PP's) (PV) Name Optional) Create A Logical Volume MKLV -Y (LV) (PV Name Optional) Creates A Named Logical Volume (Use -t Jfs2 When Creating An LV for A JFS2 FileSystem CHLV-N (New LV) (OLD LV) Rename A Logical Volume CHLV -X (Number) (LV) Change Max No of PP's CHLV -S N (LV) Turns of Strickness On The LV ExtendLV (LV) (EXTRA No of PP's) Increase The size of an LV RMLV (LV Remov E A Logical Volume CPLV -V (VG To Copy TO) --Y (New LV) (LV) COPY An LV To a New Lv if Copying A FileSystem LV, Umount The FileSystem Before Copying, OtherWise You Will Have To Fsck The The New LV before the filesystem can be mounted. If copying a striped LV to an LV that is already created, and the stripe size is different (or not even striped, then these new parameters are maintained when the data is copied to the new LV. cplv -E (new lv) (new lv) Copy to an existing lv (New Lv Must Have Type As Copy Use Chlv -t Copy (New LV) to change MKLV / EXTENDLV -A = PP alocation policy -am = middle -ac = Center -ae = edge -aie = inner edge -aim = inner middle migratepv -

L (LV) (NEW PV) (NEW PV) Move A Logical Volume Between Physical Volumes. Both Physical Volumes Must Be in The Same Volume Group! MKLV -Y (LV) --T JFSLOG (VG) (NO OF PP's) (PV) Name Optional) Creates A JFSLOG Logical Volume. Logform for use as an jfslog getlvcb -at (lv) Displays Logical Volume Control Block Information File Systems (fs's) --------- ---------- lsfs Lists all filesystems lsfs -q (fs) Lists the file system details lsjfs Displays data about all filesystems in CSV style format mount Lists all the mounted filesystems mount (fs or lv) Mounts a named Filesystem Mount -a Mounts All FileSystems Mount All Mount -r -v CDRFS / DEV / CD0 / CDROM Mounts CD0 Drive Over / CDROM CRFS -V JFS -D (LV) -M (Mount Point) -a Yes Will Create A File System On The Whole of The Logical Volume, Adds Entry INTO / ETC / FileSystems and Will Create Mount Point Directory if It Does NOT. (Use -v jfs2 for jfs2 Filesystems CRFS -V JFS -G (VG) -M (Mount Point) -a size = (size of fs) -a yes will create a logical volume on the volume group and create the file system on the logical volume. all at the logical volume. All at size stated. Will add entry into / etc / filesystems and will create the mount point directory if it does not exist. Use attribute "-a log = / dev / log01" to specify a jfslog devices Use attrubute "-a bf = true" For A Large File Enabled FileSystem Chfs -a Yes (FS) Change File System To Auto Mount In / etc / filesystems chfs -a size = (new fs size) (fs) Change file system size chfs -m (new-mount-point (Fs) Change The File System Mount Point. RMFS (FS) RE

moves the file system and will also remove the LV if there are no onther file systems on it. defrag -q (fs) Reports the fragment status of the file system. defragfs -r (fs) Runs in report only defrag mode (no action ). Defragfs (fs) Defragments a file system. fsck (fs) Verify A File System, The File System Must Be unmounted! fsck (-y or -n) (fs) pre-answer quintions either yes or no! fsck -p (fs) Will Restore Primary Superblock from backup copy if the superblock is corrupt. (or DD count = 1 BS = 4K Skip = 31 seek = 1 if = / dev / lv00 of = / dev / lv00 mirroring ------ --- Mklv -y (lv) -c (COPIES 2 or 3) (Vg) (PV Name Optional) Creates a mirrored named logical volume. mklvcopy -s n (lv) (COPIES 2 or 3) (PV) Creates a Copy of A Logical Volume. The Physical Volume Must Be in The Same Volume Group As The Orginal Logical Volume! RMLVCopy (LV) (Copies 1 Or 2) REMO VES Logical Volume Copies. Rmlvcopy (LV) (COPIES 1 or 2) (PV) from this PV Only! Syncvg -p (PV) SYNCHRONIZE LOGICAL PARTION COPIES SYNCVG -L (LV) SYNCVG -V (VG) Mirrorvg (VG) (VG) pv) Mirrors the all the logical volumes in a volume group onto a new physical volume. New physical volume must already be part of the volume group. chfs -a splitcopy = / backup -a copy = 2 / data1 Splits off a copy of a 3 Way Mirror and Mount Read Only for use as an offline backup. ------------------------------------ -------------------------------------------- Boot Logical Volume (BLV) / Processors / Kernel -------------------------------------------------------------------------------------------- -----------------

----------------- Mirroring Does Not Work with The BLV As It Is Not a True Logical Volume, Bosboot Must Be Run Against The Other Disk After Mirroring The Rootvg. Bootlist -m ( Normal or service) -o Displays bootlist bootlist -m (Normal OR Service) Change Bootlist Bootinfo -b Identifies The Bootable Disk Bootinfo -t Specifies Type Of Bosboot -a -d (/ DEV / PV) Creates A Complete Boot Image ON A Physical Volume. mkboot -c -d (/ dev / pv) ZERO'S OUT The Boot Records on the Physical Volume. Savebase -d (/ dev / pv) Saves Customiad Odm Info Onto the Boot Device. LSLV -M hd5 Find out which disk the BLV is on. bootinfo -y Displays which kernel can be used, 32 or 64 bit genkex Reports all loaded kernel extensions. lsdev -Cc processor Lists all processors lsattr -EHl proc0 Displays attributes of processor 0. AIX 5.1 L Will Display Processor Clock Frequency. ----------------------------------------------- ----------------------------------- System dump ------------- -------------------------------------------------- ----------------- 1, AIX 4.2.1 And Greater Supports System Dump To Paging Space. 2, AIX 4.3.3 and Greater Supports System Dump To mirrored Paging Space. 3, Primary dump device must be in the rootvg 4, Secondary dump device can be outside rootvg unless it is a paging device. sysdumpdev -l Lists current dump destination. sysdumpdev -e Estimates dumpsize of the current system in bytes. sysdumpdev -L Displays information about The previous dump. sysdumpstart -p starts a

.. Dump and writes to the primary dump device sysdumpstart -s Starts a dump and writes to the secondary dump device (MCA machine can also dump if key is in service position and the reset button is pressed) sysdumpdev -p (dump device) - P sets the default dump device: - echo "stat / n status / n t -m" | crash /var/adm/ras/VMCORE.0 SNAP -GFKD -O / DEV / RMT0 COPY DUMP to TAPE TO Send to IBM Support, Uses Tar. --------------------------------------------------------------------------------------------------------------------------------- --------------------------------------- Paging Space (PS's) ------ -------------------------------------------------- ------------------------ LSPS -A Lists Out All Paging Space LSPS -S Displays Total Paging and Total Useage LSPS (PS) Swappon / DEV / PS Activates a Paging Device Eg / dev / Paging00 Swappoff / DEV / PS DEACTIVATES A PAGING Device (AIX 5.x Only MKPS -S (NO OF PP's) -N -A (VG) MK PS -S (NO OF PP's) -N -A (Vg) (PV) -N = don't activiVate / swapon now -a = activate / swapon at reboot mklv -b n -t paging -y hd6 (vg) ( NO OF PP'S) (PV) Creates Paging Space Using The MKLV Command. Chps -a N (PS) Turns Off Paging Space. Chps -s (NO OF PP'S) (PS) Increases Paging Space. Chps -d (no PP's) (ps) Decreases paging space (AIX 5.x only chlv -n Change paging space name rmps (ps) Remove paging space (new name) (old name). PS must have been turned off and then the system rebooted before it can be Removed. Note: Need to change the swapon entry in /sbin/rc.boot script if you are changing the default

Paging Space from / dev / hd6. You Also need to do a "bosboot -a -d / dev / hdiskx" Before the reboot. / etc / swapspaces file trats all Paging Space Devices That Are AntiVated / Swapon During Reboot. - -------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------- ------- Crontab -L list out crontab entrys crontab-E Edit crontab entrys crontab -l> (filename) Output crontab Entrys to a file crontab (filename) ENTER A crontab from a file crontab -r Removes All, ENTER A CRRETAB ALL crontab entrys crontab -v Displays crontab submission time. /var/adm/cron/cron.allow File containing users allowed crontab use. /var/adm/cron/cron.deny File containing users denied crontab use. / var / adm / cron / crontab Directory Containing Uses Crontab Entries. / VAR / ADM / CRON / LOG CRON LOG FILE. AT (NOW 2 Minutes, 13:05, etc) {return} Schedule a Job Using At Command OR Schell Script {Return} {Ctrl D} Echo "shutdown -fr" | AT Now 1 Minute At -L Atq Lists Out Jobs Scheduled to Run Via At Command At -R (At Job NO) ATRM (At Job No) Removes An At Job Scheduled To Run. / Var / ADM / CRON / AT.ALLOW FILE Containing Uses Allowed At Use. /Var/adm/cron/at.deny File Containing Users Denied AtJobs Directory Containing Users at Entries. ----- -------------------------------------------------- -------------------------

转载请注明原文地址:https://www.9cbs.com/read-120478.html

New Post(0)