I am trying to fetch memory usage with below top command.
KiB Mem : 8009480 total, 1438848 free, 1964392 used, 4606240 buff/cache
KiB Swap: 7340028 total, 5302364 free, 2037664 used. 5202692 avail Mem
top -p $PID -n 1 -b | grep 'KiB Mem :' | awk -F, '{print $3}'
1963780 used
Strangely sometimes I receive the output as
*"15108960+used"*
I am not able to understand why are the +,* symbol coming in between sometimes.
I couldn't find anything in man page about it.
What does that mean? How do I make top command print without * and + in the output.
Note : Running in CentOs Machine.
/proc/meminfo?*sign, could you please paste here a full line where you see it, withoutgrepandawk? Since I've never seen it intop, I'm curious to see an example. You can just copy to the paste the entire Summary area oftopwhere you see*, including the Cpu and the Swap lines.