Translate

Friday, 31 January 2014

SENDMAIL



sendmail -bi       Creates new aliase db from /etc/aliase file.
newaliases

sendmail -bp       Displays the contents of the mail queue
mailq

sendmail -q        Processe the sendmail queue NOW

sendmail -bt -d0.4 < /dev/null
Prints out sendmail version, compile defines and system information

refresh -s sendmail      Restart sendmail, will re-read /etc/sendmail.cf
kill -l (sendmail PID)

stopsrc -s sendmail                 Stops the sendmail daemon
startsrc -s sendmail "-bd -q30"     Starts the sendmail daemon

DOS DISKETTES



dosdir                    Reads directory listing of a diskette
dosdir (directory)        Reads directory listing of a named directory

dosread -D/dev/fd0 C41.TXT c41.txt        Gets C41.TXT from diskette drive fd0

dosread -D/dev/fd0 DIRECTORY/C41.TXT c41.txt  
(-D option can be dropped if using fd0)

doswrite -D/dev/fd0 (unixfile) (dosfile)        Writes a file to diskette

dosdel (dosfile)                                Deletes a dos file on diskette

dosformat                                       Formats the diskette

PERFORMANCE MONITORING / TUNING



vmstat (drive) (interval) (count)         Reports virtual memory statistics.
vmstat hdisk0 5 20

vmstat -s              Diplays number of paging events since system start.
vmstat -f              Diplays number of forks since system start.
vmstat -i              Diplays number of interupts by device since system start.

iostat (drive) (interval) (count)         Reports i/o and cpu statistics.
iostat hdisk0 5 20

iostat -d (drive) (interval) (count)      Limits report to drive statistics.
iostat -t (interval) (count)              Limits report to tty statistics.

sar -u -P ALL 10 10         Displays %usr %sys %wio %idle for all processors

/usr/samples/kernel/vmtune  Displays "Virtual Memory Manager" settings

ERROR LOGGING / LOGS



/usr/lib/errdemon -l         Displays errorlog attributes.
/usr/lib/errdemon            Starts error logging.
/usr/lib/errstop             Stops error logging.

errpt                        Displays summary errorlog report.
errpt -a                     Displays detailed errorlog report.
errpt -j (identifier)        Displays singe errorlog report.

Note : errorlog classes are H=Hardware S=Software O=Information V=Undetermined

errclear (days)              Deletes all error classes in the errorlog.
errclear -d (class) (days)   Deletes all error class entries in errlog.

Note : The errclear command will delete all entries older than the numbers of
       days specified in the days paramenter. To delete ALL entries used 0.

errlogger "message up to 230 chrs"  
Enters an operator notifaction message into the errorlog.

alog -L                      Lists all logs define in the alog db

alog -o -t (type)            Display contents of log (type)
alog -o -t boot

cat /tmp/boot.log | alot -q -t (type)    Copies contects of a file to a log

MISCELLENEOUS



http://www.rs6000.ibm.com/cgi-bin/ds_form        Web based man pages

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        Lists contents of the 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 (directory)       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

LICENSES / SOFTWARE INSTALLATION



lslicense                    Displays number of current user licenses
chlicense -u (number)        Changes the number of user licenses
( ftp,rexec and rsh (without -i flag) do not need an AIX user license to be
  able 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 !
alt_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 / DISPLAYS



/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