Inventory of cluster and statistics. Missing some info...
Hello
Working on a script which cluster collection of statistics and the inventory (at the request of every 24 hours). I am satisfied with the results so far, but missing a few parts (lines beginning with q...) to make this script more complete and if possible suggestions to improve the speed of execution.
Thanks in advance
My environment: PowerCli 4.1 Running against ESX 3.5/vCenter 2.5
The code of script glued and attached as a file.
CLS
$VC = args [0]
$ScanDate = get-Date-format "dd-MM-yyyy_hh_mm".
$ScanDate2 = Get-Date-format ' YYYY-MM-dd hh: mm ".
SE connect-Viserver $VC
$currDir Split-path-parent = $MyInvocation.MyCommand.Definition
$outputFile = $currDir + '-' + $VC + '_' + $ScanDate + '_Cluster_inventory_and_reporting.csv '.
$row = @)
$report = @)
$i = 0
$b = 0
$Clusters = get-Cluster | Get-View
$b = $Clusters.Length
$metrics = "mem.usage.average", "cpu.usagemhz.average".
ForEach ($Cls in $Clusters)
{
$i ++
write-progress-id 1 - activity "Please wait...". Inventory of cluster"- State 'Cluster $i van $b' - percentComplete (($i/$b) * 100)
$row = "" | Select ScanDate, vCenter, Datacenter, Cluster, HAEnabled, DRSEnabled, HostFailure, '
NumVmotions, OverallStatus, NumVMs, warehouses of data, NumHosts, NumEffectiveHosts, '
TotalCpu, EffectiveCpu, TotalMemory, EffectiveMemory, NumCpuCores, '
ClusterCPUMax24_usagemhz, ClusterCPUAvg24_usagemhz, ClusterCPUMin24_usagemhz, '
ClusterMemMax24_usage, ClusterMemAvg24_usage, ClusterMemMin24_usage, Hostslist, VMsList
$row. ScanDate = $ScanDate2
$row.vCenter=$Cls.Client.ServiceUrl.Split('/') [2]
$row. Cluster = $CLS. Name
$row. Datacenter = & {}
$parent = get-view $Cls.Parent
While ($parent. GetType(). Name - not "data center") {}
$parent is get-view $parent. Parent
}
$parent. Name
}
$VMsList = «»
$VMx = get-cluster $Cls.Name | Get - VM
$row. NumVMs = $VMx.count
$VMx | ForEach-Object {$VMsList += "$($_.)} Name) | »}
$row. VMsList = $VMsList.TrimEnd("|")
$Hostslist = «»
$VMHostx = get-cluster $Cls.Name | Get-VMhost | ForEach-Object {$Hostslist += "$($_.)} Name) | »}
$row. Hostslist = $Hostslist.TrimEnd("|")
$row.datastores = (get-cluster $Cls.name | get-vmhost | get-data store). County
# Q1: here the great SumOf inUse % and % free space (GB) data for this cluster store
$row.ds_grand_total_in_use =?
$row.ds_grand_total_free =?
$row. OverallStatus = $Cls.OverallStatus
$row. HAEnabled = $Cls.configuration.Dasconfig.Enabled
$row. DRSEnabled = $Cls.configuration.Drsconfig.Enabled
$row. HostFailure = $Cls.configuration.Dasconfig.Failoverlevel
$row. NumVmotions = $Cls.summary.NumVmotions
# Q2: is it possible to put here the NumVMotions that took place in the last 24 hours?
# I guess we need check the events...
#row. VMotionslast24h =?
$row. NumHosts = $Cls.summary.NumHosts
$row. NumEffectiveHosts = $Cls.summary.NumEffectiveHosts
$row. TotalCpu = $Cls.Summary.TotalCpu
$row. EffectiveCpu = $Cls.Summary.EffectiveCpu
$row. NumCpuCores = $Cls.Summary.NumCpuCores
# Q3: how to calculate the total vCPUs are committed for this cluster?
#row.tot_vcpu_commited =?
$row. TotalMemory = $Cls.Summary.TotalMemory
$row. EffectiveMemory = $Cls.Summary.EffectiveMemory
# Q4: how to calculate the total memory are committed for this cluster?
#row.tot_mem_gb_commited =?
$stats = get-Stat-entity (GET-CLUSTER $Cls.Name) - Stat $metrics - beginning (get-date). AddDays(-1)-done (Get-Date) - MaxSamples 10000
$row. ClusterCPUAvg24_usagemhz = [Math]: Round (($stats | where {$_.)) MetricId - eq "cpu.usagemhz.average"} | Measure-object-propriete value - average). Requests, 1).
$row. ClusterCPUMax24_usagemhz = [Math]: Round (($stats | where {$_.)) MetricId - eq "cpu.usagemhz.average"} | Measure - Object - property - maximum value). Maximum, 1)
$row. ClusterCPUMin24_usagemhz = [Math]: Round (($stats | where {$_.)) MetricId - eq "cpu.usagemhz.average"} | Measure - Object - property - Minimum value). Minimum 1).
$row. ClusterMemAvg24_usage = [Math]: Round (($stats | where {$_.)) MetricId - eq "mem.usage.average"} | Measure-object-propriete value - average). Requests, 1).
$row. ClusterMemMax24_usage = [Math]: Round (($stats | where {$_.)) MetricId - eq "mem.usage.average"} | Measure - Object - property - maximum value). Maximum, 1)
$row. ClusterMemMin24_usage = [Math]: Round (($stats | where {$_.)) MetricId - eq "mem.usage.average"} | Measure - Object - property - Minimum value). Minimum 1).
$report += $row
}
$report | Export-Csv-path $outputFile - NoTypeInformation
Try the attached script.
Tags: VMware
Similar Questions
-
There is no house icon, refresh icon or front/back arrow at the top of the screen. How can I make it appear?
See what happened to the buttons Back, refresh and home
Please visit our FAQ after Firefox update
See the back and forward or other toolbar missing
See also How to customize the tool bar and customization of the toolbar (Mozillazine)If this answer solved your problem, please click 'Solved It' next to this response when connected to the forum.
Not related to your question, but...
You must update some plug-ins:
- Plugin check: https://www-trunk.stage.mozilla.com/en-US/plugincheck/
- Next-generation Java plug-in for the Mozilla browser: install or update Java in Firefox
-
parental control is missing some info.
As one administrator with two workstations, I wouldn't be able to change the time available on the standard desktop of the standard desktop, which I was surprised to find out that I could do. I am the admin of my office, and it is the standard user.
What Miss me? Desktop of my son has no password, but deadlines have worked. I saw that he was on the computer after hours last night and then discovered that he / I could change the time from his office through parental controls.
Thank you!
http://www.bleepingcomputer.com/tutorials/tutorial139.html
Read the tutorial above.
It is a very good guide on how to set up Parental controls.
See you soon.
Mick Murphy - Microsoft partner
-
How can I recover my windows vista serial, the tile is broken and im missing some numbers...
I lost my toshiba recovery CD, it is an a135/s4677, I reinstalled vista, but in the first instance. I am already taking pictures of the sticker and serial No. my laptop if you need if you can help me please write me * address email is removed from the privacy * thank youIf you had not reinstalled Vista, we helped you recover the product key of Vista for running old, Vista activated using specific programs.
But, as you have wiped the hard and reinstall Vista, we will not help you recover the product key.
http://www.CSD.Toshiba.com/cgi-bin/TAIS/support/JSP/home.jsp
Contact your computer manufacturer and ask them to send a recovery disk/s Vista set.
Normally, they do this for a cost of $ small.
Using recovery disks is normally not need to insert a product key.
See you soon. Mick Murphy - Microsoft partner
-
Hello
I wanted to collect script inventory VM VM name with location, name of the Cluster and data store total size and free space left in Datastore.I have script but his mistake of shows during its execution. Any help on this will be apreciated.
Thank you
VMG
Error: -.
Get-view: could not validate the argument on the parameter "VIObject". The argument is null or empty. Provide an argument that is not null or empty, and then try
the command again.
E:\script\VM-DS-cluster.ps1:7 tank: 20
+ $esx = get-view < < < < $vm. Runtime.Host - name of the Parent property
+ CategoryInfo: InvalidData: (:)) [Get-view], ParameterBindingValidationException)
+ FullyQualifiedErrorId: ParameterArgumentValidationError, VMware.VimAutomation.ViCore.Cmdlets.Commands.DotNetInterop.GetVIViewGet-view: could not validate the argument on the parameter "VIObject". The argument is null or empty. Provide an argument that is not null or empty, and then try
the command again.
E:\script\VM-DS-cluster.ps1:8 tank: 24
+ $cluster = get-view < < < < $esx. Parent - the name of the property
+ CategoryInfo: InvalidData: (:)) [Get-view], ParameterBindingValidationException)
+ FullyQualifiedErrorId: ParameterArgumentValidationError, VMware.VimAutomation.ViCore.Cmdlets.Commands.DotNetInterop.GetVIViewGet-view: could not validate the argument on the parameter "VIObject". The argument is null or empty. Provide an argument that is not null or empty, and then try
the command again.
E:\script\VM-DS-cluster.ps1:9 tank: 24
+ += get-view $report < < < < $vm. Store data-name of the property, summary |
+ CategoryInfo: InvalidData: (:)) [Get-view], ParameterBindingValidationException)
+ FullyQualifiedErrorId: ParameterArgumentValidationError, VMware.VimAutomation.ViCore.Cmdlets.Commands.DotNetInterop.GetVIViewIt seems that your copy/paste lost some
. I have attached the script
-
Yesterday, I downloaded Windows 8, and although using it was confusing I got the hang of it. Today, I used the computer again and everything was fine but then I stopped him and a few hours later, when I turned it on a blue screen appeared and he says:
RecoveryYour PC needs to be repairedThe Boot Configuration data file is missing some information required.Leader: \Boot\0xc000000dOT: After victory. Download 8 it won't launchI have no idea what is happening or how to fix it. Any help to help me understand and solve this problem would be appreciated.Met the same question from one day to the other - re install Win 8< week="" old="" decided="" to="" misbehave="" on="" a="" reboot.="" nothing="" untoward="">
In any case discovered that the automatic startup repair is less useless for me. He could not fix anything whatsoever after the diagnosis and just gave up.
However, resort to repair (start your windows installation CD) command line prompt, I managed to solve it with the command of the ffg on the command line.
Bootrec /rebuildbcd
More info about bootrec available using your favorite search engine.
for example, this site was useful for me
http://superuser.com/questions/451277/missing-boot-files-in-Windows-8
For users in previous posts with problems and have only a version downloaded to Win 8 - well I'd say that you yourself create a DVD of the version uploaded to win 8 - the installation program ask you if you want to create media - that will create a 4.x GB. ISO file that you can burn to DVD. There is enough information on how to do this just search online.
With regard to creating a way to initiate Win8 installer from USB Eh well I heard the ffg tool works with Win 8 too but cannot vouch for her since have never tried so its at your own risk.
http://www.microsoftstore.com/store/msstore/HTML/pbPage.Help_Win7_usbdvd_dwnTool?ClickID=ckqs4fqifskwfnxlpiwkzwxqwwwzlvvlezzk
Good luck, have fun,
See you soon
-
DRM for export missing some tables
Hi all
I use DRM 11.1.2.3.300 and I am trying to perform an export from an Oracle DRM schema by using the following command:
exp FILE = userid=DRM_DB/Password@MYINSTANCE y = DRMAPP1_20130913.dmp direct statistics = none compress = n log = EXP_DRM_DB_20130913.log
However, once the export is complete, I look in the log file and see that some tables were exported from not, such as RM_BOOK and RM_BOOK_ITEM.
Am I missing something to order exp or something isn't here?
Thank you
Why don't you try utility Oracle Datapump to export Oracle database?
See this: Data Pump Export
The command is expdp.
Thank you
Santy.
-
Satellite A200-1YW - missing some drivers Win 8
Windows 8 Pro, Toshiba has 200 1YW
After the installation of Windows 8 for some drivers do not work.
Laptop does not read the SD card (are not) and is still missing some driver that I can't identify.
Why Toshiba does not have an automatic "deskupdate" such as Fujitsu? A lot of problems would be solved.
Obviously, each laptop manufacturer's own support system.
In your case the problem is that your old laptop Satellite is not supported for Win8 OS.There is no problem with the supported models.
-
Satellite Pro L870 - missing some drivers for Win 7 - unknown device DEV_1E3A
Just took delivery of some new L870 Pro of Satellite we have reinstalled Windows 7 but seem to be missing some drivers. I downloaded installed all the drivers available from the download site but we still have an unknown device.
VEN_8086 & DEV_1E3A
Looking around it can be an IMEI chip but I was not able to confirm the DEV ID of any of our sources generally. Does anyone have an idea what it is and where I could get the 64 bit Windows 7 drivers?
Post edited by: Bashfuluk
Hello
Please check this HowTo.
+ How to identify an unknown device? +
http://forums.computers.Toshiba-Europe.com/forums/Ann.jspa?annID=78To my knowledge, the 8086 Dev_ID belongs to Intel
So there must some Intel driver.Have you installed all the drivers for the Toshiba driver page? Do this
-
Portege R100 - missing some drivers Ethernet Controller Win XP
The hard drive failed on my Portege R100, so I replaced and installed Windows XP.
The only problem is that I'm missing some drivers, so I can't get into the Internet - significantly Device Manager indicates problems with the Ethernet controller.Is there a place to get these missing drivers? I don't even know what to look for to resolve part Ethernet controller.
Any help would be greatly appreciated.
Thank you-
George
Hello
Ethernet controller can be a LAN or WLan card.
Have you installed the network card driver?All the drivers are located on the European driver Toshiba page:
http://EU.computers.Toshiba-Europe.comProtected R100 is an older model mobile phone, so you will need to check the Archive.
In product type to download the form, choose Archive instead of the laptop.See you soon
-
The device icon and text missing in the imaging devices Manager
The device icon and text missing in the imaging devices Manager
I'm running MS Vista Ultimate.
The imaging device icon and the wording are missing in Device Manager are missing. A device is listed in the box as installed missing icon.
The other devices in Device Manager normally appear and I can compare what is supposed to be there for another computer running the same version of windows.
However, the device will not work and will not reinstall.
When you try to reinstall the device an error indicates that Setup does not work and to contact the manufacturer of the device.
Yet once, however, this happens when I try to install any imaging device.
I'm unable to locate information about the imaging devices in the registry.
I think that some registry entries are missing.
It is not the missing peripheral individual. This is the section in Device Manager.
The image error is logged:
"Windows didn't load setup." Contact your hardware vendor. »
This happens with any device inaging of anyone.
What imaging device do you use?
We can try a few steps and check if it helps you.
Try to run the hardware and devices Troubleshooter: http://windows.microsoft.com/en-US/windows7/Open-the-Hardware-and-Devices-troubleshooter
If the result of the Troubleshoot utility is negative, then reinstall the device. And also be sure to uninstall the previous contents of the device driver by running utility windows install cleanup:
http://download.Microsoft.com/download/e/9/d/e9d80355-7ab4-45b8-80e8-983a48d5e1bd/msicuu2.exe
Now follow the following steps:
1. Save the Windows Installer Cleanup Utility package on your computer
2. right click on the Windows Installer Cleanup Utility and run as administrator
3. follow you prompt in the installation wizard. Once completed the installation, click on the Start button
4. click on all programs. Click on Windows Install CleanUp Utility.
5. click on the device driver (if on list) in the list of programs.
6. click on Remove. Click OK
7. click exit
Restart the computer for the changes to take effect
Then try to install the device driver and check the result: http://windows.microsoft.com/en-US/windows-vista/Install-a-USB-deviceAfter back and let us know if it helped to solve your problem.
Thank you and best regards,
R uma - Microsoft technical support.
Visit our Microsoft answers feedback Forum and let us know what you think.
-
Hello
All of my documents and photos are missing after a system restore. Here's the story. A virus called "Windows Recovery" popped up earlier and I did a system restore to get rid of him. To restart the computer, all my files and photos were missing. I used the system restore in the past in similar situations and have never had any problems. I opened MS Office, and I found some documents in the recent documents list. They open up fine and I saved them, but is only some of the documents. I can find the files in my documents when I do a search on them, but they are empty, when I open them. I also find some pictures and documents when I do a search for them by name, but I remember only a few file names, so I can't retrieve many files this way.Can someone help me out here? Thank you
Hello
read the information at the bottom of the below link about what makes this malware hide your data files and the cure for it regarding
Read article 17
http://www.bleepingcomputer.com/virus-removal/remove-Windows-Recovery
also follow the correct for that malware removal steps, just to be safe, let's
-
I get all of my email. I use Windows Live mail and Windows 7 Home. Each download I do, I'm missing some emails. I have sent several emails here, why I get all the answers?
Click on the touch me too much on your question.
-
Original title: question of recovery of Windows 8I have a Toshiba laptop with windows 8. and this morning when I tried to turn it on, it's the message that is displayed:"RECOVERY".your PC needs to be repairedThe boot configuration data file is missing some required informationFile \BCDError code: 0xc000000d
you will need to use the tools of recovery on your installation media. "If you, etc.".There is no USB or CV came with the laptop. It is automatically installed when I first turned on.I was looking at a trip to this topic last night and everything was perfect, now, this morning, I get this message.I restarted the computer a few things, but this message is still there.My question is how can I get my laptop to work again, because I can't go in the computer to change the settings or options.Help, pleaseThank youWinnieHello
We are here to help.
You can perform the troubleshooting steps below:
Option 1: Windows startup parameters in the Windows recovery environment .
- Windows recovery environment, enter in safe mode. After you have successfully loaded in safe mode, perform the clean boot.
Option 2: restore your PC to an earlier point in time .
- Enter in the right edge of the screen and then click on Search.
- Enter the Control Panel in the search box, and then tap or click Control Panel.
- Enter the collection in the control panel search box, and then tap or click recovery.
- Press or click open system restore, and then follow the instructions.
Let us know how it goes.
-
I just bought my ASUS laptop (with no dvd player) 3 days ago. Today I turned on for the first time and was usually up to 1 hour later this bluescreen poped out: RECOVERY, your PC needs to be repaired. The boot configuration data file is missing some information required. File:\BCD error code: 0xc0000034. You will need to use the tools for restore on your installation media. If you don't have any media of the instalation (such as a disc or USB device), contact your system administrator or the PC manufacturer... As I said before that my laptop came with Windows 8, and it is not a dvd player.
Thank you.
Remove the power supply and remove the battery
Press and hold the power button for 60 seconds
Apply the AC voltage ONLY (DO NOT INSTALL THE BATTERY)
Click on the power button and more quickly, press F9
Follow the instructions to reset the computer to factory default
Maybe you are looking for
-
Help! Stuck on the activation screen
Hello My grandmother recently asked me to 'fix' his iPad as he kept prompting you to enter the password of his apple whom she did not know ID. She is 75 years old and bought the iPad two years ago. The iPad uses a recent version of iOS (not sure it
-
Better lens for pictures of products - EOS Rebel T3i?
Hello I have a Canon EOS T3i rebel I use strictly for product photography. We take the photo package and unpack the company/treats pet food; they come in the plastic support sleeves, overlays and blisters. Must ensure that all written content is read
-
Helix replacement pen or another pencil with Eraser
Can I use the pen of another manufacturer or stylus of the ThinkPad tablets on the propeller? I need more sensitive pen with eraser. What kind of pen, I have to choose? Thanks to everyone for the help.
-
I have the ie3sh.exe problem on my laptop, can you tell me what I need to do, and this causes a problem with LAN to the internet. What happens on another laptop not this one.
-
there about a week after my regular weekly backup, I use windows 7. Alert Center said action my changing the backup settings wre I like to keep the changes that I ticked Yes and continue as usual I did some scans using norton 360 newspapers has resta