added virtual box VM info
This commit is contained in:
parent
e65067af72
commit
4dad5284a9
@ -30,6 +30,7 @@ For major (breaking) changes - version 3 and 2 see end of page.
|
||||
|
||||
| Version | Date | Comment |
|
||||
| -------------- | -------------- | -------- |
|
||||
| 4.8.0 | 2019-05-31 | added `vboxInfo()` detailed virtual box info |
|
||||
| 4.7.3 | 2019-05-30 | updated typescript typings |
|
||||
| 4.7.2 | 2019-05-30 | `versions()` added virtualbox, java popup fix macos |
|
||||
| 4.7.1 | 2019-05-29 | `memLayout()` fix macos mojave |
|
||||
|
||||
42
README.md
42
README.md
@ -82,6 +82,7 @@ si.cpu()
|
||||
|
||||
(last 7 major and minor version releases)
|
||||
|
||||
- Version 4.8.0: added `vboxInfo()` detailed virtual box info
|
||||
- Version 4.7.0: partial NetBSD support
|
||||
- Version 4.6.0: added `dockerInfo()`
|
||||
- Version 4.5.0: `fsOpenFiles()` added open file descriptor count
|
||||
@ -546,7 +547,46 @@ I also created a nice little command line tool called [mmon][mmon-github-url] (
|
||||
| | [0].command | X | X | X | X | X | command and arguments |
|
||||
| si.dockerAll(cb) | {...} | X | X | X | X | X | list of all containers including their stats<br>and processes in one single array |
|
||||
|
||||
#### 12. "Get All at once" - functions
|
||||
#### 12. Virtual Box
|
||||
|
||||
| Function | Result object | Linux | BSD | Mac | Win | Sun | Comments |
|
||||
| --------------- | ------------- | ----- | ------- | --- | --- | --- | -------- |
|
||||
| si.vboxInfo(cb) | {...} | X | X | X | X | X | returns general virtual box info |
|
||||
| | id | X | X | X | X | X | virtual box ID |
|
||||
| | name | X | X | X | X | X | name |
|
||||
| | running | X | X | X | X | X | vbox is running |
|
||||
| | runningSince | X | X | X | X | X | running since (secs) |
|
||||
| | guestOS | X | X | X | X | X | Guest OK |
|
||||
| | hardwareUUID | X | X | X | X | X | Hardware UUID |
|
||||
| | memory | X | X | X | X | X | Memory in MB |
|
||||
| | vram | X | X | X | X | X | VRAM in MB |
|
||||
| | cpus | X | X | X | X | X | CPUs |
|
||||
| | cpuExepCap | X | X | X | X | X | CPU exec cap |
|
||||
| | cpuProfile | X | X | X | X | X | CPU profile |
|
||||
| | chipset | X | X | X | X | X | chipset |
|
||||
| | firmware | X | X | X | X | X | firmware |
|
||||
| | pageFusion | X | X | X | X | X | page fusion |
|
||||
| | configFile | X | X | X | X | X | config file |
|
||||
| | snapshotFolder | X | X | X | X | X | snapshot folder |
|
||||
| | logFolder | X | X | X | X | X | log folder path |
|
||||
| | HPET | X | X | X | X | X | HPET |
|
||||
| | PAE | X | X | X | X | X | PAE |
|
||||
| | longMode | X | X | X | X | X | long mode |
|
||||
| | tripleFaultReset | X | X | X | X | X | triple fault reset |
|
||||
| | APIC | X | X | X | X | X | APIC |
|
||||
| | X2APIC | X | X | X | X | X | X2APIC |
|
||||
| | ACPI | X | X | X | X | X | ACPI |
|
||||
| | IOAPIC | X | X | X | X | X | IOAPIC |
|
||||
| | biosAPICmode | X | X | X | X | X | BIOS APIC mode |
|
||||
| | bootMenuMode | X | X | X | X | X | boot menu Mode |
|
||||
| | bootDevice1 | X | X | X | X | X | bootDevice1 |
|
||||
| | bootDevice2 | X | X | X | X | X | bootDevice2 |
|
||||
| | bootDevice3 | X | X | X | X | X | bootDevice3 |
|
||||
| | bootDevice4 | X | X | X | X | X | bootDevice4 |
|
||||
| | timeOffset | X | X | X | X | X | time Offset |
|
||||
| | RTC | X | X | X | X | X | RTC |
|
||||
|
||||
#### 13. "Get All at once" - functions
|
||||
|
||||
| Function | Result object | Linux | BSD | Mac | Win | Sun | Comments |
|
||||
| --------------- | ------------- | ----- | ------- | --- | --- | --- | -------- |
|
||||
|
||||
@ -80,6 +80,11 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">4.8.0</th>
|
||||
<td>2019-05-31</td>
|
||||
<td><span class="code">vboxInfo()</span> added virtualbox detailed VM info</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">4.7.3</th>
|
||||
<td>2019-05-30</td>
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/typed.js/2.0.9/typed.min.js"></script>
|
||||
|
||||
<title>🖥 systeminformation</title>
|
||||
<title>systeminformation</title>
|
||||
<script>
|
||||
let vh = window.innerHeight * 0.01;
|
||||
// Then we set the value in the --vh custom property to the root of the document
|
||||
@ -289,6 +289,12 @@
|
||||
<div class="icontitle">Docker</div>
|
||||
</div>
|
||||
</a>
|
||||
<a href="vbox.html" class="col-xl-3 col-lg-3 col-md-4 col-6 features">
|
||||
<div class="inner">
|
||||
<div class="icons"><i class="fal fa-box-open"></i></div>
|
||||
<div class="icontitle">Virtual Box</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="row justify-content-center sectionheader index">
|
||||
<div class="col-8">
|
||||
|
||||
14
docs/main.js
14
docs/main.js
@ -1,6 +1,6 @@
|
||||
function createMenu() {
|
||||
var menu = [
|
||||
[0, '', 'Documentation'],
|
||||
[0, './#docs', 'Documentation'],
|
||||
[1, 'gettingstarted', 'Getting Started'],
|
||||
[1, 'general', 'General'],
|
||||
[1, 'system', 'System'],
|
||||
@ -13,6 +13,7 @@ function createMenu() {
|
||||
[1, 'filesystem', 'Disks / FS'],
|
||||
[1, 'network', 'Network'],
|
||||
[1, 'docker', 'Docker'],
|
||||
[1, 'vbox', 'Virtual Box'],
|
||||
[0, '', 'More'],
|
||||
[1, 'history', 'Version history'],
|
||||
[1, 'issues', 'Known Issues'],
|
||||
@ -27,6 +28,7 @@ function createMenu() {
|
||||
|
||||
var menuParent = document.getElementById('menu');
|
||||
var titleElement;
|
||||
var titleLink;
|
||||
var ulElement;
|
||||
var hrElement;
|
||||
var liElement;
|
||||
@ -35,8 +37,16 @@ function createMenu() {
|
||||
if (item[0] === 0) {
|
||||
titleElement = document.createElement('div');
|
||||
titleElement.classList.add('title');
|
||||
titleElement.innerText = item[2];
|
||||
menuParent.appendChild(titleElement);
|
||||
if (!item[1]) {
|
||||
titleLink = document.createElement('div');
|
||||
titleLink.innerText = item[2];
|
||||
} else {
|
||||
titleLink = document.createElement('a');
|
||||
titleLink.setAttribute('href', item[1] + (item[1].indexOf('#') >= 0 ? '' : '.html'));
|
||||
titleLink.innerText = item[2];
|
||||
}
|
||||
titleElement.appendChild(titleLink);
|
||||
hrElement = document.createElement('hr');
|
||||
titleElement.appendChild(hrElement);
|
||||
ulElement = document.createElement('ul');
|
||||
|
||||
@ -517,6 +517,16 @@ ul {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.menu .title a {
|
||||
width: 100%;
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.menu .title a:hover {
|
||||
color: #567adf;
|
||||
}
|
||||
|
||||
.menu hr {
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -346,6 +346,14 @@ ul {
|
||||
.title {
|
||||
margin: 25px 0 5px 0;
|
||||
color: #000;
|
||||
a {
|
||||
width: 100%;
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
&:hover {
|
||||
color: rgb(86, 122, 223);
|
||||
}
|
||||
}
|
||||
}
|
||||
hr {
|
||||
margin: 5px 0;
|
||||
|
||||
@ -58,6 +58,7 @@
|
||||
<li><strong>Ubuntu</strong> is a trademark of Canonical Ltd.</li>
|
||||
<li><strong>CentOS</strong> is a trademark of Read Hat Inc.</li>
|
||||
<li><strong>Sun, Solaris, OpenSolaris</strong> are registered trademarks of Sun Microsystems</li>
|
||||
<li><strong>Virtual Box</strong> are registered trademarks of Oracle Corporation</li>
|
||||
<li><strong>BSD</strong> is a registered trademark of UUnet Technologies, Inc.</li>
|
||||
<li><strong>UNIX</strong> is a registered trademark of The Open Group.</li>
|
||||
<li><strong>NVIDIA</strong> is a registered trademark of NVIDIA Corporation.</li>
|
||||
|
||||
456
docs/vbox.html
Normal file
456
docs/vbox.html
Normal file
@ -0,0 +1,456 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<!-- Required meta tags -->
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
||||
<!-- CSS -->
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-LRlmVvLKVApDVGuspQFnRQJjkv0P7/YFrw84YYQtmYG4nK8c+M+NlmYDCv0rKWpG" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="styles.css">
|
||||
<script src="main.js"></script>
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="/assets/android-icon-192x192.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="96x96" href="/assets/favicon-96x96.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png">
|
||||
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/styles/default.min.css">
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/highlight.min.js"></script>
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
|
||||
<title>systeminformation</title>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav class="nav">
|
||||
<div class="container">
|
||||
<a href="."><img class="logo float-left" src="assets/logo.png">
|
||||
<div class="title float-left">systeminformation</div>
|
||||
</a>
|
||||
<div class="text float-right github"><a href="https://github.com/sebhildebrandt/systeminformation">View on Github <i class="fab fa-github"></i></a></div>
|
||||
<div class="text float-right todocs"><a href="./#docs">Docs Overview</a></div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section class="container">
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-4 col-lg-3 col-xl-2 menu" id="menu">
|
||||
</div>
|
||||
<div class="col-12 col-md-8 col-lg-9 col-xl-10 content">
|
||||
<div class="row">
|
||||
<div class="col-12 sectionheader">
|
||||
<div class="title">Virtual Box</div>
|
||||
<div class="text">
|
||||
<p>In this section you will learn how to get information about virtual box VMs:</p>
|
||||
<p>For function reference and examples we assume, that we imported <span class="code">systeminformation</span> as follows:</p>
|
||||
<pre><code class="js">const si = require('systeminformation');</code></pre>
|
||||
<h2>VMs</h2>
|
||||
<p>All functions in this section return a promise or can be called with a callback function (parameter <span class="code">cb</span> in the function reference)</p>
|
||||
<table class="table table-sm table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Function</th>
|
||||
<th>Result object</th>
|
||||
<th>Linux</th>
|
||||
<th>BSD</th>
|
||||
<th>Mac</th>
|
||||
<th>Win</th>
|
||||
<th>Sun</th>
|
||||
<th>Comments</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>si.vboxInfo(cb)</td>
|
||||
<td>[{...}]</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>returns array of detailed info about all VMs</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].id</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>virtual box ID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].name</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>name</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].running</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>vbox is running</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].runningSince</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>running since (secs)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].guestOS</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>Guest OK</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].hardwareUUID</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>Hardware UUID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].memory</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>Memory in MB</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].vram</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>VRAM in MB</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].cpus</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>CPUs</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].cpuExepCap</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>CPU exec cap</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].cpuProfile</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>CPU profile</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].chipset</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>chipset</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].firmware</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>firmware</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].pageFusion</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>page fusion</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].configFile</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>config file</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].snapshotFolder</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>snapshot folder</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].logFolder</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>log folder path</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].HPET</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>HPET</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].PAE</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>PAE</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].longMode</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>long mode</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].tripleFaultReset</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>triple fault reset</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].APIC</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>APIC</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].X2APIC</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X2APIC</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].ACPI</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>ACPI</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].IOAPIC</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>IOAPIC</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].biosAPICmode</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>BIOS APIC mode</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].bootMenuMode</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>boot menu Mode</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].bootDevice1</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>bootDevice1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].bootDevice2</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>bootDevice2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].bootDevice3</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>bootDevice3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].bootDevice4</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>bootDevice4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].timeOffset</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>time Offset</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].RTC</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>RTC</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<footer class="container-fluid">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-4 col-12">
|
||||
<ul class="list-unstyled">
|
||||
<li><a href=".">Home</a></li>
|
||||
<li><a href="https://github.com/sebhildebrandt/systeminformation">Github <i class="fab fa-github"></i></a></li>
|
||||
<li><a href="contributors.html">Contributors</a></li>
|
||||
<li><a href="https://buymeacoff.ee/systeminfo">Buy me a coffee</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-lg-4 col-12">
|
||||
<ul class="list-unstyled">
|
||||
<li><a href="gettingstarted.html">Quick Start</a></li>
|
||||
<li><a href="issues.html">Known Issues</a></li>
|
||||
<li><a href="statsfunctions.html">Stats Functions</a></li>
|
||||
<li><a href="history.html">Version history</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-lg-4 col-12">
|
||||
<ul class="list-unstyled">
|
||||
<li><a href="https://www.plus-innovations.com">© 2019 Sebastian Hildebrandt, +innovations</a></li>
|
||||
<li><a href="copyright.html">Copyright & License</a></li>
|
||||
<li><a href="trademarks.html">Trademarks</a></li>
|
||||
<li><a href="https://github.com/sebhildebrandt/systeminformation/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" alt="MIT license" /></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
window.onload = function (e) {
|
||||
createMenu();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@ -35,6 +35,7 @@ const processes = require('./processes');
|
||||
const users = require('./users');
|
||||
const internet = require('./internet');
|
||||
const docker = require('./docker');
|
||||
const vbox = require('./virtualbox');
|
||||
|
||||
let _platform = process.platform;
|
||||
const _windows = (_platform === 'win32');
|
||||
@ -364,6 +365,8 @@ exports.dockerContainerStats = docker.dockerContainerStats;
|
||||
exports.dockerContainerProcesses = docker.dockerContainerProcesses;
|
||||
exports.dockerAll = docker.dockerAll;
|
||||
|
||||
exports.vboxInfo = vbox.vboxInfo;
|
||||
|
||||
exports.getStaticData = getStaticData;
|
||||
exports.getDynamicData = getDynamicData;
|
||||
exports.getAllData = getAllData;
|
||||
|
||||
@ -602,7 +602,7 @@ function versions(callback) {
|
||||
} else {
|
||||
functionProcessed();
|
||||
}
|
||||
})
|
||||
});
|
||||
} else {
|
||||
exec('java -version 2>&1', function (error, stdout) {
|
||||
if (!error) {
|
||||
@ -632,8 +632,7 @@ function versions(callback) {
|
||||
});
|
||||
}
|
||||
});
|
||||
const vboxmanagePath = _windows ? process.env.VBOX_INSTALL_PATH || process.env.VBOX_MSI_INSTALL_PATH + '\\VBoxManage.exe' + '" ' : 'vboxmanage';
|
||||
exec(vboxmanagePath + ' -v 2>&1', function (error, stdout) {
|
||||
exec(util.getVboxmanage() + ' -v 2>&1', function (error, stdout) {
|
||||
if (!error) {
|
||||
const vbox = stdout.toString().split('\n')[0] || '';
|
||||
const parts = vbox.split('r');
|
||||
|
||||
@ -254,6 +254,10 @@ function wmic(command, options) {
|
||||
});
|
||||
}
|
||||
|
||||
function getVboxmanage() {
|
||||
return _windows ? process.env.VBOX_INSTALL_PATH || process.env.VBOX_MSI_INSTALL_PATH + '\\VBoxManage.exe' + '" ' : 'vboxmanage';
|
||||
}
|
||||
|
||||
function powerShell(cmd) {
|
||||
|
||||
let result = '';
|
||||
@ -407,6 +411,7 @@ exports.parseHead = parseHead;
|
||||
exports.findObjectByKey = findObjectByKey;
|
||||
exports.getWmic = getWmic;
|
||||
exports.wmic = wmic;
|
||||
exports.getVboxmanage = getVboxmanage;
|
||||
exports.powerShell = powerShell;
|
||||
exports.nanoSeconds = nanoSeconds;
|
||||
exports.countUniqueLines = countUniqueLines;
|
||||
|
||||
102
lib/virtualbox.js
Normal file
102
lib/virtualbox.js
Normal file
@ -0,0 +1,102 @@
|
||||
'use strict';
|
||||
// @ts-check
|
||||
// ==================================================================================
|
||||
// virtualbox.js
|
||||
// ----------------------------------------------------------------------------------
|
||||
// Description: System Information - library
|
||||
// for Node.js
|
||||
// Copyright: (c) 2014 - 2019
|
||||
// Author: Sebastian Hildebrandt
|
||||
// ----------------------------------------------------------------------------------
|
||||
// License: MIT
|
||||
// ==================================================================================
|
||||
// 14. Docker
|
||||
// ----------------------------------------------------------------------------------
|
||||
|
||||
const os = require('os');
|
||||
const exec = require('child_process').exec;
|
||||
const util = require('./util');
|
||||
|
||||
function vboxInfo(all, callback) {
|
||||
|
||||
// fallback - if only callback is given
|
||||
if (util.isFunction(all) && !callback) {
|
||||
callback = all;
|
||||
all = false;
|
||||
}
|
||||
|
||||
all = all || false;
|
||||
let result = [];
|
||||
return new Promise((resolve) => {
|
||||
process.nextTick(() => {
|
||||
try {
|
||||
exec(util.getVboxmanage() + ' list vms --long', function (error, stdout) {
|
||||
let parts = stdout.toString().split('Name:');
|
||||
parts.shift();
|
||||
parts.forEach(part => {
|
||||
const lines = part.split(os.EOL);
|
||||
if (lines && lines[0]) {
|
||||
lines[0] = 'Name:' + lines[0];
|
||||
}
|
||||
const state = util.getValue(lines, 'State');
|
||||
const running = state.startsWith('running');
|
||||
const runningSinceString = running ? state.replace('running (since ', '').replace(')', '').trim() : '';
|
||||
let runningSince = 0;
|
||||
try {
|
||||
if (running) {
|
||||
const sinceDateObj = new Date(runningSinceString);
|
||||
const offset = sinceDateObj.getTimezoneOffset();
|
||||
runningSince = Math.round((Date.now() - Date.parse(sinceDateObj)) / 1000) + offset * 60;
|
||||
}
|
||||
} catch (e) {
|
||||
util.noop();
|
||||
}
|
||||
result.push({
|
||||
id: util.getValue(lines, 'UUID'),
|
||||
name: util.getValue(lines, 'Name'),
|
||||
running,
|
||||
runningSince,
|
||||
guestOS: util.getValue(lines, 'Guest OS'),
|
||||
hardwareUUID: util.getValue(lines, 'Hardware UUID'),
|
||||
memory: parseInt(util.getValue(lines, 'Memory size', ' '), 10),
|
||||
vram: parseInt(util.getValue(lines, 'VRAM size'), 10),
|
||||
cpus: parseInt(util.getValue(lines, 'Number of CPUs'), 10),
|
||||
cpuExepCap: util.getValue(lines, 'CPU exec cap'),
|
||||
cpuProfile: util.getValue(lines, 'CPUProfile'),
|
||||
chipset: util.getValue(lines, 'Chipset'),
|
||||
firmware: util.getValue(lines, 'Firmware'),
|
||||
pageFusion: util.getValue(lines, 'Page Fusion') === 'enabled',
|
||||
configFile: util.getValue(lines, 'Config file'),
|
||||
snapshotFolder: util.getValue(lines, 'Snapshot folder'),
|
||||
logFolder: util.getValue(lines, 'Log folder'),
|
||||
HPET: util.getValue(lines, 'HPET') === 'enabled',
|
||||
PAE: util.getValue(lines, 'PAE') === 'enabled',
|
||||
longMode: util.getValue(lines, 'Long Mode') === 'enabled',
|
||||
tripleFaultReset: util.getValue(lines, 'Triple Fault Reset') === 'enabled',
|
||||
APIC: util.getValue(lines, 'APIC') === 'enabled',
|
||||
X2APIC: util.getValue(lines, 'X2APIC') === 'enabled',
|
||||
ACPI: util.getValue(lines, 'ACPI') === 'enabled',
|
||||
IOAPIC: util.getValue(lines, 'IOAPIC') === 'enabled',
|
||||
biosAPICmode: util.getValue(lines, 'BIOS APIC mode'),
|
||||
bootMenuMode: util.getValue(lines, 'Boot menu mode'),
|
||||
bootDevice1: util.getValue(lines, 'Boot Device 1'),
|
||||
bootDevice2: util.getValue(lines, 'Boot Device 2'),
|
||||
bootDevice3: util.getValue(lines, 'Boot Device 3'),
|
||||
bootDevice4: util.getValue(lines, 'Boot Device 4'),
|
||||
timeOffset: util.getValue(lines, 'Time offset'),
|
||||
RTC: util.getValue(lines, 'RTC'),
|
||||
});
|
||||
});
|
||||
|
||||
if (callback) { callback(result); }
|
||||
resolve(result);
|
||||
});
|
||||
} catch (e) {
|
||||
if (callback) { callback(result); }
|
||||
resolve(result);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
exports.vboxInfo = vboxInfo;
|
||||
Loading…
x
Reference in New Issue
Block a user