Commit f1f2d3e9 authored by Alexandra's avatar Alexandra Committed by Alexandra Rogova

new data

parent 335e33e3
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -9,7 +9,8 @@ var path = args.r
var stream = fs.createWriteStream(path, {flags: "w+"});
stream.write("time,ram,disk\n");
//var start_disk;
var start_disk;
var start_ram = os.totalmem() - os.freemem();
// function init_server (){
// var port = 9030;
......@@ -28,8 +29,8 @@ var check = function(){
setTimeout(function () {
diskspace.check("/", function(err, result){
//var disk_used = parseInt(result.used) - parseInt(start_disk);
var disk_used = result.used;
var ram_used = os.totalmem() - os.freemem();
var disk_used = result.used - start_disk;
var ram_used = os.totalmem() - os.freemem() - start_ram;
stream.write(Date.now() + "," + ram_used + "," + disk_used + "\n");
check();
});
......@@ -37,8 +38,7 @@ var check = function(){
}
//init_server();
// diskspace.check("C", function (err, result){
// start_disk = result.used;
// check();
// });
check();
diskspace.check("C", function (err, result){
start_disk = result.used;
check();
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment