Trying to count the number of oracle instances on HPUX 11.23 - using ksh. I have multiple instances running and I would like to have a count for how many processes for each instance. Example, run the 'ps -efu oracle' command and for each instance increment a counter. So I am looking for
INT1=# INT2=# INT3=# ... INTn=#
I keep thinking a 'do-while' or some type of 'while' loop but I am missing something, somewhere...
Kinda, sorta. The '_' delimiter is only picking up the ckpt, lgwr, pmon, smon, etc processes. Not getting the connections (LOCAL=). The format of the output is crucial as well since I am wanting to append performance data for nagios. I need the output to look like;
$INT1=# $INT2=# $INT3=# ... $INTn=# | $INT1 $INT2 $INT3 ... $INTn