diff --git a/dashboard/src/components/GraphItem.vue b/dashboard/src/components/GraphItem.vue index d828ede3d..247f266ce 100644 --- a/dashboard/src/components/GraphItem.vue +++ b/dashboard/src/components/GraphItem.vue @@ -185,7 +185,7 @@ function onPeriodChanged() { min: 0, grace: 100*1000, // add 100kBps. otherwise, the yaxis auto-scales to data and the values appear too dramatic ticks: { - callback: (value) => `${prettyDecimalSize(value)}ps`, + callback: (value) => `${prettyDecimalSize(value)}/s`, maxTicksLimit: 6 // max tick labels to show }, beginAtZero: true, @@ -197,7 +197,7 @@ function onPeriodChanged() { min: 0, grace: 50*1000, // add 50kBps. otherwise, the yaxis auto-scales to data and the values appear too dramatic ticks: { - callback: (value) => `${prettyDecimalSize(value)}ps`, + callback: (value) => `${prettyDecimalSize(value)}/s`, maxTicksLimit: 6 // max tick labels to show }, beginAtZero: true, diff --git a/src/metrics.js b/src/metrics.js index bfd1cca6f..aed00d8bf 100644 --- a/src/metrics.js +++ b/src/metrics.js @@ -114,7 +114,6 @@ async function readDiskMetrics() { const blockDevice = match ? match[1] : base; if (!blockDevice) throw new BoxError(BoxError.EXTERNAL_ERROR, 'Could not find root block device name'); - const diskstats = await fs.promises.readFile('/proc/diskstats', { encoding: 'utf8' }); const statsLine = diskstats.split('\n').find(l => l.includes(` ${blockDevice} `)); if (!blockDevice) throw new BoxError(BoxError.EXTERNAL_ERROR, 'Could not get disk stats'); @@ -359,6 +358,9 @@ async function readSystemFromGraphite(options) { // Network: // raw stats: ip -s link show eth0 // testing: curl -o /dev/null https://ash-speed.hetzner.com/10GB.bin and then use nethogs eth0 (cycle with 'm') +// Disk: +// writing: fio --name=rate-test --filename=tempfile --rw=write --bs=4k --ioengine=libaio --rate=20M --size=5000M --runtime=150 --direct=1. test with iotop +// reading: fio --name=rate-test --filename=tempfile --rw=read --bs=4k --ioengine=libaio --rate=20M --size=5000M --runtime=150 --direct=1. test with iotop async function getSystem(options) { assert.strictEqual(typeof options, 'object');