我在 bash 中有这段代码,不知道如何翻译带有“ps -C .....”和“ps -eo ....”的行,对如何编写这些行有任何帮助吗?
if [ "$SwapUsedActivity" == "true" ]
then
echo "WARNING: Potential Swapping happening please check for increasing swap usage"
echo "INFO: checking kswapd number of process and cputime, check for TIME colume for how busy kswapd was"
ps -C kswapd0 -C kswapd1 -C kswapd2 -C kswapd3 -C kswapd4 -o pid,ppid,stime,etime,time,pcpu,args
else
echo "INFO: High swap space usage detected, not a potential issue but check activity"
fi
else
echo "INFO: Swap usage within the limits" …
Run Code Online (Sandbox Code Playgroud)