modify the method to get memory/swap info (in Linux)