Random Project

process name with “space bar” caused some miss information

hi sbosek team

really great plug-in!
but, i found some miss information if there is process name with space-bar as shown below.

# ksh check_cpu_stats.sh
CPU STATISTICS OK : user=4.58% system=2.35%, iowait=1.64%, idle=88.83%, nice=2.60%, steal=0.00%;Top 5 CPU Processes(cpu%,pname,pid): 29.3% pigz 1329275, 25.5% english 1407819, 13.3% spamd child, 1137260% 13.2 php, 1410968% 8.8 mysqld 2945555%| CpuUser=4.58%;70;90;0; CpuSystem=2.35%;40;60;0; CpuIowait=1.64%;30;40;0; CpuIdle=88.83%;0;0;0; CpuNice=2.60%;0;0;0; CpuSteal=0.00%;0;0;0;

some process percentage are 1137260% etc.
quite sure it caused by a daemon name with “spamd child”. the space-bar caused some malfunction with your great script parsing.
can wait your next release guys!

thanks