How to find the process id listening on a port?

On Windows – Example trying to find which process is listening on port 1433 Show if any process is listening on port 1433 for example c:\temp> netstat -ano | find /I “1433” | find /I “LISTEN” Proto Local Address Foreign Address State PID TCP 0.0.0.0:1433 0.0.0.0:0 LISTENING 6244 Using tlist or task manager one can find the PID (last column) from the above command to … Continue reading How to find the process id listening on a port?

How to find/set max processes allowed per user on OS-level?

On AIX — List number of max processes allowed per user $ /home/oracle:$ /usr/sbin/lsattr -E -l sys0 -a maxuproc maxuproc 2048 Maximum number of PROCESSES allowed per user True The value returned by ulimit may not always match so use the value returned by lsattr. To change the value of user process by running chdev $ chdev -l sys0 -a maxumproc=new_limit Continue reading How to find/set max processes allowed per user on OS-level?

How to change unix prompt?

C-shell (csh) Example: set prompt=”[%n@%m %c] \! %” oracle@localhost ~] 39 % In this above example sets prompt to display username, hostname, current working directory and history number. %n – username, %m – hostname, %c – pwd, \! – history number K-shell (ksh) Example: $ export PS1=’$USER [$PWD] $ ‘ oracle [/home] $ In the above example, sets prompt to display username and current working … Continue reading How to change unix prompt?

whereiz – find all version of a command

Using the following script it will find all version of a command in $PATH (from Unix Power Tools) $ cat /tmp/whereiz #!/bin/sh testx=”test -x” fixpath=”`echo $PATH | sed \ -e 's/^:/.:/' \ -e 's/::/:.:/g' \ -e 's/:$/:./'`” # echo $fixpath IFS=”: ” for command do where=”” for direc in $fixpath do $testx $direc/$command && where=”$where $direc/$command” done case “$where” in ?*) echo $where ;; esac … Continue reading whereiz – find all version of a command