Excel report for memory, CPU and disk utilization report


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?
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.

Satish AutiSenior System AdministratorAuthor Commented:
File attached.
Gerald ConnollyCommented:
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
Get Blueprints for Increased Customer Retention

The IT Service Excellence Tool Kit has best practices to keep your clients happy and business booming. Inside, you’ll find everything you need to increase client satisfaction and retention, become more competitive, and increase your overall success.

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")
      Set objExcel=WScript.CreateObject("Excel.Application")
      Set objWorkbook=objExcel.Workbooks.Add()
      Set objWorkSheet=objWorkbook.Worksheets(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.
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

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
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.