View nginx process started after the start of the precise time and elapsed time:
[root@iZ25p102vo3Z ~]# ps -eo pid,lstart,etime,cmd | grep nginx
Find a running time of more than one day of frmweb process
EBS often there will be some zombie's frmweb process characterized by long-running, CPU-all (1 frmweb process uses a CPU thread 100% of resource)
The following script is to use awk to find the running time of more than one day of frmweb process, and kill off.
Instructions:
match ($. 4, / - /) is used to match for the string time of day and time division "-"
ps -eo pid,pcpu,pmem,time,command | sort -k 2 -r | awk '/frmweb/ && !/PID/ && match($4,/-/) && $4+0>=1' ps -eo pid,pcpu,pmem,time,command | sort -k 2 -r | awk '/frmweb/ && !/PID/ && match($4,/-/) && $4+0>=1 {print $1}' | xargs kill -9
EBS often there will be some zombie's frmweb process characterized by long-running, CPU-all (1 frmweb process uses a CPU thread 100% of resource)
The following script is to use awk to find the running time of more than one day of frmweb process, and kill off.
Instructions:
match ($. 4, / - /) is used to match for the string time of day and time division "-"
ps -eo pid,pcpu,pmem,time,command | sort -k 2 -r | awk '/frmweb/ && !/PID/ && match($4,/-/) && $4+0>=1' ps -eo pid,pcpu,pmem,time,command | sort -k 2 -r | awk '/frmweb/ && !/PID/ && match($4,/-/) && $4+0>=1 {print $1}' | xargs kill -9