Wednesday, November 2, 2011

Monitoring disk space usage on Sun Fishworks (7000) ZFS Storage Appliances

We needed a way to have our existing monitoring system alert us if a project was running out of space. There's not a single CLI command that will show all projects, but this bit of ECMAscript 3will output an easily parsed table:


 script  
 //  
 // jwasilko@gmail.com  
 // fishworks' cli user interface doesn't provide a good way to monitor  
 // disk space of all projects. This is an attempt to make up for that.   
 //  
 run('shares');  
 projects = list();  
 printf('%-40s %-10s %-10s %-10s\n', 'SHARE', 'AVAIL', 'USED', 'SNAPUSED');  
 for (i = 0; i < projects.length; i++) {  
     run('select ' + projects[i]);  
     shares = list();  
         for (j = 0; j < shares.length; j++) {  
         run('select ' + shares[j]);  
         share = projects[i] + '/' + shares[j];  
         used = run('get space_data').split(/\s+/)[3];  
         avail = run('get space_available').split(/\s+/)[3];  
         snap = run('get space_snapshots').split(/\s+/)[3];  
         printf('%-40s %-10s %-10s %-10s\n', share, avail, used, snap);  
         run('cd ..');  
     }  
     run('cd ..');  
 }  

2 comments:

  1. What persons are really getting by placing their hard-earned cash right into a slot machine today is an escape. Nowadays, mobile gaming has become a part of|part of} the standard supply of any reputable on line casino. 카지노게임 As a outcome, the market is overwhelmed with meticulously designed on line casino games; particularly mobile slots that present an exceptional playing expertise on the go.

    ReplyDelete
  2. Although casinos could earn some cash from meals, leisure, and different venues, the breadwinner for the business is the video games. A significant portion of on line casino profits are the result of|the results of} the accrual of all the losses from on line casino patrons every year. The home advantage obviously isn’t insurmountable—people do win . However, it does mean that the extra you play, the extra the mathematics works in opposition to you, and the higher 1xbet the probabilities are of you walking out of the on line casino with much less cash in your pockets than when you got here in.

    ReplyDelete