Saturday, 28 August 2021

Read Smart Card Serial Number UID

import java.util.List;
import javax.smartcardio.*;

public class ReadCard {

public static void main(String[] args){
try {
TerminalFactory factory = TerminalFactory.getDefault();
List<CardTerminal> terminals = factory.terminals().list();
for (CardTerminal terminal : terminals){
System.out.println(terminal.getName());
if (terminal.isCardPresent()){
Card card = terminal.connect("*");
System.out.println("\t"+card);
ATR atr = card.getATR();
byte[] baAtr = atr.getBytes();
StringBuilder sb = new StringBuilder();
for(int i = 0; i < baAtr.length; i++ ){
sb.append(String.format("%02X:", baAtr[i]));
}
sb.setLength(Math.max(sb.length() - 1, 0));
System.out.println("\tATR = " + sb);
CardChannel channel = card.getBasicChannel();
byte[] cmdApduGetCardUid = new byte[] { (byte)0xFF, (byte)0xCA, (byte)0x00, (byte)0x00, (byte)0x00 };
ResponseAPDU respApdu = channel.transmit(new CommandAPDU(cmdApduGetCardUid));
if(respApdu.getSW1() == 0x90 && respApdu.getSW2() == 0x00){
byte[] baCardUid = respApdu.getData();
sb = new StringBuilder();
for(int i = 0; i < baCardUid.length; i++ ){
sb.append(String.format("%02X:", baCardUid[i]));
}
sb.setLength(Math.max(sb.length() - 1, 0));
System.out.println("\tCard UID = " + sb);
}
card.disconnect(false);
} else {
System.out.println("\tNo Card Present..");
}
}
} catch (CardException e) {
e.printStackTrace();
}
}
}

Thursday, 2 January 2014

Unix Commands

