Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Aug 2012
    Posts
    69
    Thanks
    24
    Thanked 0 Times in 0 Posts

    Lightbulb Script to show occupancy on stgpool for inactive nodes

    Hi there,

    We have this script (which I got from another site) which shows us node data grouped by stgpool. However, I'd like to know the occupancy of all nodes, grouped by stgpool, but, inactive only.

    Here is what we use now:
    SELECT node_name, filespace_name, stgpool_name, SUM(logical_mb) AS "Total MB" FROM occupancy WHERE node_name='NOCD1' GROUP BY node_name, filespace_name, stgpool_name ORDER BY filespace_name

    How can I get the above to show nodes that have not accessed the server in 30 days or more?

  2. #2
    Senior Member
    Join Date
    Jul 2008
    Location
    Birmingham, UK
    Posts
    537
    Thanks
    0
    Thanked 5 Times in 4 Posts

    Default

    Hi

    This should do what you want..

    SELECT aa.node_name, bb.filespace_name, bb.stgpool_name, SUM(bb.logical_mb) AS "Total MB" FROM nodes aa, occupancy bb where aa.lastacc_time<=(current_timestamp - 30 days) and aa.node_name=bb.node_name group by aa.node_name, bb.filespace_name, bb.stgpool_name ORDER BY bb.filespace_name

    Hope that helps

  3. #3
    Member
    Join Date
    Aug 2012
    Posts
    69
    Thanks
    24
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by redplumptomato View Post
    Hi there,

    We have this script (which I got from another site) which shows us node data grouped by stgpool. However, I'd like to know the occupancy of all nodes, grouped by stgpool, but, inactive only.

    Here is what we use now:
    SELECT node_name, filespace_name, stgpool_name, SUM(logical_mb) AS "Total MB" FROM occupancy WHERE node_name='NOCD1' GROUP BY node_name, filespace_name, stgpool_name ORDER BY filespace_name

    How can I get the above to show nodes that have not accessed the server in 30 days or more?
    FANTASTIC!!!

    Exactly what I was looking for!

Similar Threads

  1. Show size of Inactive Files
    By redplumptomato in forum Scripting
    Replies: 0
    Last Post: 09-14-2012, 04:52 PM
  2. Occupancy of inactive files
    By dreamz in forum Backup / Archive Discussion
    Replies: 7
    Last Post: 05-19-2009, 10:59 AM
  3. Query Active or Inactive file occupancy
    By Netscape in forum TSM Server
    Replies: 5
    Last Post: 12-14-2007, 11:40 AM
  4. Occupancy by all nodes in one query.
    By zeke in forum Performance Tuning
    Replies: 6
    Last Post: 07-07-2006, 04:06 AM
  5. Occupancy Script for Inactive files
    By jfsilverman in forum Scripting
    Replies: 3
    Last Post: 09-19-2005, 09:02 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •