This blog is a common Unix Blog

Wednesday, 25 May 2011

Monitoring Log files in Linux

How to monitor log files in real time on Linux?

This method/trick can be used on Unix, Linux or Mac platforms.
Here it goes:

1. SSH on your server first.
2. Type # tail -f /var/log/httpd/access_log
Note: # is the prompt, do not type it. :)
3. The command above will show you the last few lines of the log file. If you are familiar with tail command, this is no surprise. But the -f flag will print you any new lines added to the log file in real-time.
By this way you can easily get the live traffic to your server.

If you feel like monitoring and tracing the output based on a specific IP address, then type

# tail -f /var/log/httpd/access_log | grep '192.168.3.127'

Wednesday, 11 May 2011

AIX Documentation

Today we will have a look at AIX documentations. 

Before going into the details, let us see a figure regarding AIX documentation.

AIX softcopy documentation is loaded on a documentation server. Any other computer on the network with a web-browser software can access the documentation from the server, these machines are called Documentation Clients.
To configure the Documentation Server, the following has to be installed and configured:
a.AIX softcopy documentation
b.Eclipse Web Server
c.Web Browser Software
The Documentation Client needs to just have a web browser software like Internet explorer.

Configuration of online AIX documentation

Install the Web Server Software and start the Web Server Software
Install the Web Browser Software
Install the AIX documentation
Install the Information Center run time environment
AIX 5L V5.3 Documentation CD
Includes internal eclipse Web server
infocenter.aix.rte
Configure Documentation Services


 #smit change_documentation_services



