Open Aix in verbose mode
If you are having trouble booting aix, you can open verbose mode by doing following things:
While booting system pres1 button for “open firmware”. On firmware prompt;
- For AIX 5.3 and greater, use:
At the 0> prompt, enter “boot -s verbose”
0> boot -s verbose
- For AIX 5.2 or earlier use:
At the 0> prompt, enter “boot -s trap”
0> boot -s trap
Force Umount on AIX and Linux
Linux
Umount -l /fs
AIX
Fuser -xuck /fs
Umount -f /fs
Tar bzip/gzip on AIX
Tar command normally have ability to uncompress z files. But in aix it is not available. We have a solution for aix.
To compress:
“tar cvf – abc | gzip > abc.tar.gz”
“tar cvf – abc | bzip2 > abc.tar.bz2″
To uncompress:
“gunzip < abc.tar.gz | tar xvf -”
”bzip2 < abc.tar.bz2 | tar xvf -”
(you can remove “v” option for faster process, because “v” means verbose)
Swift SAG version information
To check the SAG version , please issue the command by SAG Admin ID:
- Change to the installation directory of your SAG (for example c:\SWIFT\SNL\SwiftNet\bin on Windows system).
- Issue swiftnet version -a to get the version .
Diff Command
# diff cookies.old cookies.new
5c5
< One cup vanilla extract
—
> One teaspoon vanilla extract
7d6
< Six ounces chopped liver
21a22
> Note: The previous version of this recipe had a few errors!
The output is actually a description of how to transform the old file into the new one. Here, diff is telling you three things:
- The fifth line of the file has undergone a change. The 5c5 message says to replace line 5 of the old file with line 5 of the new file. Both the old and new text are displayed, separated by a line of three dashes. (The less-than (<) notation means “remove this line,” and the greater-than (>) sign means “add this line.”)
- Line 7 of the old file does not appear in the new file. The 7d6 message says to delete line 7 from the old file, and the files will then be in sync, starting at line 6 of the new file. The text to be deleted is displayed on the next line.
- A line was added to the new file. The 21a22 message says to add a new line after line 21 of the old file. The text to be added is displayed on the final line of the output.
Read more: http://lowfatlinux.com/linux-compare-files-diff.html#ixzz1Y69sCYkP
AIX The parameter list is too long.???
Update the system’s argument length fixes that…
chdev -l sys0 -a ncargs=’16′ (default is 6)
AIX restore file permissions from mksysb image
restore -Pa -dqvf <mksysb image location> <which folder to restore permissions>
Solaris 10 ipnodes caveat
On Solaris 10, IPv4 addresses are looked up in /etc/inet/ipnodes before /etc/inet/hosts.
From /etc/nsswitch.dns:
# Note that IPv4 addresses are searched for in all of the ipnodes databases
# before searching the hosts databases.
This means that if you have the following in /etc/nsswitch.conf (which is the default from /etc/nsswitch.dns)
ipnodes: files dns
hosts: files dns
the IPv4 resolution order will be:
1. /etc/inet/ipnodes
2. DNS (name servers in /etc/resolv.conf)
3. /etc/hosts
4. DNS (name servers in /etc/resolv.conf)
This may confuse administrators accustomed to placing IPv4 addresses in /etc/hosts to override resource records in DNS.
The easiest way to check /etc/inet/ipnodes and /etc/hosts before DNS is to remove dns from the /etc/nsswitch.conf ipnodes: entry.
ipnodes: files
hosts: files dns
The IPv4 resolution order will be:
1. /etc/inet/ipnodes
2. /etc/hosts
3. DNS (name servers in /etc/resolv.conf)
AIX Virtual Printer
Procedure
- Create the file in /dev/lpx. Enter the following sequence of commands:
- cat /dev/null > /dev/capture
- chgrp printq /dev/capture
- chmod 777 /dev/capture
-
To create the queue, do the following:
- Enter smit mkpq.
- Choose:
- File File (in /dev directory)
- Choose the manufacturer of the selected printer.
- Choose the printer model.
- Name of existing FILE in /dev
- directory capture
- Enter queue names for various emulations and press Enter or DO.
- Enter smit mkpq.
-
Print to the file. Enter:
echo “AAAAA” | qprt -Pqueue_name (This is easy to find in the capture file.)
qprt -P<queue> <filename>
-
View the results and complete the following steps:
- Enter cat -v /dev/capture.
- To see the results, enter vi /dev/capture.
- To identify control characters, enter od -ca /dev/capture.
- Enter cat -v /dev/capture.
-
To rezero the capture file, enter:
cat /dev/null > /dev/capture’
Getting remote host information
#To be successful getting information, on the remote host rstatd daemon should be working.
rup hostname