Find file name alongwith path containing given string.
find . -exec grep -q "mystring" '{}' \; -print
find . -exec grep -il JAVA_HOME {} \; | grep .sh
find / \( -name a.out -o -name '*.o' \) -atime +7 -exec rm {} \;
find . -type d -exec chmod g+rx {} \;
find . -type f -exec chmod g+rw {} \;
file * | grep -i "commands text" | cut -d ':' -f1 | xargs grep -i ldapsearch
lpstat -oprntr_1 | grep prntr_1 | cut -d ' ' -f1 | xargs cancel
ch_rc -a -p UMASK=137 /etc/default/security
find newer file`
touch -t yyyymmddhhmi <touch_filename>
find . -newer <touch_filename> -print
touch -t 199712020000 filename.ext
cpio -o filenmame > /dev/rmt0
cpio -icdv < filename
00 3 * * 0-4,6 /usr/sam/lbin/br_backup DAT FULL Y /dev/rmt/0mn /var/sam/graphOEAa24992 root Y 1 N > /var/sam/SAM_br_msgs 2>&1 #sambackup
fbackup -vf /dev/rmt/0m -i specifically include file/directory
frecover -xovf /dev/rmt/0m directory structure and overwrite any existing files
fbackup -vf /dev/rmt/0m 2>&1 log what is backed up, along with any
|tee /tmp/backup.log errors that occur
frecover -rNv -f /dev/rmt/0m 2>
/tmp/listing list of what is really on the tape
fbackup -0 -u -v -y -g {graphfile} {graphfile}_index -c /etc/sam/br/fbackup_config -d /var/adm/fbackupfiles/dates
create copy command
ls | awk '{printf "\ncp " $1" "$1}'
sort by size of file.
ls -al | sort -rn +4
To see active ports/ listening
netstat -a
timex nslookup <hostname>
Synchronize time with Net Time Server.
/sbin/init.d/xntpd stop  - you have to stop daemon for running following command.
/usr/sbin/ntpdate -d adsrvr01 (servername)
/sbin/init.d/xntpd start
0 2 * * * /usr/sbin/ntpdate -s -b -p 8 -u 192.168.100.11 2>&1
ntpdate -s -b -p 8 -u ntp.nasa.gov
on linux synchronize time to net time server
0 0 * * * ntpdate -d adsrvr01

To kill jobs
kill -9 `ps  -ef | grep frmweb | grep -v grep | awk '{print $2}'`
echo  `ps  -ef | grep f90web | grep 11: | grep -v grep | awk '{print $2}'`
To cancel job on printer
lpstat - to see job no
lpstat -o -i
lpstat -v
lpstat -p prntr_1
cancel jobno.
cancel -e <printername> cancel all jobs on this printer.
Oracle DocID.170881.1
How to Enable XDMCP on Oracle Linux / Red Hat Linux
Make changes in file /usr/share/gdm/defaults.conf, /etc/gdm/custom.conf
mostly you don't have to change in custom.conf
in vi how to convert uppercase/lowercase    Ctrl-V for ^V insertion of special characters
for lowercase
ESC>:%s/.*/\L&/
and in uppercase :
<ESC>:%s/.*/\U&/
in  /usr/share/gdm/defaults.conf
RemoteGreeter=/usr/libexec/gdmlogin
[xdmcp]
Enable=true
Adding unix printer
lpshut
lpadmin -p<printqueue name> -v/dev/null -m<model> -ocm<remote model> -osm<rsmodel) -ob3  -orm<machine name> -orplp -v/dev/null
enable prntr_1
accept prntr_1
lpsched
--this commoand worked on frmsrv2 hp unix HP-UX B.11.11
-- to create printer prntr_1 on machine prntr and port pr1 
-with no page break option model rmodel
Step 1.
edit /etc/hosts add entry for printer ip.
prntr 192.168.1.12
Step 2.
lpshut
lpadmin -pprntr_1 -v/dev/null -mrmodel -ormprntr -orppr1
lpadmin -pprntr_2 -v/dev/null -mrmodel -ormprntr -orppr2
enable prntr_1 prntr_2
accept prntr_1 prntr_2
lpsched
--To remove printer
lpadmin -xprntr_1
--To reject print jobs on particular printer
reject -r"Use alternate printer." laser1
--Command to give printing
/usr/bin/lp -dprntr_1 -oBSDh -oBSDl <filename>
-- -oBSDh means ignore banner
-- -oBSDl means ignore page break
--To move/transfer print from one spool to another.
-- Syntax lpmove <source spool name>-<job_id> <target spool name>
lpshut
lpmove prntr_1-8784 prntr_2
lpsched
at jobs crontab jobs
at -f job.sh now + 5 minutes
at -f /application/tmp/xy.sh now + 1 minutes > /application/tmp/xy1.log
at -f /appsoft/oracle/restartias.sh now + 1 minutes > /tmp/restartias.log

:!ls -lt /usr/lib/cron/at.allow
-r--r--r--   1 bin        bin             01 Apr 12  1990 /usr/lib/cron/at.allow
enable -c printer root:prntr_1
create -c printer -x " associated-queue='qprntr_1' attachment-type='tcpip' descriptor='' device-name='' list-of-managers='' message='' printer-community-name='' printer-locations='' printer-model='generic' printer-realization='physical' printer-tcpip-internet-address='192.168.5.1' printer-tcpip-port-number='9102'" root:prntr_1
unix default security setting in /etc/default/security
ps -ef | grep <process name> | grep -v grep | cut -c 10-15 | xargs kill -9
Find and kill all instances of a given process
ls /application/forms/Form1.fmb | xargs tar -cf fmbs.tar
Linux memory information
grep SwapTotal /proc/meminfo
grep MemTotal /proc/meminfo

1. Note:223285.1 :- Shell scripts to start and stop IAS 9.0.2.2 (Infrastructure - Middle tier) on Unix
2. Note:200475.1 :- 9iAS Release 2 (9.0.2) Start/Stop Instructions on Unix
http://forums.oracle.com/forums/thread.jspa?messageID=1214598&#1214598

How can I find the size of files and directories on UNIX?
du -sk directory_name
how to see kernel parameter
kmtune -q <parameter name>
sysdef | grep <parameter_name>
sysdef | grep maxfiles
use sam to change kernel parameter.

. /etc/rc.d/init.d/functions
#[ -x /usr/sbin/Xvfb ] || exit 0
RETVAL=0
#
# See how we were called.
#
start() {
        # Check if it is already running
        #if [ ! -f /var/lock/subsys/oxvfb ]; then
            echo -n $"Starting Xvfb daemon: "
            Xvfb :1 -screen 0 1024x800x8 -pn -fp /usr/lib/X11/fonts/misc -sp /etc/X11/xserver/SecurityPolicy -fbdir /usr/tmp &
            DISPLAY=$(hostname):1.0; export DISPLAY
            /usr/X11R6/bin/xhost + >/dev/null
            xclock -geometry -0+0 &

To see the content of virtual frame
xwud -in /usr/tmp/Xvfb_screen0

#! /bin/sh
df -kl | grep -iv filesystem |  awk '{ print $6" "$5}' | while read LINE; do
 PERC=`echo $LINE | cut -d"%" -f1 | awk '{ print $2 }'`
 if [ $PERC -gt 98 ]; then
   echo "${PERC}% ALERT"  | Mail -s "${LINE} on `hostname` is almost full"  admin@rocket.ugu.com
 fi
done

bdf |awk '{print $6" "$5}' |while read LINE; do
 echo substr($LINE, index($LINE," "), length($LINE))
done
bdf |awk '{print $6" "$5}' |while read LINE; do
 PERC=`echo $LINE | cut -d"%" -f1 | awk '{ print $2 }'`
 if [ $PERC -gt 98 ]; then
   PERC=PERC
 fi
done

if ping $1 3
then
{
echo  HELO ddex         # send domain name
sleep 1                         # wait 1 seconds for answer
echo MAIL FROM: oracle@srvr1.domain.com    # send passwd
sleep 1
echo RCPT TO: receiver@company.ae  # send userid@host
sleep 1
echo DATA
sleep 1
echo this is a test
echo line 2
echo .
echo quit
} | telnet $1 25
fi
su - root
# fdisk /dev/sda
The number of cylinders for this disk is set to 30515.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/sda: 255 heads, 63 sectors, 30515 cylinders
Units = cylinders of 16065 * 512 bytes
   Device Boot    Start       End    Blocks   Id  System
/dev/sda1             1      6375  51207156   83  Linux
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (6376-30515, default 6376):
Using default value 6376
Last cylinder or +size or +sizeM or +sizeK (6376-30515, default 30515): +50GB
Command (m for help): p
Disk /dev/sda: 255 heads, 63 sectors, 30515 cylinders
Units = cylinders of 16065 * 512 bytes
   Device Boot    Start       End    Blocks   Id  System
/dev/sda1             1      6375  51207156   83  Linux
/dev/sda2          6376     12750  51207187+  83  Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.
#
For more information on fdisk, see the fdisk(8) man page.

How to find number of cpu in linux
cat /proc/cpuinfo|grep processor
You might be able to infer the 32/64 bit setting from the results of:
uname -mp
Linux RHEL 4 AS X86 64 Bit version
Oracle 10g Rel 2 X86 64 Bit installation
require glib-devel package of both versions i.e. i386 and X86_64
to avoid installation error. crt1.o missing error.
I found necessary to explicitly add the i386 version of glibc-devel (I already had the x86_64 version installed, of course) otherwise I would get linking errors with crt1.o missing

HKEY_CURRENT_USER/Software/Microsoft/MediaPlayer/Player/RecentFileList
HKEY_CURRENT_USER/Software/Microsoft/MediaPlayer/Player/RecentURLList
HKEY_CURRENT_USER/Software/Microsoft/MediaPlayer/Preferences
"AddToMRU"=Binary "00"
3. In the right window double click on the key Binary value called "AddToMRU"
4. Double click that key and set the value to 00 (two zeros)
RunOnce
HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Run

Running Oracle HTTP Server as Root
On UNIX, you will hare to run as root if you want to run on ports less than 1024.
In order to run Oracle HTTP Server as root, perform the following steps:
Shutdown Oracle HTTP Server using the following command:
UNIX: ORACLE_HOME/opmn/bin> opmnctl [verbose] stopproc ias-component=HTTP_Server
Windows: ORACLE_HOME\opmn\bin> opmnctl [verbose] stopproc ias-component=HTTP_Server
Change to root user. Navigate to ORACLE_HOME/Apache/Apache/bin on UNIX or ORACLE_HOME\Apache\Apache\bin on Windows and execute the following command:
chown root .apachectl     <--- don't miss the "."  dot is important
chmod 6750 .apachectl

Exit root.
Restart Oracle HTTP Server using the following command:
UNIX: ORACLE_HOME/opmn/bin> opmnctl [verbose] restartproc ias-component=HTTP_Server
Windows: ORACLE_HOME\opmn\bin> opmnctl [verbose] restartproc ias-component=HTTP_Server

when jsp report is not running remove it from following cache.
/appsoft/oracle/ora9ias_home/j2ee/OC4J_Demos/application-deployments/reportsDemo/web/persistence/_pages/_examples/_tools
/appsoft/oracle/ias/j2ee/OC4J_BI_Forms/application-deployments/reports/web/persistence/_pages/_examples/_tools
mount -t iso9660 -r /dev/cdrom /media
How to edit /etc/fstab when at Fedora Repair filesystem prompt?
Repair filesystem # mount -w -o remount /
After this you can go and change /etc/fstab file. Restart your computer and that's it.

FRM-92101 /93000 Error log file location
/appsoft/oracle/ias/j2ee/OC4J_BI_Forms/application-deployments/formsapp/OC4J_BI_Forms_default_island_1
application.log
cmviewcl
cmruncl
cmruncl -f -n db1
cmgetconf -v
vi cluster.ascii
cmquerycl -v -n db1 -C dummyfile.ascii
diskinfo -v /dev/dsk/c12t0d0
vgdisplay -v /dev/vg01
strings /etc/lvmtab
cd /etc/cmcluster
cmcheckconf -v -C /etc/cmcluster/cluster.ascii
cmapplyconf -v -C /etc/cmcluster/cluster.ascii
How can I extract a tar.gz or .tgz file?
Files with extension tar.gz or .tgz are tar files compressed with gzip. On Unix extract them with:
    gunzip < file.tar.gz | tar xvf -
    gunzip < file.tgz    | tar xvf -
If you have GNU tar you can use the z option directly:
    gtar xvzf file.tar.gz
    gtar xvzf file.tgz

rwclient.sh report=GETHOST.rdf paramform=no batch=yes destype=LOCALFILE desformat=delimited desname=/tmp/abc.lis server=rep_srvr1_ias userid=scott/tiger@orcl
Change title of oracle forms window
In formsweb90.cfg add a parameter
webformsTitle=My App Title
In your base*.html files add the following line
<PARAM NAME="webformsTitle" VALUE="%webformsTitle%">
and for the pluginspage
webformsTitle="%webformsTitle%"
to find report server running in network
9i osfind
10g rwdiag -findAll
ppt recent files
HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\PowerPoint\Recent File List
AddToMRU
Form with EXEC_SQL.CONNTYPE; commands Accounts Gen Ledger Function 5

analyze table emply_photograph validate structure cascade;
creating blob
create table emply_photograph as select * from emply_photograph@db;
emctl clearstate agent
setting sendmail as client.
/etc/rc.config.d/mailservs
export SENDMAIL_SERVER=0
export SENDMAIL_SERVER_NAME=mail.domain.com (SMTP server name)
export SENDMAIL_RECVONLY=0
export SENDMAIL_SENDONLY=0

configure server for sending mail.
1.add entry into /etc/resolv.conf
db /etc===>cat resolv.conf
nameserver 192.168.10.111     # adsrvr01.domain.co
2.in /etc/mail/sendmail.cf
# "Smart" relay host (may be null)
DSexchsrvr
3. restart sendmail service
/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start
4.
sendmail -bv contact@gmail.com
sendmail -d21.12 -bv contact@gmail.com
echo '3,0 contact@gmail.com' | sendmail -d21.12 -bt
mailx -s "test" contact@gmail.com < sendmail.cw
uuencode db8_dlyvfy.log db8_dlyvfy.log | mailx -m -s "test" contact@gmail.com
get only printable characters from file dmp
strings $1 | fold -w 2040 | tr 'a-z' 'A-Z' | tr '\t' ' ' >  ft0.out
Enabling Remote Desktop service on another comptuer
Desktop -> My Computer -> Right Click - Manage - Pulldown Menu - Action - Connect to Another Computer
Local Users & Groups -> Groups -> Remote Desktop Users

etisalat to receive settings for wayek *122*243#  (122 for wasel, 125 for gsm)
*122# interactive configuration
*125# interactive subscription.
export LIBXCB_ALLOW_SLOPPY_LOCK=1
export LD_LIBRARY_PATH=/usr/X11R6/lib
Backup command
00 3 * * 0-4,6 /usr/sam/lbin/br_backup DAT FULL Y /dev/rmt/0mn /var/sam/graphOEAa24992 root Y 1 N > /var/sam/SAM_br_msgs 2>&1 #sambackup
0 * * * 0-4,6 /usr/local/bin/dskspcalrt.sh 2>&1
Arabic support in reports
Here are my original notes on how to convert the Windows core TTF fonts and get the AFM files for use on HP-UX with iAS 1.0.2.2.
1)     Download the t1 library (t1lib-1.3.1-bin.zip), freetype library (freetype-2.0.5-bin.zip), and the TrueType to PostScript utility (ttf2pt1-3.4.0-bin.zip) from any source that supports the GNU project such as sourceforge.net. Install them in the directory \ttf
2)     Copy the TrueType fonts from c:\orant\fonts to the \ttf\bin directory
3)     Create a file using dir /b > convert.bat and use a regular expression find and replace capable text editor to change each line to say "ttf2pt1 filename.ttf".
4)     Run convert.bat
5)     Use "find "FontName" *.AFM > convert2.bat" to create a file with all each filename and each FontName.
6)     Create the directory \ttf\bin\AFM
7)     Use a regular expression find and replace capable text editor to change each line to say "move filename.TTF.afm AFM\FontName". Note that the filename must be exactly the same as the FontName field in the file.
8)     Execute convert2.bat
9)     ftp (ascii) the AFM directory to $ORACLE_HOME/guicommon6/tk60/admin/AFM
10)     In Unix, do an "ls -1 > include.txt" of the AFM directory
11)     Use sed or the above editor to make each line like " *Font FontName: Standard "(001.006S)" Standard ROM"
12)     In the admin/PPD directory, copy the default.ppd file to custom.ppd.
13)     Change the fonts section of this file to have the include.txt file instead.
14)     Make sure that uiprint.txt contains the custom.ppd definition.
15)     Make sure that TK_PRINTER and PRINTER env vars for Reports Server are set to the custom.ppd printer from uiprint.txt. Make sure that TK_PRINT_STATUS is set to echo.
16)     For each font family that has a Global section alias in uifont.ali to convert to lowercase (for HTML X fonts), add a FamilyName=FamilyName under the [ PDF ] section of uifont.ali. For example, if you have Arial=arial under [Global], add Arial=Arial under [PDF].

Be sure to install Motif (32 Bit). And get this... the SuSE ES9 will likely have a newer version of Motif than Forms Server will accept, so you will need to be sure to install the correct version. If you just want to get it to install, but don't want to compile forms, you can get it to work with a link, but then frmcmp.sh won't work:
ln -s libXm.so.3 libXm.so.2

DFDE.tmp cddda
shmmax - 28-jul-08 Old Value 8589934592  New Value 12884901888
rpm -qa --queryformat "%{NAME}:-%{VERSION}:-%{RELEASE} (%{ARCH})\n" | grep libXm
/usr/bin/find / ! -fstype nfs -only ! -path /export/private_roots/* -group 2001 -print -exec /usr/bin/chgrp -h dba {} ;
/usr/bin/chgrp -h dba
4206,4741
PS1="
$(/usr/bin/whoami)@$(/usr/bin/hostname) [\$PWD]
# "
PS1="[$(/usr/bin/whoami)@$(/usr/bin/hostname)]\$ "; export PS1

get IP address of machine
netstat -in
getip dbmach1

Your system has been configured as a standalone system with the system
name DBMACH01.  If and when you have obtained a network Internet
Protocol address (IP address) from your network administrator, you may
run this command to set it up:
    /sbin/set_parms ip_address
To completely set up networking, you may also have to set up a 'netmask'
and a networking communications gateway.  If servers exist at your site,
you can additionally have your system use the Domain Name System (also
known as BIND), a system name-to-IP address lookup service, and/or the
Network Information Service (NIS).  The features noted in this paragraph
can all be set by running:
    /sbin/set_parms addl_netwrk
Following is a summary of useful 'set_parms' functions and how to call them.
You should be 'root'.  Some of these will require a system reboot for them
to take full effect.
    /sbin/set_parms hostname
        This will allow you to change the system name, but it's only
        recommended soon after initial system installation and before
        loading and configuring optional software.
    /sbin/set_parms timezone
        Provides an interactive interface to change the time zone that
        the system believes it's in.
    /sbin/set_parms date_time
        Provides an interactive interface to set the date and time.
    /sbin/set_parms ip_address
        Allows you to set or change your IP address.  Please use with
        caution if changing your IP address.
    /sbin/set_parms addl_netwrk
        Allows you to set up the use of network gateways, the Domain Name
        System (DNS), and the Network Information Service (NIS).

cpq082/compaq03
rman target sys/ma5kpa55@db auxiliary sys/db2mgr@db2

lastgoodlogin=$(last -2 $(whoami) | tail -1| awk '{print $3,$4,$5,$6,"on", $2}')
lastbadlogin=$(lastb -1 $(whoami)| awk '{print $3,$4,$5,$6,"on", $2}')
echo "Last successful Login for $(whoami): ${lastgoodlogin}"
echo "Last unsuccessful Login for $(whoami): ${lastbadlogin}"
cad075
21,22,28,29,30,88
ipconfig /all
psftp 192.25.97.165 -l oracle -pw oracle123 -b ff
putty 192.25.97.165 -l oracle -pw oracle123 -m sea.sh
psftp 192.16.100.83 -l oracle -pw oracle123 -b ff
putty 192.16.100.83 -l oracle -pw oracle123 -m sea.sh
psftp 192.16.100.83 -l oracle -pw orcl -b ff

/sbin/init.d/nfs.client stop
/sbin/init.d/nfs.server stop
/sbin/init.d/nfs.core stop
/sbin/init.d/nfs.core start
/sbin/init.d/nfs.server start
/sbin/init.d/nfs.client start
192.25.18.45
nfs
config files
/etc/exports, /etc/rc.config.d/nfsconf
/sbin/init.d/nfs
NFS Server :
# hostname
windux1
# more /etc/exports
/data1 -root=windux3.ind.hp.com -ac
cess=windux3.ind.hp.com
# exportfs -va
re-exported /data1
NFS Client :
mount ddwspdb1:/archive/flash_recovery_area /archive/flash_recovery_area
# hostname
windux3
# mount windux3.ind.hp.com:/data1 /windux1
mount db:/archive/db/rman_bkup /archive/db/rman_bkup
mount frmsrv:/appdocs /appdocs
/etc/exports
/var/opt/ignite/clients -anon=2
/application/live -anon=65534,access=frmsrv2
/appdocs -anon=65534
--
entry into db /etc/fstab
db:/archive /archive nfs proto=tcp,forcedirectio,vers=3,rw,hard,intr,bg,rsize=32768,wsize=32768 0 2
mount /archive
--

Here's what eventually worked (and could be mounted from 11.31 and 11.11)...
Option 1
Manually share the directory from the command prompt:
# share -F nfs -o rw -d "NCD OCX boot directory" /opt/ncd/tekxp/boot
share -F nfs -o rw -d "File Dump" /fldump
This causes an entry to be added to /etc/dfs/sharetab:
# cat sharetab
/opt/ncd/tekxp/boot - nfs rw NCD OCX boot directory
This entry is removed when the directory is unshared.
Option 2
Add an entry to /etc/dfs/dfstab, the syntax of which is exactly the same as the manual ‘share’ command, then run shareall…
Add the following to /etc/dfs/dfstab:
share -F nfs -o rw -d "NCD OCX boot directory" /opt/ncd/tekxp/boot
share -F nfs -o rw -d "File Dump" /fldump
Then run the shareall command
# shareall -F nfs
This causes an entry to be added to /etc/dfs/sharetab:
# cat sharetab
/opt/ncd/tekxp/boot - nfs rw NCD OCX boot directory
This entry is removed when the directory is unshared.


Windows spooler command.
net stop spooler
del %systemroot%\system32\spool\printers\*.shd
del %systemroot%\system32\spool\printers\*.spl
net start spooler
ioscan -f |grep lan
lanscan -q or -v
ifconfig lan900
nwmgr
lanscan
netstat -in or -rn
lanadmin -x 1
hp-ux machine information command : machinfo
ifconfig lan0 192.168.1.1 up
/usr/contrib/bin/machinfo
/usr/sbin/dmesg
/usr/sbin/vgdisplay -v vg00
/usr/sbin/vgdisplay -v
/usr/sbin/lvlnboot -v
/usr/sbin/setboot -v
/usr/sbin/swapinfo -tam
/usr/sbin/olrad -q
/usr/sbin/ioscan -fnk
/usr/sbin/ioscan -fnkCdisk
/usr/sbin/ioscan -fnkCtape
/usr/sbin/ioscan -fnkCfc
/usr/sbin/ioscan -fnkCfc | grep ^fc | awk '{print "/dev/"$4$2}' | /usr/bin/xargs
 -t -i /opt/fcms/bin/fcmsutil {}
top memory utilizing processess.
/usr/sbin/swapinfo -tam
UNIX95=1 ps -e -f -o sz,vsz,ruser,uid,pid,args |sort -rnk1 |head -n 20
ipcs -ma

INSERT INTO WWSSO_PSEX_USER_INFO$ ( SUBSCRIBER_ID, SSO_USERNAME, APP_ID, APP_CREATOR, FLD_INDEX,
APP_USERNAME, APP_PASSWORD, FNAME1, FVAL1, FNAME2, FVAL2, FNAME3, FVAL3, FNAME4, FVAL4, FNAME5,
FVAL5, FNAME6, FVAL6, FNAME7, FVAL7, FNAME8, FVAL8, FNAME9, FVAL9, USER_PREFS ) VALUES (
1, '1326', '1326', 'ORASSO_DS', '101', '192D6FCEA9855509B778D941A924013F', 'DFE552EED6A828E9F668DE97496E6647'
, 'eul', 'SCOTT', 'connection_name', 'Discoverer Video Store Connection', 'show_details'
, 'false', 'database', 'discodemo', 'null', 'null', 'null', 'null', 'null', 'null'
, 'null', 'null', 'null', 'null', 'null');
COMMIT;
-rw-rw-r--   1 oracle     sys            704 May  1  2008 oratab
NLS_LANG=AMERICAN_AMERICA.AR8MSWIN1256

export PS1=[`hostname`]'$PWD $'
enabling namingservice in place of multicast and integrate with opmn
files involved opmn.xml, targets.xml, rwservlet.properties rwservlet.conf
1. rwservlet.conf
disable multicast by commenting <!--
enable naming service.
<namingService name="Cos" host="sgap.domain.com" port="14021"/
2.rwservlet.properties
SERVER_IN_PROCESS=YES
3.remove entry of report server from targets.xml
4.add entry of report server in opmn and targets using following command
addNewServerTarget.sh rep_sgap_ias
5.opmn.xml, targets.xml

C:\>%OMH%\dcm\bin\dcmctl.bat updateconfig -ct opmn -v -d
C:\>%OMH%\ dcm\bin\dcmctl.bat resyncinstance -v -d

/etc/bashrc
if [ $UID -gt 99 ] && [ "`id -gn`" = "`id -un`" ]; then
    umask 002
else
    umask 002
fi
For changing the default umask value in hpux
Hi I am using hp-ux 11.11
my user login shell is /usr/bin/ksh
I am wondering from where the umask variable 022 it is taking.
I have found its not defined in
$HOME/.profile
$HOME/.login
$HOME/.cshrc
/etc/profile
afte loggin in I have executed umask and system given 022.
$ umask
022
it's in /sbin/rc
grep -i umask /sbin/rc
hope this helps
1. add "umask=137" line in /etc/profile
2. ch_rc -a -p UMASK=137 /etc/default/security

windows terminal services kill session mstsc tsadmin remote desktop
tsadmin.exe - to kill sessions.
Ignite backup.
/opt/ignite/bin/make_tape_recovery -v -I -x inc_entire=vg00 -a /dev/rmt/0mn
#Script Start
#/usr/bin/sh
typeset IGNITEDIR=/var/opt/ignite/recovery/latest
typeset IGNITEMAN=${IGNITEDIR}/manifest
typeset IGNITE_RC
#
/opt/ignite/bin/make_tape_recovery -x inc_entire=vg00 -I -v -a /dev/rmt/0mn
#
IGNITE_RC=$?
#
mailx -s "IGNITE Notification (rc=${IGNITE_RC})" root < ${IGNITEMAN}
#ScriptEnd

/usr/dt/bin/dtterm -ls -display 192.25.100.149:0
         MsgBox Format(inWrkSht.Cells(i, 1), "mmmm")
alphabet="a b c d e"   # Initialise a string
count=0     # Initialise a counter
for letter in $alphabet   # Set up a loop control
do     # Begin the loop
    count=`expr $count + 1`  # Increment the counter
    echo "Letter $count is [$letter]" # Display the result
done     # End of loop

to reactivate account on unix server
/usr/lbin/modprpw -l -k oracle
/usr/lbin/modprpw -l -k usersa
replacement for frecover,fbackup
pax command
pax -v -w -f /dev/rmt/0mn /tmp
pax -vf /dev/rmt/0mn

pax -v -r -f /dev/rmt/0mn -s,tmp/kernelinfo.txt,var

pax -v -w -f /dev/rmt/0mn /tmp
pax -vf /dev/rmt/0mn
model
mt -t /dev/rmt/0mn rew
mt -t /dev/rmt/0mn fsf 22
pax -vf /dev/rmt/0mn
mt -t /dev/rmt/0mn fsf 1
pax -r -s '//*etc//*,,' -f /dev/rmt/0mn
pax -vf /dev/rmt/0mn
mt -t /dev/rmt/0mn rew
pax -vf /dev/rmt/0mn
pax -r -s '!/*tmp/*!!' -f /dev/rmt/0mn
pax -r -s '!/kernelinfo.txt/!!' -f /dev/rmt/0mn
mt -t /dev/rmt/0mn rew
pax -vf /dev/rmt/0mn
pax -r -s '!/kernelinfo.txt/!!' -f /dev/rmt/0mn

Description: Specifies the maximum number of connection requests that the operating system can queue when the server does not have available threads. When high connection rates occur, a large backlog of TCP/IP connection requests builds up and client connections are dropped. Adjust this setting when clients start to time out after waiting to connect. Verify this situation by issuing the netstat -p tcp command. Look for the following value: connect requests dropped due to full queue
How to view or set: Set this parameter by using the ndd -set /dev/tcp tcp_conn_request_max 8192 command.
Default value: 4096
Recommended value: In most cases the default is sufficient. Consider adjusting this value to 8192, if the default proves inadequate.
ndd -set /dev/tcp tcp_keepalive_interval 7200000
ndd -set /dev/tcp tcp_conn_request_max 8192
ndd -set /dev/tcp tcp_conn_request_max 8192

JetDirect jet direct printer
/opt/hpnpl/admin/hppi
addqueue -h 12.34.56.78 -q myprinter -t off -b off -r off
#!/bin/sh
lpname=$1
host=$2
/usr/sbin/lpshut
/usr/sbin/lpadmin -p${lpname} -v/dev/null -mrmodel -ocmrcmodel \
-osmrsmodel -ob3 -orm${host} -orp${lpname} -v/dev/null
/usr/sbin/lpsched
/usr/bin/enable ${lpname}
/usr/sbin/accept ${lpname}

/etc/inetd.conf
ftp          stream tcp nowait root /usr/lbin/ftpd      ftpd -a -u 002
/usr/bin/find / ! -fstype nfs -only ! -path /export/private_roots/* -group 106 -print -exec /usr/bin/chgrp -h dba {} ;

 0-6, 0=Sunday

tmpfl=`/usr/bin/mktemp`
tmpfl1=`/usr/bin/mktemp`
echo "bin"  > $tmpfl
echo lcd $cmppath >> $tmpfl
      echo delete $fmx >> $tmpfl
      echo put $fmx >> $tmpfl
echo "bye" >> $tmpfl
echo "!" >> $tmpfl
echo "ftp -i dwseaap3 <<!"  > $tmpfl1
echo "cd /application/shpng/forms"  >> $tmpfl1
cat $tmpfl >> $tmpfl1
sh $tmpfl1
rm -f $tmpfl
rm -f $tmpfl1

@echo off

"c:\program files\putty\pssh.exe" vmware@my-linux-server "/home/vmware/bin/vmstart myVM"

How to enable root account
boot system in single user mod
#boot pri
#hpux -is
#mount /usr
#/usr/lbin/modprpw -k root 
- if you are not getting /usr file system then follow following steps
#mount /usr
- if /usr is not mounting then use following
#fsck /usr
- if fsck is saying corruped file system then use following
# fsck /dev/vg00/lvol??  -fill in volume number shown in above command.
/usr/lbin/modprpw -k oracle 
--to initialize the password of root
vi /tcb/files/auth/r/root
remove value infront of u_pwd=
audisp -u root `audsys | grep "current file" | head -1 | cut -d":" -f 2`
audsys
unix system auditing.
configuration file /etc/rc.config.d/auditing
#START /etc/rc.config.d/auditing
Here is an example of an /etc/rc.config.d/auditing file;
AUDITING=1
PRI_AUDFILE=/.secure/etc/files/file1
PRI_SWITCH=10000
SEC_AUDFILE=/.secure/etc/files/file2
SEC_SWITCH=10000
AUDEVENT_ARGS1=" -P -F   -e exec -s execv -s execve"
AUDEVENT_ARGS2=""
AUDEVENT_ARGS3=""
AUDEVENT_ARGS4=" -p -f   -s __cnx_gsched_ctl -s __cnx_p2p_ctl -s _set_mem_window -s accept -s access -s acct -s acl -s adjtime -s audctl -s audswitch -s audtag -s bind -s chdir
-s chmod -s chown -s chroot -s clock_settime -s close -s connect -s creat -s exit -s exportfs -s fattach -s fchdir -s fchmod -s fchown -s fdetach -s fork -s fsetacl -s fstat -s
fstat64 -s ftruncate -s ftruncate64 -s getaccess -s getksym -s kill -s ksem_close -s ksem_open -s ksem_unlink -s lchmod -s lchown -s link -s lockf -s lockf64 -s lstat -s lstat64
 -s mem_res_grp -s mkdir -s mknod -s mlock -s mlockall -s mmap -s mmap64 -s modadm -s modload -s modpath -s modstat -s moduload -s mount -s mpctl -s mq_close -s mq_open -s mq_un
link -s msgctl -s msgget -s munlock -s munlockall -s munmap -s nsp_init -s open -s pipe -s plock -s privgrp -s pset_assign -s pset_bind -s pset_create -s pset_destroy -s pset_se
tattr -s ptrace -s ptrace64 -s putpmsg -s reboot -s rename -s rmdir -s rtprio -s sched_setparam -s sched_setscheduler -s semctl -s semget -s semop -s semtimedop -s sendfile -s s
endfile64 -s serialize -s setacl -s setaudid -s setaudproc -s setcontext -s setdomainname -s setevent -s setgid -s setgroups -s setpgid -s setpgrp -s setpgrp2 -s setpgrp3 -s set
priority -s setprivgrp -s setregid -s setresgid -s setresuid -s setrlimit -s setrlimit64 -s setsid -s settimeofday -s settune -s setuid -s shm_open -s shm_unlink -s shmat -s shm
ctl -s shmdt -s shmget -s shutdown -s sigqueue -s socket -s socket2 -s socketpair -s socketpair2 -s spuctl -s stat -s stat64 -s stime -s swapon -s symlink -s t64migration -s too
lbox -s truncate -s truncate64 -s ttrace -s ulimit -s umask -s umount -s umount2 -s unlink -s utssys -s vfork -s vfsmount"
AUDOMON_ARGS=" -p 20 -t 1 -w 90"
#END /etc/rc.config.d/auditing
#audsys
auditing system is currently on
current file: /.secure/etc/files/file2
next file: none
statistics- afs Kb used Kb avail % fs Kb used Kb avail %
current file: 100000 0 100 0 0 100
next file: none
warning: audit file /.secure/etc/files/file2 doesn't exist

#cd /.secure/etc/files
#touch file3
#touch file4
#audsys -c file3 -s 100000 -x file4 -z 100000
#audsys
auditing system is currently on
current file: /.secure/etc/files/file3
next    file: /.secure/etc/files/file4
statistics-     afs Kb  used Kb  avail %    fs Kb  used Kb  avail %
current file:   100000        0      100  8388608  1057419       87
next    file:   100000        0      100  8388608  1057419       87
/usr/sbin/audsys -x /.secure/etc/audfile2 -z 4096 -c /.secure/etc/audfile1 -s 4096

PATH environment in regedit registry
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
C:\Program Files\Microsoft Office\OFFICE12
ldapsearch ldap openldap
ldapsearch -x -h ADMACH01 -D "CN=Ja Ni,OU=Computer Systems,DC=MYDOMAIN,DC=COM" -w SecretPassword -L "(&(objectCategory=person)(EmployeeID=E001))"
ldap.conf

done < g.ldif > g_out.txt

linux command
ldapsearch -x -D "CN=AD ERP,OU=Admin Accounts,OU=Computer System,DC=MYDOCMAIN,DC=COM" -w SecretPass -L "(&(objectCategory=person)(EmployeeID=E001))"
HPUX command
export LDAP_BASEDN=DC=MYDOMAIN,DC=COM or use this : -b "dc=MYDOMAIN,dc=COM"
/opt/ldapux/bin/ldapsearch -D "CN=Ja Ni,OU=Computer System,DC=MYDOMAIN,DC=COM" -w SecrePass -p 389 -h ADMACH01 "cn=Ja Ni"
./ldapsearch -D "CN=Ja Ni,OU=Computer System,DC=MYDOMAIN,DC=COM" -w SecrePass -p 389 -h ADMACH01 -b "dc=MYDOMAIN,dc=COM" -s sub "(objectclass=*)" sn cn
./ldapsearch -D "cn=AD ERP,ou=Admin Accounts,ou=Computer System,dc=MYDOMAIN,dc=COM" -w SecrePass -p 389 -h ADMACH01 -b "dc=MYDOMAIN,dc=COM" -s sub "(objectclass=user)" sn cn
./ldapsearch -1 -D "cn=AD ERP,ou=Admin Accounts,ou=Computer System,dc=MYDOMAIN,dc=COM" -w SecrePass -p 389 -h ADMACH01 -b "dc=MYDOMAIN,dc=COM" -s sub "cn=Ja Ni" cn sn mail title
./ldapsearch -1 -D "cn=AD ERP,ou=Admin Accounts,ou=Computer System,dc=MYDOMAIN,dc=COM" -w SecrePass -p 389 -h ADMACH01 -b "dc=MYDOMAIN,dc=COM" -s sub "cn=Ja Ni" proxyAddresses
./ldapsearch -D "cn=AD ERP,ou=Admin Accounts,ou=Computer System,dc=MYDOMAIN,dc=COM" -w SecrePass -p 389 -h ADMACH01 -b "dc=MYDOMAIN,dc=COM" -s sub "(&(objectCategory=person)(EmployeeID=E001))" sn cn
/opt/ldapux/bin/ldapsearch -D "cn=AD ERP,ou=Admin Accounts,ou=Computer System,dc=MYDOMAIN,dc=COM" -w SecrePass -p 389 -h ADMACH01 -b "dc=MYDOMAIN,dc=COM" -s sub "(&(objectCategory=person)(EmployeeID=E001))" sn cn

/opt/ldapux/bin/ldappasswd -h ADMACH01 -p 389 -b "dc=MYDOMAIN,dc=COM" -D "cn=AD ERP,ou=Admin Accounts,ou=Computer System,dc=MYDOMAIN,dc=COM" -w SecrePass -l root
export LDAP_BINDDN="cn=AD ERP,ou=Admin Accounts,ou=Computer System,dc=MYDOMAIN,dc=COM"
export LDAP_BINDCRED=SecrePass
export LDAP_HOST=ADMACH01
export LDAP_BASEDN="dc=MYDOMAIN,dc=COM"
export LDAP_SCOPE=sub
/opt/ldapux/bin/ldapsearch -h ADMACH01 -D "cn=AD ERP,ou=Admin Accounts,ou=Computer System,dc=MYDOMAIN,dc=COM" -w SecrePass -p 389 -b "dc=MYDOMAIN,dc=COM" -s sub "(&(objectCategory=person)(EmployeeID=E001))" sn cn
vi /etc/opt/ldapux/ldapux_profile.ldif
LDAP-UX Client Services Setup Program
Enter the distinguished name (DN) of the directory user allowed
to extend the schema.
To accept the default shown in brackets, press the Return key.
User DN [cn=Directory Manager]:

cn=Directory Manager
Password:SecrePass
/opt/ldapux/bin/ldapsearch "(&(objectCategory=person)(EmployeeID=E001))" sn cn

/opt/NetApp/santools/bin
./sanlun lun show -p
pvs
pvscan
vgs
vgscan
lvs
lvscan
vgmerge
vgremove
vgrename
vgerduce
pvextend
pvremove
pvcreate
pvmove
lvcreate
lvextend
lvrename
lvreduce

raw devices
http://download.oracle.com/docs/cd/E11882_01/install.112/e19212/storage.htm#CWLIN313
/bin/rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n" | grep -ie 'kernel\|oracle' | sort
/bin/ls -l /dev/oracleasm/disks/ /etc/sysconfig/oracleasm /etc/sysconfig/oracleasm-_dev_oracleasm /var/log/messages* - /var/log/dmesg  /var/log/oracleasm
# Collect measurements at 10-minute intervals
0,10,20,30,40,50   * * * *   /usr/lib/sa/sa1
# Create daily reports and purge old files
0                  0 * * *   /usr/lib/sa/sa2 -A
0 * * * 0-6 /usr/lib/sa/sa1
20,40 8-17 * * 1-5 /usr/lib/sa/sa1
5 18 * * 1-5 /usr/lib/sa/sa2 -s 8:00 -e 18:01 -i 1200 -A


sar -f /var/adm/sa/sa28 -s 06:30 -e 18:00 -w -q -i 4
Output of sar -d (showing disk activity)
iostat for monitoring disk io
iostat 5
alias pcpu='UNIX95=1 ps -ef -o pcpu,user,pid,args | /bin/sort -u -r | sed -e '\''s/\.[0-9][0-9]/&\%/g'\'' | sed -n 1,15p'

/usr/contrib/bin/X11/xinit /etc/X11/xvfb.xinitrc -- /usr/bin/X11/Xvfb :1 -nolisten tcp -screen 0 1024x768x8 -pn -fp /usr/lib/X11/fonts/misc -fbdir /usr/tmp

event monitoring
/etc/opt/resmon/lbin===>./monconfig
ioscan for memory modules.
# echo "selclass qualifier memory;info;wait;infolog"|cstm > /tmp/meminfo
chk free and available memory.
swapinfo -tam

swapinfo -tam|grep memory| awk 'BEGIN {"date +%H:%M" | getline out ; printf("%s%s\n",out,$1);}'
echo `date +%H:%M`|awk 'BEGIN{printf("%s\n",$0);}'
echo `date` |awk '{ printf("%s%s",$0,system("date +%H:%M"))}'
swapinfo -tam|grep memory| awk '{"date +%H:%M"|getline out; printf("%s%s\n",out,$0);}'
sudo sudoers sudo conf
/usr/local/etc/sudoers
/opt/iexpress/sudo/etc/sudoers
User_Alias      ADMUSR = jani, usersa, suka
Cmnd_Alias      ADMCMD = /usr/sbin/sam, /usr/bin/su, /usr/lbin/modprpw, \
                         /usr/sbin/shutdown, /usr/sbin/reboot, /usr/bin/kill, \
                         /usr/bin/sh, /usr/bin/csh, /usr/bin/ksh, \
                         /usr/bin/chown, /usr/bin/chmod, /usr/bin/ksh \
                         /usr/bin/cancel, /usr/bin/enable, /usr/bin/disable, \
                         /usr/sbin/lpsched, /usr/sbin/lpshut, \
                         /usr/sbin/lpadmin, /usr/sbin/smh, /usr/bin/cp
ADMUSR ALL=(root) NOPASSWD: ADMCMD

"C:\Program Files\Java\jre6\bin\keytool" -v -list -keystore "C:\Program Files\Java\jre6\lib\security\cacerts" -storepass changeit

"C:\Program Files\Java\jre6\bin\keytool" -printcert -file d:\newcert.csr
"C:\Program Files\Java\jre6\bin\keytool" -import -file I:\SETTINGS\OracleAmerica.csr
keytool  -alias susan
   -file Example.cer -keystore exampleraystore
.
http://superuser.com/questions/281682/import-java-trusted-certificate-to-jre
We had a similar problem here trying to avoid certificate acceptance pop ups on signed applets. We found a fix, it's not pretty, but it seems to have worked so far. Every user has a trusted.certs keystore (depending on OS it's somewhere under /AppData...Sun/Java/Deployment/trusted.certs) that is generated the first time they access an applet on the given machine. You can have a startup script replace this file for each user from somewhere central. To create the new trusted.certs file, we have just accepted the certs on a single machine that we want in there, and then copy that entire trusted.certs keystore over to the new machine.
Loading into the central cacerts keystore for the jre did not work for us, so we went this other route. It's ugly, and if you had the pasword to that keystore you could also set that via batch script as above, but is what we did.
This approach made the most sense to us since it worked on a user by user basis, and since it's tied to a logon, it allows for centralized administration and mass updates.
I hope that helps.

C:\Documents and Settings\ni\Application Data\Sun\Java\Deployment\security
trusted.certs
I found people needing to do this sort of programatic way to insert a certificate for signed applets. If you don't want your users to have to say "Yes, I trust this", then you need to do this 1 time for them.
Since this thread seems to come up at the top on google searches for this sort of topic, here is the command to help you out. At least, it worked for me!
C:\Program Files\Java\jre1.5.0_11\bin\keytool -import -alias MyAlias -file c:\my_cert.csr -keystore "C:\Documents and Settings\myuserid\Application Data\Sun\Java\Deployment\security\trusted.certs" -storepass "" -noprompt
keytool -list -v -keystore C:\Documents and Settings\ni\Application Data\Sun\Java\Deployment\security\trusted.certs
keytool -import -alias deploymentusercert6305970205670630427 -file d:\OracleUSA.csr -keystore "C:\Documents and Settings\ni\Application Data\Sun\Java\Deployment\security\trusted.certs" -storepass "" noprompt

So basically the key points here are:
1 - you need keytool
2 - determine your alias and obtain your cert file
3 - Figure out the path to your userids trusted.certs store file
4 - the storepass password is blank or ""
5 - noprompt is good for a batch file otherwise you will see a message like "Are you sure you wish to import..... [yes/no]"


working command to view trusted certificates in users profile.
OracleUSA.csr
keytool -list -v -keystore "C:\Documents and Settings\ni\Application Data\Sun\Java\Deployment\security\trusted.certs" -storepass ""
to import certificate
keytool -import -alias deploymentusercert6305970205670630427 -file d:\OracleUSA.csr -keystore "C:\Documents and Settings\ni\Application Data\Sun\Java\Deployment\security\trusted.certs" -storepass "" -noprompt

db /etc===>vgscan
vgscan: Couldn't access the list of physical volumes for volume group "/dev/vg01".
vgscan: Couldn't access the list of physical volumes for volume group "/dev/vg02".
vgscan: Couldn't access the list of physical volumes for volume group "/dev/vg03".
vgscan: Couldn't access the list of physical volumes for volume group "/dev/vg04".
vgscan: Couldn't access the list of physical volumes for volume group "/dev/vg05".
vgscan: The physical volume "/dev/dsk/c0t6d0" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c3t6d0s2" is already recorded in the "/etc/lvmtab" file.
Couldn't stat physical volume "/dev/dsk/c1t2d0":
Invalid argument
db /etc===>ll /dev/vg*

db /etc===>vgimport vg01 /dev/dsk/c4t0d0 /dev/dsk/c5t0d0
Warning: A backup of this volume group may not exist on this machine.
Please remember to take a backup using the vgcfgbackup command after activating the volume group.
db /etc===>vgchange -a y vg01
Activated volume group
Volume group "vg01" has been successfully changed.
db /etc===>vgcfgbackup vg01
Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf
db /etc===>mount /dbsoft
db /etc===>mount /dbdump

db /etc===>vgimport vg03 /dev/dsk/c4t2d0 /dev/dsk/c5t2d0
Warning: A backup of this volume group may not exist on this machine.
Please remember to take a backup using the vgcfgbackup command after activating the volume group.
db /etc===>vgchange -a y vg03
Activated volume group
Volume group "vg03" has been successfully changed.
db /etc===>vgcfgbackup vg03
Volume Group configuration for /dev/vg03 has been saved in /etc/lvmconf/vg03.conf
db /etc===>mount /oradata1
view HBA card fibre channel details
ioscan -kfnC fc
fcmsutil /dev/td0
route delete 0.0.0.0 192.16.217.1
kctune -d timezone dst

snapdrive - mounting and dismounting backup files.
Mounting/connecting.
./snapdrive snap connect -fs /db2_data1_1 /db2_data1_1_db -snapname DataStore02:/vol/db2_data1_1:smo_db8_profile_db8_f_h_2_2c90d09439a4d76e0139a4d782900001_0 -autorename -noreserve
Dismounting/disconnecting.
./snapdrive snap disconnect -fs /db2_data1_1_db

hp-ux get timestamp of file
perl -e 'print (scalar localtime((stat($ARGV[0]))[9]),"\n");' Filename
perl -e '@d=localtime ((stat(shift))[9]); printf "%02d-%02d-%04d %02d:%02d:%02d\n", $d[3],$d[4]+1,$d[5]+1900,$d[2],$d[1],$d[0]' hr2.sql
perl -e '@d=localtime ((stat(shift))[9]); printf "%04d%02d%02d%02d%02d%02d\n", $d[5]+1900,$d[4]+1,$d[3],$d[2],$d[1],$d[0]' hr2.sql


Pls preserve this info. for to renew flexclone license
The current flexclone license is valid for a total of 9 months and we need to renew it every 3 months
Procedure to renew flexclone license:
=========================
DataStore02>license
search for the below entry
flex_clone site ABCDEFG expires 00 Mon 201?
Issue the following command on all the controllers
where smo is running like DataStore02 and DRStore02
DataStore02>license add ABCDEFG

Thursday, 12 December 2013

Fusion Middleware Configuration

Files to be modified after installation.
1. boot.properties $DOMAIN_HOME/servers/WLS_FORMS/security
2. tnsnames.ora $ORACLE_INSTANCE/config
3. sqlnet.ora $ORACLE_INSTANCE/config
4. uifont.ali $ORACLE_INSTANCE/config/FRComponent/frcommon/guicommon/tk/admin
5. uiprint.txt $ORACLE_INSTANCE/config/FRComponent/frcommon/guicommon/tk/admin
6. datap462.ppd  $ORACLE_INSTANCE/config/FRComponent/frcommon/guicommon/tk/admin
7. screenprinter.ppd  $ORACLE_INSTANCE/config/FRComponent/frcommon/guicommon/tk/admin
8. font files in $ORACLE_HOME/guicommon/tk/admin/TTF
9. font afm files in $ORACLE_HOME/guicommon/tk/admin/AFM
10. config.xml $DOMAIN_HOME/config/config.xml Note.1162025.1 jsp changes does not work on the fly.
               $DOMAIN_HOME/config/   Note : 1309168.1 DEV_DISCOVERER Discoverer Schema changes
11. jar files in $ORACLE_HOME/forms/java
12. webutilbase.htm $ORACLE_INSTANCE/config/FormsComponent/forms/server
13. webutil.cfg $ORACLE_INSTANCE/config/FormsComponent/forms/server
14. webutil dll d2kwutil.dll, JNIsharedstubs.dll ORACLE_HOME/forms/webutil
15. Registry.dat $DOMAIN_HOME/fmwconfig/servers/WLS_FORMS/applications/formsapp_11.1.1/config/forms/registry/oracle/forms
17. cgicmd.dat $DOMAIN_HOME/config/fmwconfig/servers/WLS_REPORTS/applications/reports_11.1.1.2.0/configuration
18. default.env   $DOMAIN_HOME/config/fmwconfig/servers/WLS_FORMS/applications/formsapp_11.1.1/config
19. formsweb.cfg  $DOMAIN_HOME/config/fmwconfig/servers/WLS_FORMS/applications/formsapp_11.1.1/config
20. machine1_fmw_DEV_DISCOVERER-2554-jdbc.xml   $DOMAIN_HOME/config/jdbc - dev_discoverer schema changes
21  httpd.conf  $ORACLE_INSTANCE/config/OHS/ohs1
22. Idempotent OFF
16. 10g : How To Rotate OC4J Default-Web-Access.Log Using Oracle Diagnostic Logging (ODL) ? [ID 822155.1]
   
How To Update Discoverer 11g When The Repository Schemas (RCU) Have Changed [ID 1309168.1]
DEV_DISCOVERER
22. jsp servlet session-timeout parameter .$DOMAIN_HOME\<YourDomain>\servers\WLS_REPORTS\tmp\_WL_user\reports_11.1.1.2.0\<SomeRandomDir>\war\WEB-INF
    $DOMAIN_HOME/servers/WLS_REPORTS/tmp/_WL_user/reports_11.1.1.2.0/uqanoi/war/WEB-INF
From MBean Browser expand the "Application Defined MBeans" branch and then go to
Application Defined MBeans
  - oracle.reportsApp.config
    - Server: WLS_REPORTS
      - Application: Reports
        - ReportsApp
          - cgicmd
How to Update CGICMD.DAT Using System Mbean Browser [ID 1296010.1]
http://servername.<your domain name>:port/em
1. In the MBean check if the user wants to add a key/val pair
 2. Click operations TAB and then addKey
 3. Enter key and value fields and click Invoke button
 4. Following will be added to cgicmd.dat
    <key>: <value>

1423893.1 How to Enable Discovery Cache To Avoid Long Delay During Login To Fusion Middleware Control
Weblogic Domain - ClassicDomain-Right Click-System Mbean Browser -
 emoms.props, Server:AdminServer,Application:em,Properties,emoms.properties
 setProperty
 oracle.sysman.emas.discovery.wls.FMW_DISCOVERY_USE_CACHED_RESULTS=true
 oracle.sysman.emas.discovery.wls.FMW_DISCOVERY_MAX_CACHE_AGE=7200000
 oracle.sysman.emas.discovery.wls.FMW_DISCOVERY_MAX_WAIT_TIME=10000
1277681.1 configuring jvm controller for preventing memory jump in forms 11g, RUN_REPORT_OBJECT
in Oracle Weblogic EM page,
select forms node and right click,
select JVM Configuration
select Create Like (example) and give any name eg. repjvmc
set below parameters
jvmoptions = -Xms512m -Xmx1024m #Stands for initial heap and max heap. Normally you should not need to modify these.
classpath = ORACLE_HOME\jlib\zrclient.jar;ORACLE_HOME\reports\jlib\rwrun.jar # Replace ORACLE_HOME with your actual directory. These .jar files are needed for RRO.
maxsessions = 50 # Specifies how many Forms runtime processes are allowed to attach to a JVM before a new child JVM is created.
logdir = #The directory for the jvmcontroller log files. For this jvmcontroller, the file will be called repjvmc.log as the log file is named after the jvmcontroller.
Logging = on #Recommend leaving “on” until verification that all is working okay. Then turn on only when necessary.
In the default section of the formsweb.cfg, add “jvmcontroller=%jvmcontroller%” to the value of “otherparams”. For example ->
otherparams= jvmcontroller=%jvmcontroller% obr=%obr% record=%record% tracegroup=%tracegroup% log=%log% term=%term% ssoProxyConnect=%ssoProxyConnect%

Doc ID 858200.1 How to Setup jobStatusRepository Feature in Reports 11g
Doc ID 1473967.1 Setting up jobRepository/jobStatusRepository Feature in Report Server 11gR2 Development Mode Installation