Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

26
LINES

< > BotCompany Repo | #1013097 // diskSpaceEtcBot_answer

JavaX fragment (include)

static S diskSpaceEtcBot_answer(S s) {
  new Matches m;
  if "disk space | get disk space" ret diskSpaceEtcBot_diskSpace();

  if "uptime" ret backtick("uptime");
  
  if "full memory stats" {
    time { System.gc(); }
    ret "GC done in " + getLastTiming() + " ms. " + getMemoryInfoPlusSystemMemory();
  }
  
  // memory stats without triggering garbage collection
  if "memory stats"
    ret getMemoryInfoPlusSystemMemory();
 
  if "vm args"
    ret "This VM was invoked with: " + getVMCommand();
    
  if "system properties"
    ret slackSnippet(structureLines(System.getProperties()));
    
  if "system load"
    ret formatDouble(systemLoad(), 2);
    
  null;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1013097
Snippet name: diskSpaceEtcBot_answer
Eternal ID of this version: #1013097/4
Text MD5: 04c100b9e9c31117e8e33ced90055f57
Author: stefan
Category: javax / talking robots
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-12-14 18:49:11
Source code size: 694 bytes / 26 lines
Pitched / IR pitched: No / No
Views / Downloads: 495 / 490
Version history: 3 change(s)
Referenced in: [show references]