Excel report for memory, CPU and disk utilization report

Hello,

I have an script which gives me output of memory, CPU and disk utilization in excel. Whenever I run the script it gives output in different new file.
I want report should get generated in single file for multiple run times. So that I can take average utilization report for all these items.

Is there any way to modify the script to append this data in single file?
LVL 12
Satish AutiSenior System AdministratorAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

#AKS#Tech BloggggerrrCommented:
Could you please share the script you use, it will be easy to understand and propose the solution.

Thanks
1
Satish AutiSenior System AdministratorAuthor Commented:
File attached.
Checklist1.vbs
0
Gerald ConnollyCommented:
strDirectory="D:\Checklist\Output"
.
.
.
hr=Hour(Now)
mi=Minute(Now)
se=Second(Now)
dn=Right(Now,2)
time=hr & mi & se & dn
sys=Day(Date) & MonthName(Month(Date)) & time
mth=strDirectory & "\Checklist(" & sys & ").xls"
Set objFSO=CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(mth) Then

Open in new window

so mth = "D:\Checklist\Output\Checklist(" + sys + ").xls"
sys appears to be a date TIME based, so will be unique every time it is used

Also i think you will find a benefit of using a YYYYMMDD format for a file name - they automatically sort into chronological order that way
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Satish AutiSenior System AdministratorAuthor Commented:
Ok .. it is clear that code is already written there to edit the existing excel but its not happening.

Set objFSO=CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(mth) Then
      Set objExcel=CreateObject("Excel.Application")
      Set objWorkbook=objExcel.WorkBooks.Open(mth)
      Set objWorkbook=objExcel.ActiveWorkBook.WorkSheets("Sheet1")
      i=objExcel.Cells(250,250).Value
      count=objExcel.Cells(250,251).Value
Else
      Set objExcel=WScript.CreateObject("Excel.Application")
      Set objWorkbook=objExcel.Workbooks.Add()
      Set objWorkSheet=objWorkbook.Worksheets(1)
      i=2
      count=1

How do I set a name for excel file in script as it's automatically taking name depend upon a what time it runs like below. See the pic.
Capture.JPG
0
Gerald ConnollyCommented:
Thats what i said!

If you remove the time element from the filename
sys=Day(Date) & MonthName(Month(Date)) & time

Open in new window

   goes to  
sys=Day(Date) & MonthName(Month(Date))

Open in new window

then you will get one file for every day

But my suggestion is that Convert this to end up with "Checklist-YYMMDD" so that the files sort by default into chronological order

so something like
"sys=Year(Date) & Month(Date) & Day(Date)"

Open in new window

or do away with the intermediate step
"mth=strDirectory & "\Checklist-" & Year(Date) & Month(Date) & Day(Date) & ".xls"

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Gerald ConnollyCommented:
Simple mod to script
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.