title: How to calculate disk space on remote server and store values using ssh2 & node.js?
body: <p>Currently I'm using SSH2 and node.js to monitor disk space and partitions over remote server. And printing output to console. But the output is in string format so I couldn't store free space / total space value in any variable. 
  Current I'm running <strong>df -k</strong> command using <strong>con.exec</strong> in <strong>node.js(ssh2)</strong> to run command over remote servers using credentials.</p>
  
  <ol>
  <li>So How would it would be possible(store disk space in variable). </li>
  <li>My Final task is to check disk space over remote server and generate alert if it is &lt; 25%. </li>
  <li>And also for HTML part I'm using AngularJs. So I've to give a button over web page to force check and for generating alert for users.</li>
  </ol>
  
  <p>I've added the output format I'm receiving over console(both) below </p>
  
  <p><a href="https://i.stack.imgur.com/9qfav.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9qfav.png" alt="Shell Console Output"></a>
  <a href="https://i.stack.imgur.com/DGwJ8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DGwJ8.png" alt="Browser Console Output"></a></p>