Thursday, September 19, 2019

remove or trip trailing spaces and new lines from excel

1. Got fronting or trailing lines in spaces in the cell
- user TRIM function in a new column. For example, To trip trailing spaces from column A, use the following command in new column
=TRIM(A1)


2. Remove new line / carriage return from cell contents?

- Use Ctrl+h  (brings up search & replace)
- In the search field, use ctrl+j (opos up return character)
- IN replace field, type the character that you want to replace new line with.
   If you don't want to replace with anything, and just remove the new lines, simply leave it blank
   (don't put spaces, just leave it blank.)

Wednesday, April 24, 2019

OHS Version httpd: error while loading shared libraries cannot open shared object file: No such file or directory



/httpd: error while loading shared libraries: libexpat.so.0: cannot open shared object file: No such file or directory
Getting errors like below when trying to invoke httpd commands on OHS?

Follow the below steps to get the version without issues



1.
export ORACLE_HOME=xxxxxx
e.g.
export ORACLE_HOME=/u01/app/oracle/product/fmw/Oracle_WT1


2.
export LD_LIBRARY_PATH=$ORACLE_HOME/ohs/lib:$ORACLE_HOME/opmn/lib:$ORACLE_HOME/lib:$LD_LIBRARY_PATH

3.
$ORACLE_HOME/ohs/bin/httpd -version

Sunday, March 17, 2019

Change webcache port

I keep forgetting where to change listen ports for webcahce


$ vi $ORACLE_HOME/config/WebCache/webcache1/webcache.xml


Update the relevant port using vi search and replace command:
e.g.
:1,$ s/7789/7799/g

Friday, February 8, 2019

iptables quick recokner


iptables -L -n -v  ## List current rules

iptables -A INPUT -s 107.196.150.48 -j DROP ## Drop all packets from Source IP

iptables -A INPUT -s 107.196.150.48 -j ACCEPT ## Accept all packets from Source IP


iptables -F # Flush IP Tables

Friday, February 1, 2019

Find JVM start arguments of java process on Windows server

Commands to find JVM arguments for java processes running on Windows server.



Many of us work on unix based servers on daily basis and don't even have to think about figuring out so many detail during any investigation or analyses process. But occasionally, we  have to investigate stuff (yeah... technical word that means anything or everything) on Windows server, and we struggle to discover even basic things.


Most common way to figure out JVM related info in on unix:


$ ps -ef | grep java   ## voila.... we get all the info


Will it work on windows..nope. But the below will:


cmd> tasklist  #### this command is equivalent of "ps" on unix based systems, and also return PID of processes.

Once you know the PID, use the below command to get JVm arguments of the java process.

cmd> c:\<path to your java dir>\jcmd <PID> VM.command_line
cmd> c:\<path to your java dir>\jcmd <PID> VM.flags