Tanti Technology

My photo
Bangalore, karnataka, India
Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments I have 4.5+ years experience in AIX system Administration field. This site will be helpful for system administrator in their day to day activities.Your comments on posts are welcome.This blog is all about IBM AIX Unix flavour. This blog will be used by System admins who will be using AIX in their work life. It can also be used for those newbies who want to get certifications in AIX Administration. This blog will be updated frequently to help the system admins and other new learners. DISCLAIMER: Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility. If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.

Tuesday, 25 February 2014

SYSTEM COMMANDS



kill -
- sends a signal (normally a kill) to a process. kill -9 terminates the job no questions asked, kill -15 tries to clear up as much as possible - e.g. remove semaphores and such-like. Other signals may be sent as well, see manual and /usr/include/sys/signal.h to see what signals you can send to a process.
renice 
- make a process not hog the system so much by setting its nice value.
smit
- system admin program for AIX
df
- list volume groups + usage. see also lsvg. Usually used with the -k flag so the number of blocks is displayed in 1024-blocks.
cu -l
- log on to device such as a pad or a modem. See related files /etc/uucp/* and /etc/locks and /etc/services
stty sane
- Changes terminal settings back to normal. If a tetra module for example crashes your screen so that no keys function except ^C which doesn't even do very much then typing ^Jstty sane^J should cure the problem. To fully cure the problem you also need to type stty tab3 (and stty -ixon if you're feeling a little overzealous)
stty
- allows you to change terminal settings such as the interrupt key, quit key, etc. e.g.
$ stty intr ^A # would change the interrupt key to being control-A
$ stty quit ^L #would set the quit key (normally ^\) to control-L. other key changes are:
  • erase (normally ^H)
  • xon (normally ^Q)
  • xoff (normally ^S)
  • eof (normally ^D)
To really annoy a systems administrator, change interrupt to 't' and quit to '^D' . hehehehehehe
lscfg
- show all connected devices
lsvg
- list volume groups (see related file diskhelp)
lspv
- list physical disks (and see related file diskhelp)
lspv without arguments will produce a list of all the hard-disks used. lspv  will produce a list of information about the hard disk. lspv -l  will show any logical volumes which are mapped on to that drive.
lsdev
- list devices. Options:
  • -C list Configured devices
  • -P list Possible devices
produces different output when you are root.
mkdev
- make devices. e.g. To make a tty:
# Script to add a tty. Options that need amending are:
# -l name of tty to be created - e.g '-l tty600' wil create
# a tty called 'tty600'
# -p RAN name
# -w Port number on RAN
# -a Attributes (e.g. to set up auto login, etc.)
mkdev -c tty -t 'tty' -s 'rs232' -l tty433 -p sa2 -w 2 -a term='wyse50' -a forcedcd='enable' -a login='enable' -a speed='19200'
e.g. To create a printer (raw device):
mkdev -c printer -t 'osp' -s 'rs232' -p 'sa3' -w '10' -l label2 -a xon='yes' -a dtr='no' -a col=500
It is highly recommended that you make and change devices using smit
chdev
- change devices. See mkdev
cc
- c compiler, use with
  • -o to specify a target instead of a.out
  • -O optimise
  • -w or -W all warning flags.
shutdown
- shutdown the system so that it may be switched off. Rather obviously, this may only be run by root. Options:
  • -f shuts the system down immediately (rather than waiting for a minute)
  • -R reboot the system immediately after halt
oslevel
- show the current revision of the operating system.

No comments:

Post a Comment