more like linux free command
This commit is contained in:
		
							parent
							
								
									bae9ea52b8
								
							
						
					
					
						commit
						3cc2b04986
					
				@ -37,6 +37,11 @@ public class Free extends SigarCommandBase {
 | 
			
		||||
            format(mem.getFree())
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
        Object[] actualRow = new Object[] {
 | 
			
		||||
            format(mem.getActualUsed()),
 | 
			
		||||
            format(mem.getActualFree())
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
        Object[] swapRow = new Object[] {
 | 
			
		||||
            format(swap.getTotal()),
 | 
			
		||||
            format(swap.getUsed()),
 | 
			
		||||
@ -47,6 +52,13 @@ public class Free extends SigarCommandBase {
 | 
			
		||||
 | 
			
		||||
        printf("Mem:    %10ld %10ld %10ld", memRow);
 | 
			
		||||
 | 
			
		||||
        //e.g. linux
 | 
			
		||||
        if ((mem.getUsed() != mem.getActualUsed()) ||
 | 
			
		||||
            (mem.getFree() != mem.getActualFree()))
 | 
			
		||||
        {
 | 
			
		||||
            printf("-/+ buffers/cache: " + "%10ld %10d", actualRow);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        printf("Swap:   %10ld %10ld %10ld", swapRow);
 | 
			
		||||
 | 
			
		||||
        printf("RAM:    %10ls", new Object[] { mem.getRam() + "MB" });
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user