Client Management Suite

 View Only
Expand all | Collapse all

Is there a way to have defrag analyze detail from the NS database?

  • 1.  Is there a way to have defrag analyze detail from the NS database?

    Posted Mar 02, 2012 07:47 AM

    Hello,

    i would like to launch a defrag analyze on every computers and than check the results for some computers, so i found the tables with start/stop/result of the task but not the table that should gave me the details of the task and in wich i can find the pourcentage of fragmentation of the disk.

     

    Anyone could point me to the right table?

     

    regards



  • 2.  RE: Is there a way to have defrag analyze detail from the NS database?

    Posted Mar 02, 2012 10:56 AM

    if anyone is intertested:

     

    SELECT a.[Name],
            b.[StartTime],
            b.[EndTime],
            b.[Result],
            b.[Success],
            c.[Name],
            substring(d.[Value],
                charindex('Total fragmentation',d.[Value]),
                charindex('File fragmentation',d.[Value]) - charindex('Total fragmentation',d.[Value])) as fragmentation
    FROM [vComputer] a
    left outer join dbo.Evt_Task_Instances b  on a.[Guid] = b.[_ResourceGuid]
    left outer join [Symantec_CMDB].[dbo].[TaskInstanceSummaries] c on
        b.[TaskVersionGuid] = c.[TaskVersionGuid]
    left outer join [Symantec_CMDB].[dbo].[TaskOutputPropertyValue] d on
        b.[TaskInstanceGuid] = d.[TaskInstanceGuid]
    where lower(c.[Name]) like '%defrag%'
    and lower(d.[Name]) = 'scriptoutput'
    order by b.[StartTime]