哈库拉玛塔塔——tjitty

记录下网络上的精品测试技术文章 and 生活

统计

留言簿(8)

积分与排名

阅读排行榜

评论排行榜

Readme.txt

mount -o vers=3 bosnfs01:/u02/release /u01/share
mount -o vers=3 bosnfs01:/u01/home /home
mount -o vers=3 bosnfs01:/u01/builder /home/builder

Find out the disk cost:
du . | sort -n -r | more

Lumigent Schema Backup:
exp system/oracle owner=lumigent file=lumigent_ADB625drop7.dmp
imp system/oracle full=y file=lumigent_ADB625drop7.dmp

export ORACLE_HOME=/u01/oracle/home/oracle
export ORACLE_BASE=/u01/oracle/
export ORACLE_SID=orcl
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH:$ORACLE_HOME/ctx/lib:/usr/lib:/usr/local/lib

Name  From  Host  Port No  Status    
TestEmailServer  tongyong1@lumigent.com  192.168.20.XXX  25  Enabled  
http://10.67.6.108:6080/

如何查看Linux操作系统的位数
1.编程实现:
在程序中返回sizeof(int)的值,返回的结果是操作系统的字节数。若返回4则是32位操作系统,返回8即是64位。
2.2.getconf命令:
getconf命令可以获取系统的基本配置信息,比如操作系统位数,内存大小,磁盘大小等。
例如:
getconf LONG_BIT
3. uname -a

' Get the Linux OS version
lsb_release -a

=====================
Check solaris and Linux info:
=====================
Solaris
======
 prtdiag -v  //check solaris cpu info
 isainfo -kv  //check solaris 32/64bit
 prstat -a  //vmstat 3 : check solaris physical memory info
Linux
======
 [root@devblade09 ~]# more /etc/redhat-release  //check Linux version
Red Hat Enterprise Linux ES release 4 (Nahant)
 uname -a  //Check all infor
 uname  //check system infor

设置WindowsUser域用户:control userpasswords2

如何查看Linux系统版本
1)uname -a
2)cat /proc/version
3)cat /etc/issue

查看HP-UX型号:
uname -a
model (pa-risc的产品号以rp打头,itanium的产品号以rx打头)


DB2 OS directory:
/home/db2inst2/sqllib/security (DB2 v9 or before)
/u01/IBM/db2inst1/sqllib/security/auditdata (DB2 v9.5)
Archive log file:
/home/db2inst2/archive/db2inst2/TEST/NODE0000/C0000000
/u01/IBM/db2inst1/archive/db2inst1/LLEE1/NODE0000/C0000000

Edit /etc/group, add oracle to all db2 groups
Chmod read premission of DB2 archive log folder to Oracle user
chmod read premission of db2 auditdata files to Oracle user
Each time run archive log for db [database_name], remember to give its read premission to Oracle before collect.
Feel free to collect ^_^

Linux (devlnx07) [192.168.20.169]     db2inst2/db2inst1    50002
http://192.168.20.169:10080/eac/jsp/login.jsp
Solaris (devsol14) [172.16.1.198]    db2inst2/db2inst2    60008
http://172.16.1.198:10080/eac/jsp/login.jsp
AIX5.3 (devaix01) [192.168.20.64]     db2inst3/db2inst3    60008
http://192.168.20.64:10080/eac/jsp/login.jsp

TO check if the DB2 works fine:
1 db2 list db directory
2 db2level
3 db2 get dbm cfg
4 cat /etc/services | grep db2c_db2inst2
5 connect to sample1 user db2admin using 8301206
6 connect reset
7 db2 archive log for database TESTDB
8 db2 force application all (close all connections)
9 db2audit describe
9 db2audit prune all (/opt/db2inst1/sqllib/security/db2audit.log)
10 db2 drop db LUMIGENT
11 db2 "select * from syscat.bufferpools"
12 db2 list node directory
    db2 uncatalog node
