Sunteți pe pagina 1din 5

find different user and pwd

============================
grep -i abhilash /etc/passwd
Timezone see
=============
grep -i "timezone" SOA_MS02.out
to open remote desktop
=======================
mstsc
Soa Run RDA in oracle_common folder rda.sh
===========================================
rda.sh -CRP -p FM11g_SoaMin
Zip folder
==========
tar -zvcf foldername.gz foldername/
Prstat a
=========
It will show CPU Utilization on the server, it works only in Solaris.
Error
======
grep -i ERROR logname
Crontab
=========
crontab -l open
crontab -e edit
File permisiions
===================
rwx
421
for file permissions
chmod 777 filename
========================
rename mv filename
move mv filename /path
remove rm -rf filename
========================
tar file create and xtract
tar -cvf filename.tar ---->create
tar -xvf filename.tar ---->xtract
===================================
for file reading
cat,more,tail,head
====================
locate *filename
finding purpose
find / -name filename ----->search complete

find . -name logs -----> perticular file or folder


===================================================
hostname ---->display server name
id ----> shows which id ur
==================================
sudo -l ----> root sudo
sudo su - weblogic,webadm ----> particular sudos
su ----> switch user
====================================================
Scp---> secure copy command
copy file one server to another server
scp filename servername:/tmp
==========================================

Traceroute: Connecting from CCA to LDAP


============================================================================
[weblogic@tus3woaapppin01 logs]$ traceroute extldap-prod.ges.symantec.com
Telnet command: connecting from app to web and web to app
================================================================
[weblogic@tus3woaapppin01 logs]$ telnet tus3woawebpin01 8001
Process grep command:
=================================================
ps -ef|grep java or http
/usr/ucb/ps -auwwwwx|grep java
ps -f -u weblogic
Disk free command:
===============================================
df -h or -k /apps
Disk utilization:
================================================
du -sh /apps
du -sh * ---->To know how much space occupied by files in current directory.
du -sh * | grep G
netstat command:
==================================================
netstat -an | grep port or LISTEN or ESTABLISHED
back up:
=================================================
cp oldfile newfile

rename :
===================================================
mv oldfile newfile

Using find command in several ways:


================================================================================
==============================
find . -type f -mtime +346 -exec \ ls -lrt {} \;
find . type f -mtime +360 -name "*.xml" -exec mv { } /old/ \;
find . type -f -mtime +360
find . -type f -mtime +200 -name "*.sorted*" -exec ls -lrt {} \;
find . -type f -mtime +200 -name "*.sorted*" -exec mv {} /apps/data/recon/TRECS/
IN/PAYMENTS/Pamentec_files_2013-14/ \;
find . -type f -mtime +350 -name "*.xml" -exec mv {} /apps/data/recon/ARCHIVE/PA
YMENTS/AMEX_EPA/AMEX_EPA_10_2013/ \;
find . -type f -mtime +350 -name "*.xml" -exec
find . -type f -mtime +120 -name "*sabrix.log.*" -exec gzip {} \;
Command for find the any STUCK threads in logs:
=================================================================
grep -i stuck .log or .out
grep -r "
Files copied from one server to another server using SCP command.
=================================================================
scp SYMWALLET.GES.SYMANTEC.COM.cer e238913@tus3crsapppex12:/tmp
scp symwallet-inter.cer e238913@tus3crsapppex12:/tmp
Provide logs at time stamp.
========================================================
bash-3.2$ ls -lrt |grep Nov|more
bash-3.2$ ls -lrt |grep Nov|more | grep
Get the logs for 3:53 time stamp
less lic_app7_1.out.11-06-04-53
bash-3.2$ grep -i "3:53" lic_app7_1.out.11-06-04-53
=========================================================

To know the version of Sun one System:


./start -version
To view the content of file:
=========================================================
more or less filename
tail -f filename
To zip the files:
==========================================================
gzip filename
tar -cvf newfilename oldfilename
Thread dump command:
=======================================
kill -3 processid
To view the thread dump logs see the file instancename.out file
Heap dump:
========================================
first go to the java bin path /apps/symc/bea1035/jdk160_24/bin
jmap -heap 7410 > heapdump 2>&1 &
jmap -dump:format=b,file=heapJMap.bin pid
jmap -dump:format=b,file=sympay2_1.out.bin pid
jmap -dump:format=b,file=heapdump_aem_prod3_1.hprof 20696
/apps/jdk1.7.0_45/bin/jmap -dump:format=b,file=heapdump_ecentral1_1.hprof 12772
/app/oracle/middleware/jdk1.7.0_51/bin
To modify the files using vi editor:
==============================================
vi filename
then press the i key to chnage into insert mode.
then modify the columns which u want to change.
then press :wq to save and exit from insert mode.
To know the CPU and memory utilization:
=================================================
top or sar(Solaris)
top -u weblogic --->Particular user

To know who are having accounts in server.


=================================================
cat /etc/passwd | more
cat /etc/passwd | grep name(or)id ------->Particuler account
How to check the jdbc driver version in weblogic :
=======================================================
First goto lib directory --- for ex cd /apps/Oracle/Middleware/wlserver_10.3/ser
ver/lib
Then search the jdbc driver using ls -lrt *jdbc* --- > It will displayes the all
jdbc files, then find the ojdbc.jar file from the list.
Then run the below command.
java -jar ojdbc6.jar ---> It displays the jdbc driver verion like output as belo
w.
weblogic@tus3crsappsex15:/apps/symc/bea1035/wlserver_10.3/server/lib> java -jar
ojdbc6.jar
Oracle 11.2.0.2.0 JDBC 4.0 compiled with JDK6 on Mon_Mar_21_22:57:28_PDT_2011
#Default Connection Properties Resource
#Thu Nov 13 16:10:29 GMT+00:00 2014
To check all files which are in GB's.
========================================================
gu -sh * | grep G or M

To nullfy the log or file on LInux server


=========================================================
cat /dev/null > dynamo.log or filename
Taking the Thread dump for Tomcat instance
========================================================
/apps/tomcat/jdk1.7.0_45/bin/jstack pid >> /tmp/Thread_Dump1.txt
nslookup
=========
It will show domain server name and name server and ip
[e252275@nav1pubwebpcl01]~nslookup nav1pubwebpcl01
Server:
143.127.48.145
Address:
143.127.48.145#53
Name: nav1pubwebpcl01.ges.symantec.com
Address: 206.204.52.152

S-ar putea să vă placă și