Record: -d
duration
arecord -d 5 test-mic.wav
Play:
aplay test-mic.wav
Paging works by creating an area on your hard drive and using it for extra memory, this memory is much slower than normal memory however much more of it is available.
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
sudo /sbin/mkswap /var/swap.1
sudo chmod 600 /var/swap.1
sudo /sbin/swapon /var/swap.1
If you need more than 1024 then change that to something higher.
To enable it by default after reboot, add this line to /etc/fstab
:
/var/swap.1 swap swap defaults 0 0
find . -type f -exec chmod 644 {} +
find . -type d -exec chmod 744 {} +
function memoryUsage(cb) {
var spawn, proc, str, lines, i, total, free, used;
spawn = require('child_process').spawn;
proc = spawn('free', ['-m']);
proc.stdout.setEncoding('utf8');
proc.stdout.on('data', function (data) {
str = data.toString();
lines = str.split(/\n/g);
for (i = 0; i < lines.length; i++) {
lines[i] = lines[i].split(/\s+/);
}
total = parseInt(lines[1][1]);
free = parseInt(lines[2][2]);
used = parseInt(lines[2][3]);
});
proc.on('close', function (code) {
cb({
unit: "megabytes",
total: total,
free: free,
used: used,
percent: {
free: parseInt((free / total * 100))
}
});
});
}
memoryUsage(function(memmory) {
console.log(memmory);
});
In Short:
iostat
is part of the sysstat
package, which is able to show overall iops if desired, or show them separated by reads/writes.
Run iostat
with the -d
flag to only show the device information page, and -x
for detailed information (separate read/write stats). You can specify the device you want information for by simply adding it afterwards on the command line.
Try running iostat -dx
and looking at the summary to get a feel for the output. You can also use iostat -dx 1
to show a continuously refreshing output, which is useful for troubleshooting or live monitoring.
More Information unix.stackexchange