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

GENERAL INFORMATION COMMANDS


smon
- monitor's system usage - F5 shows processes which are hogging the machine. Not available on AIX 4.1 and above sadly.
uptime
- shows how long the system has been up and how hard it is being hammered. The load average fields show how many jobs on average are waiting. <1 5="" around="" bad="" good="" is="" less="" not="" or="" pretty="" though="" unusual="" very="">10 the machine is being seriously hammered.
who
- list users who are currently logged on (useful with option 'am i' - i.e. 'who am i' or 'whoami')
w
- list users and what they are doing, including idle time. The first line is the output from uptime
id
- similar to whoami except that it does a direct check to see who you are - who only checks /etc/utmp so any su commands will be ignored.
ps
- list processes currently running, by default on the current shell. Useful with options:
  • -t - show all processes running on a terminal
  • -ef - show all processes
  • -u - show all processes owned by a user
  • -flp - show as much information as you can about a process number
  • -aux - show processes in order of usage of the processors. Useful to see what processes are hogging system resources.
fuser -u
- show who is using a file.(system hogging command). Useful when trying to work out who has locked a row or table in an informix database for example.
lpstat -p
- show the current status of a printer and any jobs in the queue. lpstat without arguments prints all of them.
enable 
- enable a printer queue. You must be root or a member of the printq group to run this command.
disable 
- disable a printer queue. You must be root or a member of the printq group to run this command.
enq 
- examine spool queue for printers.
uname -a
- will show you what machine you're currently on.
ipcs
- list semaphores and shared memory.
ipcrm -s
- remove semaphore or shared memory.
crontab
- use -l to list all regular scheduled jobs. To alter them, use option -e
at 
- perform a job at a specified time. (Useful for running something at a later date). at retains the current environment. e.g.
$ at now + 5 minutes
echo "Phone Julie McNally" > /dev/tty616
^D
job compjmd.389748732 will be run at ???
Will echo to tty616 the message "Phone Julie McNally" in 5 minutes. e.g.2
$ at 0331235930
echo "April fools day!" > /dev/console
^D
will echo "April fools day!" to the console at 11:59 and 30 seconds, on the 31st of march. Format for this is: [YYYY]MMDDhhmmss. at jobs are sometimes used in the place of crontab's because if the machine is off when the crontab is meant to take place, the job never happens. at jobs automatically start when the machine is switched on if the machine was down at the time. typing at -l will show you all the at jobs you have queued, at -r  will remove an at job (only the owner or root is allowed to do this).
date
- show current date and time. This command may also be used to set the system clock (ONLY WHEN EVERYONE IS LOGGED OFF) with a root user id. A date change is never simple, even when adjusting things by an hour. The safest way to do it is to change the date then reboot the machine because otherwise the crontab daemon may start doing jobs at odd times. I believe there might be a 'go slow/fast' option to set the clock, and the clock will then run 'slower/quicker' until it catches up with the required time.
last 
- shows a list of recent logins. It looks at /var/adm/wtmp so it only shows initial logins, and not whether those users have been su'd to.
fileplace -pv
- show the physical (as in disk location) location of a file. Useful for tracing informix files, and perhaps for working out whether defragmentation copying is required.

No comments:

Post a Comment