!752 p { if (isMain()) botWithCommandList("Get disk space Bot."); } answer { if "disk space | get disk space" { File f = userDir(); print("Using dir: " + f); long total = f.getTotalSpace(); long usable = f.getUsableSpace(); print("Total/usable: " + total + "/" + usable); S a = "Server disk space: " + toM(usable) + " MB free of " + toM(total) + " MB."; if (!isWindows()) pcall { S[] inodes = toLines(backtick("df -hi " + bashQuote(f.getPath()))).get(1).split(" +"); a += " Free inodes: " + inodes[3] + "/" + inodes[1]; } ret a; } if "uptime" ret backtick("uptime"); if "memory stats" { time { System.gc(); } ret "GC done in " + getLastTiming() + " ms. " + getMemoryInfo(); } // memory stats without triggering garbage collection if "quick memory stats" ret getMemoryInfo(); if "vm args" ret "This VM was invoked with: " + getVMCommand(); if "system properties" ret slackSnippet(structureLines(System.getProperties())); }