I'm trying to calculate all of the swap memory usage by a linux system and I see a difference between the sum of all swap usage by processes (calculated using the below line) vs free or meminfo output.
Calculated total swap usage by:
for file in /proc/*/status ; do grep VmSwap $file; done | grep kB | grep -v "0 kB"
It seems there are other factors that's contributing to the Swap Used.