| | |
| | | import com.lf.server.entity.all.RedisCacheKey; |
| | | import com.lf.server.entity.sys.ResEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.helper.FileHelper; |
| | | import com.lf.server.service.sys.ResService; |
| | | import org.apache.commons.logging.Log; |
| | | import org.apache.commons.logging.LogFactory; |
| | |
| | | |
| | | // 剩余 |
| | | long surplusByte = memory.getAvailable(); |
| | | map.put("totalMem", StringHelper.formatByte(totalByte)); |
| | | map.put("use", StringHelper.formatByte(totalByte - surplusByte)); |
| | | map.put("remainMem", StringHelper.formatByte(surplusByte)); |
| | | map.put("totalMem", FileHelper.formatByte(totalByte)); |
| | | map.put("use", FileHelper.formatByte(totalByte - surplusByte)); |
| | | map.put("remainMem", FileHelper.formatByte(surplusByte)); |
| | | map.put("usage", new DecimalFormat("#.##%").format((totalByte - surplusByte) * 1.0 / totalByte)); |
| | | |
| | | return map; |