feat(systemadmin)!: replace clrz with pszombie (#13861)

BREAKING CHANGE: The nonfunctional clrz function has been removed.
Use pszombie to identify zombie processes and their parent processes.
This commit is contained in:
Yann ILAS
2026-09-14 21:12:12 +02:00
committed by GitHub
parent 1b72d609b4
commit 9bf43f682c
2 changed files with 3 additions and 6 deletions
+2 -5
View File
@@ -28,6 +28,8 @@ alias mkdir='mkdir -pv'
# get top process eating memory
alias psmem='ps -e -orss=,args= | sort -b -k1 -nr'
alias psmem10='ps -e -orss=,args= | sort -b -k1 -nr | head -n 10'
# list all zombie processes with ownership and parent process details
alias pszombie="ps -eo user,pid,ppid,state,comm | awk '\$4==\"Z\"'"
# get top process eating cpu if not work try execute : export LC_ALL='C'
alias pscpu='ps -e -o pcpu,cpu,nice,state,cputime,args | sort -k1,1n -nr'
alias pscpu10='ps -e -o pcpu,cpu,nice,state,cputime,args | sort -k1,1n -nr | head -n 10'
@@ -177,11 +179,6 @@ function getip() {
fi
}
# Clear zombie processes
function clrz() {
ps -eal | awk '{ if ($2 == "Z") {print $4}}' | kill -9
}
# Second concurrent
function conssec() {
awk '{if($9~/200|30|404/)COUNT[$4]++}END{for( a in COUNT) print a,COUNT[a]}' "$(retlog)" | sort -k 2 -nr | head -n10