**NOTE:- [Steps to configure the AIX Online Documentation on the Documentation server are as follows:-
Install the mozilla  web brower from expansion Pack CD.
#smit change_documentation_services ]


DOCUMENTATION SERVICES 

Use  the fast path smit change_documentation_services to configure the documentation server. If installation is correct then these values will come automatically as shown in the slide. Eclipse Web server listen the requests on port 64111. So you have to check the port number. It should be 64111. 


IBM pSeries Information Center



















Once the AIX Documentation is configured on your machine, you can access it

Using the web browser. In the web browser’s address bar you can type in
http://hostname:64111/help/index.jsp
Instead of hostname you can also use the ip address.

Information Center Documents


NOTE:-Once you type the proper address in address bar you will get the home page of documentation. On the home page you will get links for PDFs that contains the AIX commands. You can download these PDFs to your machine and save them for future use.

Information Center Search

Here you can see the search box where you can type command name and then click on go button. It will show all the pages links in the left pane that contains the word you typed in search box.









Monday, 9 May 2011

  Software Maintenance

This is the command used to maintain the software installed in an AIX machine.

# smit maintain_software

The screen looks like:-




             Software Maintenance and Utilities
Move cursor to desired item and press Enter.
  Commit Applied Software Updates (Remove Saved Files)
  Reject Applied Software Updates (Use Previous Version)
  Remove Installed Software
  Rename Software Images in Repository
  Clean Up Software Images in Repository
  Copy Software to Hard Disk for Future Installation
  Copy Software Bundle to Hard Disk for Future Installation
  Check Software File Sizes After Installation
  Verify Software Installation and Requisites
  Clean Up After Failed or Interrupted Installation
  Service Update Management Assistant (SUMA)
    F1=Help      F2=Refresh       F3=Cancel       F8=Image
    F9=Shell     F10=Exit         Enter=Do


AIX FIX REPOSITORY

FIX REPOSITORY:-


When working with modification or fixes, it is common to download the fixes to a directory on your hard disk before installation. This location is commonly referred to as the fix repository.

While /usr/sys/inst.images is a standard location for storing software images and will appear in the smit input device/directory(F4) list, you may use any directory for this purpose.


AIX Fix Central Web site:
www.ibm.com/servers/eserver/support/pseries/aixfixes.html.
Maintenance packages

Maintenance packages are released every four to six months.

Use the  oslevel –r  to determine your current level.

Specific fixes
These are generally available fixes that resolve specific problems.

Emergency Fixes
When resolution to a problem cannot wait for a generally available fix. IBM may provide a way around the problem in the form of an emergency fix.

Critical Fixes
IBM periodically publishes information about generally available fixes that may apply to your system.



Commands used to manage fixes:-


The command instfix allows you to install a fix or a set of fixes
The same command can also be used to determine if a fix is installed on your system or not.


•Installs a fix:
 # instfix -k IY58143 -d /dev/cd0 


•Searches for a fix:
 # instfix -ik IY58143
All filesets for IY58143 were found. 


•Searches for a fix by keyword:
 # instfix -s SCSI -d /dev/cd0 


•List which AIX BOS maintenance levels are partly or full installed:
 # instfix -i | grep ML
 All filesets for 5.3.0.0_AIX_ML were found.
All filesets for 5300-01_AIX_ML were found. 


•List which filesets are missing in a partly installed AIX BOS maintenance level:
 # instfix -ciqk 5300-01_AIX_ML | grep :-:





Some useful options with this command are:-
-s – search for and show entries containing this particular string
-k – install filesets for a keyword
-T – just display table of contents
-I – Give information only
-d – to specify the input device.

Fix central Web-site:-




Friday, 6 May 2011

Installing Other Optional Softwares on AIX Machine

How will you install optional software on a AIX machine?


Firstly, What is an optional software?
Optional softwares are those which are not pre-installed when you install an AIX machine.





Secondly, How will you identify the software product?
The OS software could be identified with the following format as:- 




versionnumber.releasenumber.modificationlevel.fixlevel


Versionnumber- it may be 1 to 2 digits.
Releasenumber- It may be 1 to 2 digits.
Modificationlevel- It can be from 1 to 4 digits.
Fixlevel- It can be from 1 to 4 digits.

How to remember this? vrmf



Eg:- 05.02.0000.0000
Eg2:- 5.3.0083.2233


This is useful when we need to find the level of the AIX OS using the #oslevel command




Now let us see some of the key words required to go further:-


1. Fileset- It is the smallest installable unit for the AIX OS, example of a completely installable unit is bos.net.uucp & example of a separately installable part of a product like bos.net.nfs.client


2. Packages- It is a group of separately installable filesets, which provides a set of related functions. Eg:- bos.net


3. Licensed Program Products(LPP)- They are a complete software product including all packages associated with that licensed program. Eg:- BOS


4. Bundles - They are a list of sofwares which contains filesets, packages, LPPs, that are used for a specified use. Bundles are the actual software. 


example:- Server bundle, network bundle, graphics bundle


5. PTFs- It stands for Program Temporary Fix. A temporary solution or by-pass of a problem diagnosed by IBM as resulting from a defect in a current unaltered release of the program. A report of a problem caused by a suspected defect in a current unaltered release of a program.


6. APAR - It stands for Authorized Program Analysis Report. A report of a problem caused by a suspected defect in a current unaltered release of a program. It is an emergency fix.


Now let's see how the software hierarchy in aix looks like:-

The Naming Conventions used for the fileset is :-




























SOFTWARE STATES


















































As you can see from the above pic.. there are 2 states when you are installing any software.
Applied state and Committed state.



Lets say you already have a older version of a software available on your system. Now you want to install a newer version of the software. In this example, you can install this software in Applied mode. If you install a software in applied mode, it maintains the older version in un-available state (not removed) and the newer version will be in Applied mode and made available to you. That means both the old and the new version are there on your system. If you are convinced with the newer version you can commit the newer version. Once the newer version is committed, the older version which was maintained will be removed and if the newer version is rejected, then the older version is made available again and the newer version gets removed i.e. rejected.

Coming to the final part of the article, let us get into the business of installing a software.

The command used to install a software is:-
 #smit install

Now immediately the System Installation window pops up.


If you choose the first option ie Install and Update Software, you will again see submenus

Now we can see that the software is installed using SMIT in this way.
We can list the installed softwares using the command
#smit list_installed
            or
#lslpp -l bos.rte.*



>>Hope you enjoyed the knowledge in this post :)
Have a nice day :)