13 create table AAA ( A1 int, A2 int, A3 int)
14 db2 get db cfg for testdb
15 db2 list tables for schema REPLOG1
$ db2 catalog tcpip node aix01N remote devaix104 server 50000
$ db2 catalog db TestDB as TestDB2 at node aix01N
$ db2 connect to TestDB2 user db2inst1 using db2inst1

----------------------------------------------------------------
 Deploy on tstauto02 using win2k3 package
----------------------------------------------------------------
USING QTP
------------------------------------------------------------------------------------------
1 setup an ODBC: run: C:\Windows\SysWOW64\odbcad32.exe
2 InternetExplorer path setting.
3 Uninstall Netwatch should show the iwatch servier window and start servier.
4 cookies and temp files problem
5 Cannot recognize "Create Audit Source" button in netwatch page.
6 When install, QTP stop at "Next" or "Browser" buttons.
7 When deployment Audit DB Report Server Templates finished, click "Reports" tab, the report templates didn't show out. But after refresh the page, they shows out.
8 When running QTP, it's better keep the window outest.
9 Sometime QTP will stop at Netwatch page(http://localhost:10080/eac/sniffer.do), it's didn't recognize the link in this page.

10 How To disable the Windows Security Warning
start the Group Policy Editor (Start > Run, type
-gpedit.msc- and press OK) and go to:

-User Configuration > Administrative Templates > Windows Components >
Attachment Manager- then set -Inclusion list for low file types- to
Enabled and enter the file types you don't want to be warned about in
the box (for example: .exe).

----------------------------------------------------------------
 Deploy on Devsol12 using unix-oracle package
----------------------------------------------------------------
/usr/QTP/installFiles
/home/oracle/devsol12/lumigent/

http://192.168.20.59:10080/eac/jsp/login.jsp

DSName: ORA-DEVSOL12

sqlplus "sys/oracle@sol12o9 as sysdba";
sqlplus Rep_Log/Rep_Log
select name from LUMREPORTSUMMARY_PR;

ERROR: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
listener.ora (ORACLE 11G)
======================================
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /u01/app/oracle/product/11.1.0/db_1)
      (PROGRAM = extproc)
    )
     (SID_DESC =
      (GLOBAL_DBNAME = orcl11g)
      (ORACLE_HOME = /u01/app/oracle/product/11.1.0/db_1)
      (SID_NAME = orcl11g)
    )
  )
 
今天莫名其妙的ls,mkdir等命令不能用了,需要添加绝对目录才能用

网上google了两小时:

在终端下执行 export PATH=/bin:/usr/bin:/sbin:/usr/sbin

解决!

oracle 11g 密码大小写敏感问题
=======================================
ALTER SYSTEM SET SEC_CASE_SENSITIVE_LOGON = FALSE;
SHOW PARAMETER SEC_CASE_SENSITIVE_LOGON

sqlplus / as sysdba 报错 ORA-01031: insufficient privileges
========================================
修改$ORACLE_HOME/network/admin/sqlnet.ora
SQLNET.AUTHENTICATION_SERVICES= (ALL)

获取Windows命令的返回值(PASS/FAIL):
C:\Documents and Settings\tjitty>cd .
C:\Documents and Settings\tjitty>echo %errorlevel%
0

SQL SERVER Cluster move to the next node command:
cluster SQL2008CLSTR group "SQL Server (MSSQLSERVER)" /moveto:vmsql05

alter system set audit_trail=db_extended scope=spfile;
show parameter audit;
show parameter audit_trail

./lmSubmit load/RepYong aslog_AppGRC20PSF_20090122_081719.ecz
./lmAgentBroker publish RepYong

./bin/LTMsiUpgrade --ccdb-patch
./bin/LTMsiUpgrade --rep-patch

qahp02: file lmAgentExec
lmAgentExec:    ELF-64 executable object file - IA64

source .profile

