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

26
LINES

< > BotCompany Repo | #1013097 // diskSpaceEtcBot_answer

JavaX fragment (include)

1  
static S diskSpaceEtcBot_answer(S s) {
2  
  new Matches m;
3  
  if "disk space | get disk space" ret diskSpaceEtcBot_diskSpace();
4  
5  
  if "uptime" ret backtick("uptime");
6  
  
7  
  if "full memory stats" {
8  
    time { System.gc(); }
9  
    ret "GC done in " + getLastTiming() + " ms. " + getMemoryInfoPlusSystemMemory();
10  
  }
11  
  
12  
  // memory stats without triggering garbage collection
13  
  if "memory stats"
14  
    ret getMemoryInfoPlusSystemMemory();
15  
 
16  
  if "vm args"
17  
    ret "This VM was invoked with: " + getVMCommand();
18  
    
19  
  if "system properties"
20  
    ret slackSnippet(structureLines(System.getProperties()));
21  
    
22  
  if "system load"
23  
    ret formatDouble(systemLoad(), 2);
24  
    
25  
  null;
26  
}

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: 389 / 401
Version history: 3 change(s)
Referenced in: [show references]