-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Example:
const diskinfo = require('diskinfo');
setInterval(function(){
diskinfo.getDrives(function(err, aDrives) {
if(!err){
console.log(aDrives)
}
});
},2000)
/output of the console.log after repeat twice
[ { filesystem: '/dev/mapper/vg_root-LogVol01',
blocks: '36819652',
used: '28908684',
available: '6033976',
capacity: '83%',
mounted: '/' },
{ filesystem: 'tmpfs',
blocks: '16441032',
used: '28964',
available: '16412068',
capacity: '1%',
mounted: '/dev/shm' } ]
[ { filesystem: '/dev/mapper/vg_root-LogVol01',
blocks: '36819652',
used: '28908684',
available: '6033976',
capacity: '83%',
mounted: '/' },
{ filesystem: 'tmpfs',
blocks: '16441032',
used: '28964',
available: '16412068',
capacity: '1%',
mounted: '/dev/shm' },
{ filesystem: '/dev/mapper/vg_root-LogVol01',
blocks: '36819652',
used: '28908684',
available: '6033976',
capacity: '83%',
mounted: '/' },
{ filesystem: 'tmpfs',
blocks: '16441032',
used: '28964',
available: '16412068',
capacity: '1%',
mounted: '/dev/shm' } ]