#!/usr/bin/perl
#
# $Id: sm_devstat 11240 2008-06-18 18:36:40Z teetov $
# 
# Purpose: collect stat information about space consumers. 
# The goal of the device statistics:
#  1. Calculate projected write power (WP KB/s)
#  2. Calculate total space consumption (SP GB)
#
# WP is calculated every 5 minutes. 
# SP is calculated every hour
#
# Note: consider RRD for keeping history
# for REQ see: Rally S623:Storage Manager with FRD  TA1114: device statistics
# 
# Example of device stat file:
# $APL/var/conf/$dev/stat
# DATE=123765734
# SP=21
# WP=300
# WP_MAX=532
# WP_AVG=234
# WP_CUR=300
# WP_LAST=290
# WP_CALC=400
# WP_C123765734=342
# WP_C123766767=265
# ....
# WP_C123878987=234

sleep 60;
