List VMFS version and block size of all data warehouses
I'm looking for a PowerShell script (or preferably one-liner) list all with version number data warehouses there VMFS and their blocksizes.
I am a novice PowerShell and ViToolkit, but I know how to do the following:
I can list all data stores that begin with a specific name and sort by alphabetical order:
Get-Datastore-name eva * | Sorting
Name FreeSpaceMB CapacityMB
EVA01VMFS01 511744 81552
511178 511744 EVA01VMFS02
511744 155143 EVA01VMFS03
EVA01VMFS04 511744 76301
301781 511744 EVA01VMFS05
etc...
I can get the Info for a specific data store with the following commands:
$objDataStore = get-Datastore-name 'EVA01VMFS01 '.
$objDataStore | Format-List
DatacenterId: Data center-data center-21
ParentFolderId: File-group-s24
DatastoreBrowserPath: vmstores:\vCenter-test.local@443\DataCenter\EVA01VMFS01
FreeSpaceMB: 81552
CapacityMB: 511744
Accessible: true
Type: VMFS
ID: Datastore-datastore-330
Name: EVA01VMFS01
But that's all as far as my knowledge goes.
Someone out there who could help me with this one?
This information is not available in the default properties of the DatastoreImpl object.
But this information is available in the SDK object called a data store.
You can view these values like this.
Get-Datastore | Get-View | Select-Object Name, @{N="VMFS version";E={$_.Info.Vmfs.Version}}, @{N="BlocksizeMB";E={$_.Info.Vmfs.BlockSizeMB}}
If you are using PowerCLI 4.1, you can check with
Get-PowerCLIVersion
Then, you can use the New-VIProperty cmdlet.
Something like that
New-VIProperty -Name VMFSVersion -ObjectType Datastore ` -Value { param($ds) $ds.ExtensionData.Info.Vmfs.Version } ` -BasedONextensionProperty 'Info' ` -Force New-VIProperty -Name VMFSBlockSizeMB -ObjectType Datastore ` -Value { param($ds) $ds.ExtensionData.Info.Vmfs.BlockSizeMB } ` -BasedONextensionProperty 'Info' ` -Force Get-Datastore | Select Name,VMFSVersion,VMFSBlockSizeMB
____________
Blog: LucD notes
Twitter: lucd22
Tags: VMware
Similar Questions
-
Property of block size of the data store
How to get the block size defined in the configuration of the data store tab. Is there a property, I should be looking. Currently, I tried getting the object managed data store but were not able to get the size of the block that.
If you are looking for the solution with PowerCLI, take a look at Re: version list VMFS and block size of all data stores
André
-
change font and font size in all text fields
Hi, I want to change font and font size in all text fields. I tried under the code, but it changes the font size but has not changed the font. can u pls help me. Thank you...
Police - Courier New
the size of the font - 10
Loop through the fields in the document
for (var i = 0; i < numFields; i ++) {}
Get a reference to the current field
var f = getField (getNthFieldName (i));
Change the properties of certain types of fields
{Switch (f.type)}
case 'text ':
f.textFont = fonts. Courier New;
f.textSize = 10;
}
}
You have a good reason to want to use Courier New instead of the built-in Courier font? In all cases, you must change one line to:
Use the built-in font Courier
f.textFont = fonts. Court;
-or-
Use the Courier New
f.textFont = "CourierNew;
-
I have a macbook pro and airport Time capsule and want to delate all data on Time capsule. How this is done
Open Airport utility, select the Time Capsule and then use the option erase to erase its contents.
How to check or erase a disc AirPort Time Capsule - Apple Support
-
Require a script to the list of files with sizes on all data stores in a cluster
Hi all
Please be gentle, im not new to Vmware, but new to powershell/powercli and need your help.
cli power can make or y at - it tools available that will do that for me?
I need to generate a list of all the files of the virtual machine in all stores of data available for cluster and their sizes to go with it.
I am mainly interested in the .log files and vmdk files, but I don't mind if it lists all.
I don't mind how his im laid out not after anything fancy just a list of output type something like
/
I did some research but there is nothing I have found that it will make.
My environment is currently esx 3.0.2 with vcenter servers. (currently being upgraded to 4)
Lots of help thanks
Yes, it's a 'characteristic' knowledge when using PowerCLI 4u1 against a VI 3.x environment.
There is a way to workaround, try this
$dsImpl = Get-Cluster
| Get-VMHost | Get-Datastore | where {$_.Type -eq "VMFS"} $dsImpl | % { $ds = $_ | Get-View $path = "" $dsBrowser = Get-View $ds.Browser $spec = New-Object VMware.Vim.HostDatastoreBrowserSearchSpec $spec.Details = New-Object VMware.Vim.FileQueryFlags $spec.Details.fileSize = $true $spec.Details.fileType = $true $vmdkQry = New-Object VMware.Vim.VmDiskFileQuery $spec.Query = (New-Object VMware.Vim.VmDiskFileQuery),(New-Object VMware.Vim.VmLogFileQuery) #Workaround for vSphere 4 fileOwner bug if ($dsBrowser.Client.Version -eq "Vim4") { $spec = [http://VMware.Vim.VIConvert|http://VMware.Vim.VIConvert]::ToVim4($spec) $spec.details.fileOwnerSpecified = $true $dsBrowserMoRef = [http://VMware.Vim.VIConvert|http://VMware.Vim.VIConvert]::ToVim4($dsBrowser.MoRef); $taskMoRef = $dsBrowser.Client.VimService.SearchDatastoreSubFolders_Task($dsBrowserMoRef, $path, $spec) $result = [http://VMware.Vim.VIConvert|http://VMware.Vim.VIConvert]::ToVim($dsBrowser.WaitForTask([http://VMware.Vim.VIConvert|http://VMware.Vim.VIConvert]::ToVim($taskMoRef))) } else { $taskMoRef = $dsBrowser.SearchDatastoreSubFolders_Task($path, $spec) $task = Get-View $taskMoRef while("running","queued" -contains $task.Info.State){ $task.UpdateViewData("Info") } $result = $task.Info.Result } $result | % { $vmName = ([regex]::matches($_.FolderPath,"\[\w*\]\s*([^/]+)"))[0].groups[1].value $_.File | % { New-Object PSObject -Property @{ DSName = $ds.Name VMname = $vmName FileName = $_.Path FileSize = $_.FileSize } } } } | Export-Csv "C:\File-report.csv" -NoTypeInformation -UseCulture I have attached the script to avoid any problems with the hooks.
And the regex expression is updated to account for the names of comments with whites.
____________
Blog: LucD notes
Twitter: lucd22
-
data from the buffer before graph it and block size
I hope you can help me with this situation because I was collapsed in this situation for two days and I think I see the light in the short time and time is a scarce resource.
I want to use a NI DaqCard-HAVE-16XE-50 (20KS/sec accordig to the specifications). For data acquired by DasyLab, I use OPC DA system but when I try to get a graphic from the signal I get ugly results.
I guess the problem is that the PC is not powerful to generate a graph in real time, is if there is a block to save the data, then graph the data without using "write data" block to avoid to write data on the disk?
Another cause of the problem, it might be an incorrect value for adjusting the size of block, but in my piont of view with the 10 kHz and 4096 block size is more than necessary to acquire a signal of 26 [Hz] (showing the photo). If I reduce the size of the block to 1 signal showing in the graph is a constant in the first acquisition value. Why might this situation?
Thanks in advance for your answers,
You don't want to use OPC DA for a device installed with the material. OPC DA is designed for industrial devices low speed, not for cards installed 20 kHz!
Rerun setup of DASYLab and select the OR-DAQ driver, deselect the NOR-DAQmx driver.
You must use the analog input OR-DAQ module for talking directly to the camera. You will get the full speed of the device, and the buffering is managed properly.
I have this card somewhere in a box, and when I used it, it worked perfectly with the NOR-DAQ driver.
-
I use the CVI TCP media kit at my request and I am curious about the following code:
ClientTCPRead
char * buffer;
int messageSize;
int bytesToRead;
int
bytesRead;/ * Find messageSize and allocate a buffer properly... * /.
bytesToRead = messageSize;
While (bytesToRead > 0)
{
bytesRead = ClientTCPRead (connection handle,
(& buffer [messageSize - bytesToRead], bytesToRead, 0);bytesToRead = bytesRead;
}
OK, this works if you tank elements of the array, but what happens if you pass a structure of arbitrary size? If you read/write the bytes read or written and that you get all the data that you have asked, what do you do at this point to get the rest of subsequent data? For example, replace the "buffer" of type char with a structure of a type defined by the user with a size of 100 bytes or something to that extent. You make a request for read/write and read/wrote less than 100 bytes. How do you get the rest of the data? ICB doing something in the background? I could use this code with several structures, but then again, a particular Member of a structure is not the size of a byte as a tank.
Much appreciated,
Chris
The solution is to use a pointer to char sunk to allocate the data transmitted. The only problem is that this buffer must be a pointer to the data type of the structure before a tank troop can be used for a successful program compilation. Thank you for your help.
Chris
-
Hello
I want to know the size of all the types of data used.
anyone?
Thanks in advacne
Yes! And that's for sure
-
SRM and vSphere dedicated HA of data warehouses
Hello
When you use VMware HA and SRM, may that MRS will failover data warehouses to the recovery site, the host HA heartbeat? Locking issues was born when HA uses the data store and SRM wants to failover the data store?
Gabrié
Yes they can-
-
We must put in place a 2008r2 domain user account and allow it access xch2007 email and a file only decidated server. Access to the other app domain, print and file servers will be blocked. What will be the best way to do this? Can we use Group Policy?
Your Windows Server 2008 R question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please ask your question on the Windows Server. You can follow the link to your question:
http://social.technet.Microsoft.com/forums/en-us/category/WindowsServer
-
Purge of the records of the Table and the size of the data file
11.2.0.4/Oracle Linux 6.4
We want to reduce the size of the DB (file size of data), so that our RMAN backup size will be reduced. So, let's create stored procedures that will purge old data in huge tables.
After you remove records, we will decrease the tables using the:
change the movement line of table ITEM_MASTER enable;
change the waterfall table retractable ITEM_MASTER space;
ALTER table ITEM_MASTER deallocate unused;
The commands above will reduce the file size of data (see dba_Data_files.bytes) or it will reduce the size of the segment?
Only the segment formats will be reduced. Oracle has never reduced the sizes of data file automatically. You would have to reduce them. You may not be able to reduce the size of data file if there are extensions to the 'end' (highwatermark) data files. In this case, you will need to create a new tablespace and move all the objects for the new tablespace OR export, drop, create tablespace and import.
Hemant K Collette
-
simple script for the list of all data warehouses properties
I searched a lot of scripts to get information about my data stores. I can quickly export most the properies of that I need right to a csv file vCenter. A flagrant lack room is the 'space Proviosoned' display of list of data store. I look at the properties of each data store to see this information. Y at - it a script that can get this information? For this script, I don't reallt care about the news at the virtual machine level.
Until they solve this problem, you can use something like this
Get-Datastore | where {$_.Type -eq "VMFS"} | Select Name, @{N="Status";E={$_.Extensiondata.OverallStatus}}, @{N="Device";E={$_.Extensiondata.Info.Vmfs.Extent[0].DiskName}}, @{N="Capacity";E={"{0:f2} GB"-f ($_.CapacityMB /1KB)}}, @{N="Free";E={"{0:f2} GB"-f ($_.FreeSpaceMB /1KB)}}, @{N="Provisioned";E={"{0:f2} GB"-f (($_.ExtensionData.Summary.Capacity - $_.ExtensionData.Summary.FreeSpace + $_.ExtensionData.Summary.Uncommitted) /1GB)}}, @{N="Type";E={$_.Extensiondata.Info.Vmfs.Type.ToLower() + $_.Extensiondata.Info.Vmfs.MajorVersion}}, @{N="Last Update";E={$_.Extensiondata.Info.Timestamp}}
-
Problem with Flash Chart, Ghost 0 appear and does not not all data
Hey guys - I'm trying to generate a graph in the APEX that shows the number of incidents per hour of the day. Currently, I am working with a table that are all of the varchar2 fields - I:
RM1_TIME (time i.e. the time of day in the army: 0000, 0530, etc.)
rm1_agency which shows the responsible agency to take care of the incident and an area in which the incident occurred. Basically I have a SQL statement that generates a count of the number of incidents in one day, in the first two digits of the time (for example 0330 would declare 03) - my data comes right back when I look at. However with the graph, it seems to constantly want to reprint the 0 in the table (time along the X axis you 00 and 0 then 01 and 0) I don't know where that comes from. Also, no matter how broad, I do this table, I can't it to appear more than #18, even if I set the width to 5000pixels.
Here's my big SQL statement that generates the table:
SELECT NULL AS link,
SUBSTR (rm1_time, 1, 2) AS label,
AMOUNT (zero) AS "00."
SUM (one) as "01".
SUM (two) AS '02. "
SUM (three) as "03".
SUM (four) AS "04."
SUM (five) AS "05."
SUM (6) BY '06. "
SUM (seven) AS "07"
SUM (eight) AS '08. "
SUM (nine) AS '09. "
SUM (ten) AS "10."
SUM (eleven years) AS "11."
SUM (twelve) AS "12."
SUM (thirteen) AS "13."
SUM (14) AS "14."
SUM (15) AS "15."
SUM (16 years) AS "16",.
SUM (seventeen) AS "17."
SUM (18 years old) AS "18."
SUM (19) "19", AS
SUM (20) LIKE "20."
SUM (twenty-one) AS "21."
SUM (twenty-two) AS "22."
SUM (23) AS "23".
FROM (SELECT rm1_time, CASE WHEN SUBSTR (rm1_time, 1, 2) = '00' THEN 1 ELSE END 0)
zero,
CASE WHEN SUBSTR (rm1_time, 1, 2) = '01' END ELSE 0 THEN 1.
CASE WHEN SUBSTR (rm1_time, 1, 2) = '02' THEN 1 ELSE 0 END two.
CASE WHEN SUBSTR (rm1_time, 1, 2) END ELSE = 0 '03' THEN 1
three,
CASE WHEN SUBSTR (rm1_time, 1, 2) '04' THEN 1 ELSE END = 0
four,
CASE WHEN SUBSTR (rm1_time, 1, 2) END ELSE = 0 '05' THEN 1
five,
CASE WHEN SUBSTR (rm1_time, 1, 2) = '06' THEN 1 ELSE 0 END six,.
CASE WHEN SUBSTR (rm1_time, 1, 2) '07' THEN 1 ELSE END = 0
seven,
CASE WHEN SUBSTR (rm1_time, 1, 2) END ELSE = 0 '08' THEN 1
eight,
CASE WHEN SUBSTR (rm1_time, 1, 2) = '09' THEN 1 ELSE END 0
new,
CASE WHEN SUBSTR (rm1_time, 1, 2) = '10' THEN 1 ELSE 0 END ten,
CASE WHEN SUBSTR (rm1_time, 1, 2) END ELSE = 0 '11' THEN 1
Eleven years,
CASE WHEN SUBSTR (rm1_time, 1, 2) = "12", 1 END ELSE 0
twelve,
CASE WHEN SUBSTR (rm1_time, 1, 2) '13' THEN 1 ELSE END = 0
Thirteen years,
CASE WHEN SUBSTR (rm1_time, 1, 2) END ELSE = 0 '14' THEN 1
Fourteen years,
CASE WHEN SUBSTR (rm1_time, 1, 2) '15' THEN 1 ELSE END = 0
fifteen years,
CASE WHEN SUBSTR (rm1_time, 1, 2) END ELSE = 0 '16' THEN 1
Sixteen,
CASE WHEN SUBSTR (rm1_time, 1, 2) '17' THEN 1 ELSE END = 0
Seventeen years,
CASE WHEN SUBSTR (rm1_time, 1, 2) '18' THEN 1 ELSE END = 0
eighteen,
CASE WHEN SUBSTR (rm1_time, 1, 2) END ELSE = 0 '19' THEN 1
Nineteen,
CASE WHEN SUBSTR (rm1_time, 1, 2) END ELSE = 0 '20' THEN 1
twenty years,
CASE WHEN SUBSTR (rm1_time, 1, 2) END ELSE = 0 '21' THEN 1
Twenty-one,
CASE WHEN SUBSTR (rm1_time, 1, 2) '22' THEN 1 ELSE END = 0
Twenty-two,
CASE WHEN SUBSTR (rm1_time, 1, 2) '23' THEN 1 ELSE END = 0
Make
MYTABLE r1
WHERE rm1_agency = '' IF. ''
AND rm1_date = TO_CHAR (TRUNC (SYSDATE - 1), "fxyyyymmdd")
AND SUBSTR (rm1_district, 1, 1) = '2')
Group of SUBSTR (rm1_time, 1, 2)
order of SUBSTR (rm1_time, 1, 2)
all columns, I am struck are varchar2. Please let me know what other information I can provide... Thank you.Hello
Take a look at the maximum lines on the graph (look in Flash graphic attributes - series) and growing.
Kind regards
Dimitri
----------------------------------
http://dgielis.blogspot.com/
http://www.sumneva.com/ -
Need help with vSphere data script, packaging and sending it to the data warehouse
Greetings PowerCLI gurus.
Everyone can offer suggestions on a script which can query vSphere and pull on the following fields of the virtual computer:Name State Status Host Space in use Space used Format in a file in the CSV format and send the file to an FTP server?
Much respect to all, thanks a lot in advance.
Hello-
Happy to help you.
OK, well, if this database is accessible through a UNC path, you might make a copy directly using Copy-Item. If you use different credentials, you can encrypt and store in an XML file. HAL Rottenberg wrote to do http://halr9000.com/article/531.
Or, if this pension data is something that supports the secure copy (scp) or secure FTP (SFTP), those who would be good options. Again, you can store the alternative credentials in an encrypted in an XML file format and use them as needed.
Certainly, there is a balance to be struck between security and ease of use. It may be such that the transmitted data are not considered sensitive to all, and clear data transfers are acceptable. Probably still a good idea to take measures to protect the credentials at least.
-
Total IOPS of all data warehouses
Hello comrades,.
I need a script that displays the total IOPS / s of data storage and virtual machines which makes a considerable amount of i/o in the data store so that I can storage vmotion to balance the datastore IOPS / s. I do not use v5 yet so I have to find a solution in v4 for now.
Thank you
Have you ever tried the script of my post get PAHO are / s maximum ?
Maybe you are looking for
-
Adobe AIR is not install on my LSC
I installed the correct version of Adobe AIR base on this link http://get.adobe.com/air/ vesrion 15. This version should fix the problem, but I still get the same problem. The Adobe AIR installation has failed. Now, leaving the installation program.
-
acquisition of images to remote USB vision cRIO 9067
I have a 9067 linked to a camera USB from Basler. I am able to correctly display images via MAX and the example of Grab until I run the Grab sample on the target of RT. However, I need not to images processed on the RT or FPGA in this application.
-
HP pavilion 13-a000nx: power on password
My notbook hp pavilion 13-a000nx password power System disableed code 55132160 Please send me the password
-
WRT610N files 0 bytes on the storage
In recent weeks, I have problems with the files to copy to my disc HARD tied on the USB port on the Linksys WRT610N. Sometimes, files 'transform' into files - 0 - bytes and then are gone! This happens only in certain directories on the HARD drive, no
-
Hey,. Im trying to avoid photoshop when creating my application for blackberry because of the different screen size of several models of devices. I want to create is a shadow effect background in a field (a button or image) with a melted gradient. Sh