/sbin/service vsftpd start(restart)    #Start ftp services
/sbin/service iptables stop        #Close the firewall
rpm -q vnc vnc-server        #Check if software installed
rm -rf *                #Delete All files and directories
wget http://nchc.dl.sourceforge.net/sourceforge/tcl/tcl8.4.11-src.tar.gz
gunzip iwatchip_solaris10_u2_u3_u4.tar.gz
tar -xvf iwatchip_solaris10_u2_u3_u4.tar
                #unzip tar.gz files

//查看机器位数
getconf LONG_BIT

ls –l 查看详细信息
ls –la 查看详细信息及隐藏文件
wc –l file 计算文件的行数
wc –w file 计算文件的单词数
wc –c file 统计字符数
cp sourcefile destfile 拷贝文件
mv oldname newfile 重命名文件
grep ‘pattern’ file 在文件内搜索字符串或和正则表达式匹配的字符串
grep “hello” file.txt | wc –l 在file.txt中搜索包含有”hello”的行并计算行数,这里grep命令的输出成了wc命令的输入
Cut –b column file 将指定范围内的文件内容输出到标准输出设备上。
例:输出每行第5至9个字符 cut -b5-9 file.txt
find . –name filename 在当前目录下搜索文件名为filename的文件
head file 打印文本文件开头几行
tail file 打印文本文件末尾几行
>写入文件并覆盖旧文件
>>追加到文件的尾部,保留旧文件内容。

Get ADB gui install address:        ps -ef |grep gui

Start/stop gui:            ./web.init start/stop
start/stop agent:            ./entegra.init start/stop

Start iwatch in non-loopback mode:   
        (Linux)        ./iwatch start -i etho -a -d
        (HP/Solaris)    ./iwatch start -a -d
Start iwatch in loopback mode:(use ifconfig -a to find out your interface)
        (Linux)        ./iwatch start -i lo -i eth0 -a -d
        (AIX)        ./iwatch start -i lo0 -i en0 -a -d
        (HP/Solaris)    ./iwatch start -i loopback -a -d

Stop iwatch:            ./iwatch stop all
Check iwatch status:        ./iwatch status all

Load ecz file using command
-------------------------------------
source env.sh
./lmSubmit load/repo /.../data/???.ecz
./lmAgentBroker publish repo

ps -ef // iwatch process check
./pnameserver
./psummarizer
./pcapture_multi
./mcon
./pserver
./iArch

ps -ef // iarchive process check
./NetArchive

Start iArchive:            ./iwatch start
Stop iArchive:            ./iwatch stop
Check iArchive status:        ./iwatch status all

memory watch            ipcs -m
memory stop            ipcrm –m SID

remove driver(Solaris)        pkgrm iwatchip
remove driver(HP-UX)        swremove iwatchip

ALTER DATABASE DATAFILE 'filename'  RESIZE 800M;   // resize datafile.
vmstat 1 10 //memory

HOW TO ENABLE TELNET SERVER/CLIENT ON WINDOWS 2008
----------------------------------------------------------------
ServerManagerCmd.ext -install Telnet-Server
ServerManagerCmd.exe -install Telnet-Client

SQL for SYBASE
======================================
select name from sysdatabases
go
use testdb
go

-bash-3.2$ cat entegra.init
==============================================
#!/bin/ksh
# Copyright (c) 2005-2007 by Lumigent Technologies, Inc.
# All rights reserved.
#

AUDITDB_USER=`ls -ld /opt/lumigent/agent/agent.qarh5-02.hq.lumigent.int | awk '{print $3}' `

case "$1" in
start)
        echo "Starting Lumigent Audit DB Agent."
        su - $AUDITDB_USER -c /opt/lumigent/agent/agent.qarh5-02.hq.lumigent.int/etc/runEntegraAgent.sh
    ;;


stop)
        echo "Stopping Lumigent Audit DB Agent."
    pid=`/bin/ps -u $AUDITDB_USER -o pid,fname |
     /bin/grep lm[A-Z] |
     /bin/sed -e 's/^  *//' -e 's/ .*//'`
    [ "$pid" != "" ] && kill -TERM $pid
    ;;
