amazon

Monday, September 12, 2011

IMP Commands

1 – Finger – finger

This give information about the how are login to the present server

2 – Topas – topas

detail imformation about server like ( task manager or top)

3 - lsuser - kr3231 / lsuser - ALL

this give information about the user and all

4 - find . -name csc

in root we can find the file name

5 - ssh serve_name

6 - Chmod Hint :

The "s" is a "sticky bit" which sets that property for all subsequently created subdirs and/or files. Depending on where the "s" is dictates if it's "suid" or "sgid"

'man chmod' will give more info

1755 gives drwxr-xr-t

2755 gives drwxr-sr-x

3755 gives drwxr-sr-t

4755 gives drwsr-xr-x

5755 gives drwsr-xr-t

6755 gives drwsr-sr-x

7755 gives drwsr-sr-t

Ex: chmod 2755 /beheer/log/was50/ETM1GRK/backup

7 - lsvg

lsvg command displays information about volume groups

8 - chown

# To change the owner of the file program.c:

chown jim program.c

The user access permissions for program.c now apply to jim. As the owner, jim can use the chmod command to permit or deny other users access to program.c.

# To change the owner and group of all files in the directory /tmp/src to owner john and group build:

chown -R john:build /tmp/src

ps -ef | grep def

9 - Empty To the LOg Files

>filename

Ex: >systemout.log

10 -You can determine which filesystems still are not good by using the following statements:

lsvg -l appsvg | grep closed

and

lsvg -l datavg | grep closed

By using these statements you can give more precise info about the issues on the server for which you are going to raise an Smile incident

11 - finding the loop process and System low resources Time

netstat -an | grep CLOSE_W # result yes

lsof | grep CLOSE_W # result yes

ps -ef | grep <PID>

stop/start these processes when it concerns was/http processes, If not please contact CSC NL

I killed the processes, because obvious some kind of looping # this someting only has to be doen CSC NL.

Evently I also find statements to start the processes again

12 - two commands run at a time

df -g. ; date

13 - find a files specified name to :

find . -name *.log

14 - Extract :

jar -xvf /tmpdata/certificates.zip

15 . Automatic Stop / Start

cat /etc/inittab | grep -i rc.was

inittab was provide the information about the intial star and stop application in when sevrer was rebooting ...

16 . Copy only some lines of the log files (last or first some lines copy )

tail -2000 SystemOut.log > /tmpdata/SystemOut.log.fkp.last4000rows

above command is using to we save and create the last 2000rows of the line in the log file

17. sudo –l - Provide a sudo accessible commands and files systems

pkzip25 -add BBA-ST1001.zip BBA.ear

18 - ps

Server ZB153L18 utilising high memory usage. Its reporting memory issues. In Performance Capacity Management Report its touching 90% memory usage. Please investigate and if possible restart the java application so it might come down as it is a PR server ...

sa2827@zb153l18:/home/sa2827$ ps -e -o vsz,time,comm,pid | sort -r -n -k1 | head -10

339276 00:40:14 java 454670

300488 2-03:43:25 java 987172

81052 04:55:13 java 1355988

60864 02:55:00 java 1032196

47056 03:13:08 amqzlaa0_nd 458848

47036 00:58:16 java 1294520

19.inittab - contains the start up services when server is rebooted or restart

Ex : start the automatically when server is rebooted

ihshttpd:2:wait:/usr/IBMIHS/bin/apachectl start > /dev/console 2>&1

19 : gunzip <file-name>

its allowed to the unzip the specific ziped file or ziped folder

20. - change the username and group name

chown -R was61c04:wsdepl *

chmod -R 4755 fkprelease

21. - Unzip the tar file

tar –xvf SW_SPO_Java_Client.tar

22. - symbalic link of specific file

ln -sf machine.ST.properties machine.properties

23. - FTP using method :

FTP this package to the home directory of the distribution user-id:

# FTP localhost

Name (localhost:ob0075): distrbba (or devbba for UT/ST)

Password:

ftp> lcd /home/<username>/bbci/bba/

ftp> pwd

257 "/beheer/cda/distr/bba/dev" is current directory.

ftp> put <packagename>-<env><version>.zip

ftp> quit

24 . – SCP

scp using Method : is using to be copy the files one server to the another server .

scp <location of the Files> <user_name>@<server_name>:<location os the torget path>

EX : scp /tmp/mgeb1138.zip kr3231@N5112L04:/tmp

25 . verfications of websphere related process :

Verify if the deployment manager on the server is running

# ps -ef | grep -i dmgr | grep -v grep

Verify if the nodeagent on the server is running

# ps -ef | grep -i nodeagent | grep -v grep

Verify that no http servers are running for the archiving service application

# ps -ef | grep httpd | grep bba

Verify that no errors have occured during stop of the cluster

# cat /beheer/log/was61/c01/<XX>a1bba/SystemOut.log | grep "E:"

Verify if the application server is stopped

Make sure that the application server is stopped, by issuing the following command on all

WAS-nodes using the following command:

# ps -ef | grep "<XX>a1bba | grep -v grep

25. - last login user

last -20

fingre - present users login

26 . Finding Data base connections

netstat -an | grep <DB port no> | grep <DB ipaddress> | wc -l

27 . - Utilization of single JVM

ps -auxwww | grep pid

28. - Check the no of connections which are hitting the DB

netstat -an | grep <DB port no> | grep <DB ipaddress> | wc –l

0 comments:

Post a Comment