*)
    echo "Usage: $0 {start|stop}"
    exit 1
    ;;
esac

exit 0
-bash-3.2$


-bash-3.2$ cat env.sh
============================================================
# Use this script to set your bourne shell environment variables to the values
# that the Audit DB agent uses, for the purpose of running Audit DB command
# line tools.
#
# run ". env.sh"
#
# Copyright (c) 2005-2007 by Lumigent Technologies, Inc.
# All rights reserved.
#

ORACLE_HOME="/u01/app/oracle/product/10.2.0/db_4"
export ORACLE_HOME

TNS_ADMIN=""
export TNS_ADMIN

SYBASE="/opt/sybase"
export SYBASE
LANG=C
export LANG

LD_LIBRARY_PATH="/u01/app/oracle/product/10.2.0/db_4/lib32:/u01/app/oracle/product/10.2.0/db_4/lib:/opt/lumigent/agent/lib"${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH
export LD_LIBRARY_PATH

PATH="/opt/lumigent/agent/bin":/u01/app/oracle/product/10.2.0/db_4/bin:$PATH
-bash-3.2$

-bash-3.2$ cat runEntegraAgent.sh
=========================================================================
#!/bin/ksh

ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_4
export ORACLE_HOME

TNS_ADMIN=""
export TNS_ADMIN

SYBASE="/opt/sybase"
export SYBASE
LANG=C
export LANG

LD_LIBRARY_PATH="/u01/app/oracle/product/10.2.0/db_4/lib32:/u01/app/oracle/product/10.2.0/db_4/lib:/opt/lumigent/agent/lib"

export LD_LIBRARY_PATH

PATH=/opt/lumigent/agent/bin:/u01/app/oracle/product/10.2.0/db_4/bin:/opt/lumigent/agent/bin:/u01/app/oracle/product/10.2.0/db_4/bin:/u01/app/oracle/product/10.2.0/db_4/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/bin:/usr/local/bin:/usr/openwin/bin/:/usr/lbin:/usr/expect/bin:/usr/tcl/bin.:/u01/app/oracle/product/10.2.0/db_4/bin
export PATH

cd /opt/lumigent/agent/agent.qarh5-02.hq.lumigent.int/etc
lmAgentExec lmEntegraAgent  >> lmEntegraAgent.out 2>&1

-bash-3.2$


posted on 2010-07-22 21:38 tjitty 阅读(1020) 评论(4)  编辑 收藏 引用 所属分类: 实用技巧测试相关

评论

# re: Readme.txt 2011-05-31 11:52 tjitty

OS配置(root用户):
1)最大连接数配置,修改/etc/security/limits.conf,参见10.0.9.131
2)TPC连接数及连接时间配置,修改/etc/sysconfig/sysctl,参见10.0.9.131
3)NFS server:修改/etc/exports,参见10.0.9.79,然后依次执行
portmap start
service nfsserver start
service nfs start
exportfs -rv
4)NFS client:
portmap start
service nfsserver start
service nfs start
mount -t nfs4 10.0.9.79:/ /opt/ericsson/aopshare

怎么修改虚拟机系统的时间?
1. Root下执行 echo 1 > /proc/sys/xen/independent_wallclock
2. 然后再执行date –s 14:11:12
  回复  更多评论   

# re: Readme.txt[未登录] 2011-06-22 12:39 tjitty

cat adserver.transaction.201105241* | awk -F ";" '{print $10}' | sort | uniq -c  回复  更多评论   

# re: Readme.txt 2011-07-27 11:02 test

MonitorList=10.0.9.79 10.0.9.80 10.0.9.81 10.0.9.82 10.0.9.250 10.0.9.133 10.0.9.86 10.0.9.90 10.0.9.93  回复  更多评论   

只有注册用户登录后才能发表评论。