Only the script of data storages details
Hi all
Need help here please, I want a script that generates the full report of data storage only in the vCenter and send it in html format.
Any help would be appreciated.
Thank you
Nick
To exclude local data warehouses, you change this line
$Datastores = Get-Datastore
in this
$Datastores = Get-Datastore | where {$_.Extensiondata.Summary.MultipleHostAccess}
Tags: VMware
Similar Questions
-
Questions about to determine the size of the array of data storage with flexibility
I try to use the CVI function below to load data from .csv file to the table that I was intending to use later:
filereturnvalue = FileSelectPopup ("c:\\Users\\Desktop\\FileDirectory", "*.csv", "", 'Select the data file', VAL_LOAD_BUTTON, 0, 0, 1, 0, LoadFilePath);
FileToArray (DATAArray, VAL_CHAR, LoadFilePath, MaxDataSize, 1, VAL_GROUPS_TOGETHER, VAL_GROUPS_AS_COLUMNS, VAL_ASCII);
For the data table "predetermined", it is quite straightforward, because the size of the table is already set. However, I wonder if there is anyway I could use CVI directly import data and determine the size of the array on the fly? Which means that the user need not know the length of the data, and it could be determined then to import the file.
Hello
for ASCII files, you can do so in any first read the file and counting the newline characters, something like:
int file_handle;
int index;
int size = 0;
char line_buffer [80];If (OpenFile (...) > 0)
{
While (ReadLine (...) > 0)
{
size ++;
}
}
CloseFile(f) (file_handle);This way you can determine the number of rows you have, but you must have an idea of how long a line may be, one number per line or 32000 because you must specify the size of your line_buffer.
In the next step you analyserions monotube for occurrence of your column separator (say a ;) to determine the number of columns (separators found + 1).
-
path of the file to open data storage
Hi all!
Now I am using open data storage blocks, write data and data storage to store and retrieve data from result nearby. For the issue of file path, before I
Set the path of data by double clicking on the block 'open data storage' and inserting the location of the file in the indicated place, and it worked!
Now since I made a stand-alone application of this program and use it on other computers, the location of the file that I inserted in the block of open data storage is not
no more valid in the other PC. So I modified my source code by connecting a 'journey of the current vi' to the node of the file path of the open instead of data storage block
insert inside the block and this does not work! During the race he displays an error in the data writing block saying that the refnum of storage is not valid!
I wonder why I couldn't specify the path of the file like this. Kind to allow me to specify the path of the file in the path of the vi?
Thank you!
Chao
You need to account for that path changes when integre integrated application, take a look at this example.
-
Hi all
I create an FDM interface to extract data from Oracle RDB and onto an essbase database. I feel that if you have to shoot the script import data of RDB, you must create an integration. So I created a script to import integration based on the example given in the FDM Document admin.
The Script is as below:
Function PSIP_TEST (lngCatKey, dblPerKey, strLoc, strWorkTableName)
'------------------------------------------------------------------
"Import oracle Hyperion FDM integration script:
'
' Created By: admin
"Creation date: 18/02/2014-18:00:33.
'
' Object:
'
'------------------------------------------------------------------
Dim cnSS ' ADODB. Connection
Dim strSQL ' SQL string
Dim rs ' Recordset
Dim rsAppend ' tTB table add rs object
'Initialize objects.
Define the cnSS = CreateObject ("ADODB. Connection")
Set rs = CreateObject ("ADODB. Recordset')
Set rsAppend = DW. DataAccess.farsTableAppend (strWorkTableName)
"To connect to the Oracle database
CNSS. Open "Provider = OraOLEDB.Oracle.1; Password = PSIP_TST; Persist Security Info = True; User ID = PSIP_TST; Data Source = PSIP.
' Create the query string
strSQL = "SELECT YEAR, COST_CENTRE, PROGRAMME_CODE, PROJECT_CODE, ACCOUNTS, AMOUNT FROM VW_PSIP_EBUDGET_ESTIMATES.
«Get data»
RS. Open strSQL, cnSS
"Locate the data.
If rs.bof and rs.eof then
RES. PlngActionType = 2
RES. PstrActionValue = "no records to load!
Exit Function
End If
' Loop through records and add table APCs to place DB
If it is rs.bof and not rs.eof then
While Not rs.eof
rsAppend.AddNew
rsAppend.Fields ("PartitionKey") = RES. PlngLocKey
rsAppend.Fields ("CatKey") = RES. PlngCatKey
rsAppend.Fields ("PeriodKey") = RES. PdtePerKey
rsAppend.Fields ("DataView") = "CDA".
rsAppend.Fields ("CalcAcctType") = 9
rsAppend.Fields ("Account") = rs.fields ("ACCOUNTS"). Value
rsAppend.Fields ("Entity") = rs.fields ("COST_CENTRE"). Value
rsAppend.Fields ("UD1") = rs.fields ("COST_CENTRE"). Value
rsAppend.Fields ("node2") = rs.fields ("PROGRAMME_CODE"). Value
rsAppend.Fields ("UD3") = rs.fields ("PROJECT_CODE"). Value
rsAppend.Fields ("Amount") = rs.fields ("Amount"). Value
rsAppend.Update
RS. MoveNext
Loop
End If
"Loaded files
RES. PlngActionType = 6
RES. PstrActionValue = "import successfully!
'Assign the return value.
SQLIntegration = True
End Function
When I run the Script in the Script Editor, I get the following error:
Error: An error occurred while running the script:
-2147467259-data access error.
Online: 19
If I see in the error log, it is as follows:
ERROR:
Code... - 2147467259
Description... ORA-00903: invalid table name
Process... clsDataAccess.farsTableAppend
The component... upsWDataWindowDM
Version.......................................... 1112
Thread........................................... 41900
Nude of the line. 19 is as follows: Set rsAppend = DW. DataAccess.farsTableAppend (strWorkTableName) and, therefore, I thought that perhaps this is when I run the script in the Script Editor, perhaps that the value of the variable "strWorkTableName" does not get filled it is why it gives an error.
So I ran the import stage in the Workflow, and Got the following error:
Error: Failed to import. Data not valid or empty content.
and there is no entry in the error log.
I'm lost, need your help please.
One last thing, I would like to ask is kindly please post if my connection string is correct, either:
CNSS. Open "Provider = OraOLEDB.Oracle.1; Password = PSIP_TST; Persist Security Info = True; User ID = PSIP_TST; Data Source = PSIP.
I read that FDM is a 32-bit product and will require a connection 32-bit oledb provider.
FDM here is installed on a 64-bit computer and the provider that is used here in the connection string is 64-bit.
Please help, my work here came to a fixed support. Kindly help
That would mean that your 32-bit TNSNAMES. ORA file does not have a good connect descriptor for what you provide in the UDL file.
Check your TNSNAMES 32bits. ORA file and make sure you have a good connect descriptor for the Oracle database.
-
How to change the data storage in Planning?
I want to change the property to store the data of a base member to store Shared planning. When I cilcked on EDIT, I don't see the option to store the data. Where should I go?I remember you posted questions about the use of contour load utility. You can use OLU to update the properties of data storage. In your csv file have the following format:
Data storage for the parent account
Never share assets Asset1Just an option to update the members manually if you have a lot of change...
-
How to determine the size of the binary file data set
Hi all
I write specific sets of data in table in a binary file, by adding each time so the file grows a set of data for each write operation. I use the set file position function to make sure that I'm at the end of the file each time.
When I read the file, I want to read only the last 25 data sets (or numbers). To do this, I thought using the position set file to set the file position where it was 25 sets of data from the end. Math easy, right? Apparently not.
Well, as I was collecting data file size as I began the initial tet run, I find the size of the file (using file order size and get number of bytes so) as the size increases the same amount every time. My size and the format of my data being written is the same every time, a series of four numbers double precision.
I get increments are as follows, after the first write - 44 bytes, after 2nd - 52 bytes, 3 - 52 bytes, bytes 44 4th, 5th - 52 bytes, 6 - 52 bytes, 7th - 44 bytes and it seems to continue this trend in the future.
Why each write operation would be identical in size of bytes. This means that my basic math for the determination of the poistion of correct file to read only the last 25 sets of data won't be easy, and if somewhere along the line after I've accumulated hundreds or thousands of data sets, what happens if the model changes.
Any help on why this occurs or on a working method, all about the problem would be much appreciated.
Thank you
Doug
-
I don't know how to use the apps since all I found is on android, but apparently the Zeen is not compatible with the android apps. I have google calendar, but it doesn't work and want to only the time and date is displayed. I followed all the directions for adding applications, but they do not work or I can't understand them.
Salvation of theeagles,
The Zeen is unable to access the Android Market, but it's an Android device. There is a market for this called SlideME, and you should have the icon for it in your apps section. I have a station also, and I'm just a normal clock on mine.
Here is a link to SlideME, if you want to see what applications are available: http://slideme.org/
-
Script to list the information under Configuration/Storage/datastore details
Hello, I'm trying to create a script that returns the details data Configuration/Storage/Datastore/store info. The thing I want the script to do is list my ESX:s, data of list store names, list mpathpolicy and the details of the data store paths section in the VI client.
Is it possible to get this in a script? Or if anyone knows how I can get information from the info of paths in Details of the data store to the VI client
Thanks in advance
This is possible if you use the SDK.
The following script lists the name of host, name of DS, political path and the number of paths.
If you need other information on the page of details in the report let me know.
$report = @() Get-VMHost | Get-View | %{ $esx = $_ $esx.Datastore | %{Get-View $_} | where {$_.SUmmary.Type -eq "VMFS"} | %{ $ds = $_ $ds.Info.Vmfs.Extent | %{ $ext = $_ $extKey = ($esx.Config.StorageDevice.ScsiLun | where {$_.CanonicalName -eq $ext.DiskName}).Key $lun = $esx.Config.StorageDevice.MultipathInfo.Lun | where {$_.Lun -eq $extKey} $row = "" | Select ESXname, DSname, "Path Selection","Paths Total" $row.ESXname = $esx.Name $row.DSname = $ds.Name $row."Path Selection" = &{ switch($lun.Policy.Policy){ "VMW_PSP_FIXED"{"Fixed"} "VMW_PSP_RR"{"Round Robin"} "VMW_PSP_MRU"{"Most Recently Used"} } } $row."Paths Total" = $lun.Path.Count $report += $row } } } $report
____________
Blog: LucD notes
Twitter: lucd22
-
Hi all
I created a form with 5 blocks (namely ENQACMHDR, ENQACMDTL, ENQACEHDR, ENQACEDTL, ENQACSPEC), where I have 8 push buttons (namely ENTER_QUERY, EXEC_QUERY, CLEAR, FIRST, NEXT, PREVIOUS, LAST, and EXIT).
This form is created just for display purposes only. So after that I ran, all blocks have been blocked against insert and update.
I have question on 2 fields 'ENQNO' and "RATNG" (both belong to the ENQACMDTL block).
When I click on "EXEC_QUERY" directly, all data for all years fills.
But the user wanted the data to be populated only this year and the previous year.
Yes, on ' Clause WHERE' of the property_palette of the 'ENQACMDTL' block , I put in the following condition:
SUBSTR (ENQACMDTL. ENQNO, 1, 4) = TO_CHAR (ADD_MONTHS (SYSDATE,-12), 'YYYY') OR SUBSTR (ENQACMDTL. ENQNO, 1, 4) = TO_CHAR (SYSDATE, 'YYYY')
PROPERTY PALETTE (ENQACMDTL block) WHERE Clause SUBSTR (ENQACMDTL. ENQNO, 1, 4) = TO_CHAR (ADD_MONTHS (SYSDATE,-12), 'YYYY') OR SUBSTR (ENQACMDTL. ENQNO, 1, 4) = TO_CHAR (SYSDATE, 'YYYY') Data only this year and the year before are now filled. Its ok with the field of "ENQNO".
The problem is when I have queries on the field "RATNG. 'RATNG' is a Text_item with number of displayed items = 5. (5 lines)
Here are the 2 columns in a Table (name = ENQACMDTL) in the database.
ENQNO RATNG 2013900054 500KC2 2013900047 800KC4 2013520018 750KC6 ...... ......... 2012900037 1000KC2 2012520109 500KC2 2012140019 750KC6 ........ .......... 2011540036 500KC2 2011100030 1000KC2 ......... ......... ...... ........... 2006100007 90KD8 2006750014 750KC6 2006900072 500KC2 The first 4 issues of "ENQNO" represents the year. There is more than a lakhs of records.
So, when I have queries on the field "RATNG."
Example: for RATNG = 500KC2;
I click on ENTER_QUERY, the field of "RATNG", I put in the 500KC2 of the value and click on EXEC_QUERY; Details regarding the 500KC2 is displayed as well as all the other junk RATNG as 750KC6, 1000KC2 (which belongs to the ENQNO of the current year and previous year) also gets displayed.
I want details of only RATNG (500KC2) to display, but only for the current year and the previous year, it is 2013900054, 2012520109 (ENQNO).
Other than 500KC2 RATNG, no other RATNG must be displayed.
500KC2 = RATNG is also present for ENQNO = 2011540036, 2006900072. But I don't want them to view.
I want only the data or details of the current year and the previous year to be filled or displayed for the given RATNG.
Can you help me or tell me what I do for this?
Hope I'm clear with my question!
If my question is not clear, let me know please.
Thank you.
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
Oracle forms 6i.
1. check null values in the enqacmdtl.enqno, if so treat them properly.
2. check the result of select to_char (add_months (sysdate,-12), 'YYYY') prev_year curr_year of double to_char(sysdate,'YYYY')
3. change the place where clause "year" in the value of numAriques.
where to_number (substr (enqacmdtl.enqno, 1, 4)) > = to_number (to_char (add_months (sysdate,-12), 'YYYY'))
Then let me know the result.
-
Add the disk storage format to the script
All, morning
I had this script that I use to extract data on the virtual machine and their use of the disk, however I need to say and to report on the type of commissioning the disk and I can not find the command for it
$VMFS = get-Datastore-Refresh - name "LUN? _VMFS_DS "| Sort-Object $_. Name
$report = @ data structure empty #)
$allvms = get - VM | Sort-Object $_. # Name I like sorts my datas
{foreach ($vm to $allvms)
$vmview = $vm | Get-view # get - view to see the details of the FM
foreach ($disk in $vmview. Storage.PerDatastoreUsage) {# disks for the virtual machine
$dsview = (get-view $disk. Data store) # store data used by drives
$dsview. Refresh # RefreshDatastoreStorageInfo() to get the latest data
$vmview. Config.Name # Echo to the screen to view the progress
$row = "" | Select VMNAME DATASTORE, VMSIZE_MB, VMUSED_MB, blank line # PERCENTAGE
$row. VMNAME = $vmview. Config.Name # add the data to the line
$row. DATA store is $dsview. Name
$row. VMSIZE_MB = (($disk.Committed+$disk.Uncommitted)/1024/1024)
$row. VMUSED_MB = (($disk.Committed)/1024/1024)
$row. P = [int] (($row.)) VMUSED_MB / $row. (VMSIZE_MB) * 100)
$report += $row # add the line to the structure
}
}
$report | Export-Csv dump of # "C:\temp\vm_ds.csv" - NoTypeInformation .csv report
$DSReport Virgin @ reinscriptible = () # for the information store
{foreach ($LUN to $VMFS)
$VMSizeSum = 0 # we will summarize the data from the previous report for this LUN
$LUN. Name # Echo to the screen to view the progress.
foreach ($row in $report) {# Generate sum for this LUN
If ($row. DATA store - eq $LUN. Name) {$VMSizeSum += $row.} VMSIZE_MB}
}
# Create a blank line and add data to it.
$DSRow = "" | Select Datastore_Name, Capacity_MB, FreeSpace_MB, Allocated_MB, Unallocated_MB
$DSRow.Datastore_Name = $LUN. Name
$DSRow.Capacity_MB = $LUN. CapacityMB
$DSRow.FreeSpace_MB = $LUN. FreeSpaceMB
$DSRow.Allocated_MB = [int] $VMSizeSum
$DSRow.Unallocated_MB = $LUN. CapacityMB - [int] $VMSizeSum # NB than if we have overused # disk space it will be a negative number
$DSReport += $DSRow # add the line to the structure.
}
$DSReport | Export-Csv "C:\temp\Datastores.csv" - NoTypeInformation # dump make .cs
This report on everything I need, but it will indicate the type of commissioning. Could you help me at all?
Thank you very much
Alex
Ah, it is a bit of a problem, I'm afraid.
vSphere provides only the freespace on a level of data store, not by the hard drive.
There are a number of ways to get the freespace by hard drive, but none of them are foolproof, as far as I know.
For example have a peek at the post called Alan PowerCLI: using Virtual Machine disc
This gives the freespace, but an internal view of the BONE. In other words, it shows the OS partition information.
And mapping of the partitions of hard disk operating system is not simple.
A good method, which works in most cases, is the method of Arnim Match VM and HDDs in Windows using PowerCLI
-
I installed Oracle database on Linux 6.6, Virtualbox 11.2.0.1.0.
I used ASM for database storage.
When I want to perform a backup in offline mode. I stop the database data files and copy to the filesystem as follows (for example).
ASMCMD [+] > cp +DATA/ora11g/datafile/system.270.883592533/u01/app/oracle
The files copied with success and also any other data files, logs and controlfiles files. Then, I also rename all the files in editing mode.
After that, I used the backup files to start the oracle of backup (storage non - ASM with new pfile edited)
Open successfully from a backup database.
But when I want to use old spfile to open the database for the storage of the DSO again, a few errors have occurred as no data files in ASM storage.
I check the contents of the ASM storage with ASMCMD commands. And realize that there only spfile and controlfile located ASM storage and other files: data files and online redo logfiles automatically deleted.
Why the data files and log files deleted ASM storage? Is this normal? I have no delete all files of the DSO.
It is actually deleted from the use of the cp command?
Exactly what we say. Data in ASM files are OMF (Oracle managed files). The RENAME translates the DSO by deleting the original file.
Hemant K Collette
-
Problems with the debugger in Data Modeler Beta DDL Custom Transformation Scripts
Hello
I use Oracle SQL Data model Beta 4.1.0.866.
Currently, I am working on a project to generate the models in PHP for our relational database models MVC framework. Some settings must be entered from the user,
so, I'm importing Java classes for JOptionPane in the Transformation of the customized with DDL Scripts
var ji = new JavaImporter(java.io, java.lang, javax.swing, java.util);
I can use these classes with no problems, but when I want to use the debugger, it cancels the execution with this error message:
Is this a bug or am I missing something here?
And would it not possible and even preferable to processing entirely in Java instead of JavaScript scripts?
Hello
Try it following the syntax:
var ji = new JavaImporter(java.io, java.lang, Packages.javax.swing, java.util);
And would it not possible and even preferable to processing entirely in Java instead of JavaScript scripts?
Well, it's not on the use of JavaScript, it's scripts in Java Platform - JSR 223 https://www.jcp.org/en/jsr/detail?id=223
So if you have a JSR 223 engine of script in the JAVA virtual machine you can use your scripting language. We simply provide a setting where you can put your scripts to do something useful.
We don't know in advance what language will be used. JavaScript engine is included in Java6 and Java7 so this is the reason why our examples are in JavaScript.
Using Java instead of JavaScript don't make the job easier, look at the part of import here - Re: impossible to cast objects in the Script SQL DM 4.0 Transformation
Philippe
-
Change the PowerCLI Script to use the DRS and DRS storage
Hello
I have a PowerCLI script that specifies a host and a data store to create a new virtual machine, which has served us well. Now we have activated the DRS and DRS storage and I wonder what to change in order to take advantage of these features. Are there commands to specify a cluster and the cluster data store and let the DRS to decide the initial investment for a new virtual machine? At the moment we put all hosts and the warehouses of data as variables and use them in the line below.
Thank you.
$newVM = New-VM-name $NewVMname - VM $TemplateName Datastore - $datastore - VMHost $vHost - confirm: $false - location $myName
You set a Datastorecluster?
If Yes, then you can replace the value of parameter data with the datastorecluster object store.
Replacing a VMHost with a cluster is not taken in charge I'm afraid.
But you can use something like this
New-VM-name TestVM Datastore - DSC - ResourcePool (Get-Cluster-name mycluster |) Get - Resourcepool - name of resources)
This will automatically select the VMHost.
The virtual machine appears in the root of the cluster.
DSC is the name of a datastorecluster in the cluster mycluster
-
Access error of data while running the script in the script fdm workbench Editor
Hello Experts,
I get the error when I run the script in the script of fdqm established client.this editor is the error
-2147467259 data access error and he navigates the error on line 30 on this script «Set rsAppend = DW.» DataAccess.farsTable (strWorkTableName).
Please return me asap where I should charge peoplesoft data to one of my database of planning through fdm.
Thanks in advance...
You will need to build a script for integration that is an import Script that allows you to import data from SQL in FDM.
When you create your import format, you will need to configure it with the file Type = Script and then assign the script of integration as an Expression. Assign your import format to the location that you use to import data.
Then you can test it by going to the import stage and clicking the import button. FDM will run the integration script and data import by running the SQL query that you have defined.
To the contrary, "Data Pump" import Scripts are used as import expressions in the import formats
You can run a script to integrate the customer that this script requires input parameters that are passed only when then FDM import step is executed. If you want to see the raised error open the errorlog FDM. You will only be able to run this Workbench script when you want to debug data is being extracted, but in this case, you will need to comment code that inserts the data in the table. Don't forget that the work table is a temporary table that is created when you click on the import button and if you run Workbench this table does not exist
-
We have warehouses of data which are seen by more than one cluster. I need a script that will display:
all stores of data seen by a cluster
the virtual machines on the data store
the host of the virtual machine is on
the cluster the host is in
The output I want is
name of the store of data, the VM name, host name, the name of the Cluster
any help would be appreciated
Pretty sure this will do what you need:
$report = @() Foreach($cluster in Get-Cluster){ $datastores = $cluster | Get-VMHost | Get-Datastore foreach($datastore in $datastores){ $vms = $datastore | Get-VM If ($vms.count -ge 1){ foreach($VM in $vms){ $object = New-Object -TypeName PSObject -Property @{ Datastore = $datastore.Name VM = $VM.Name HostName = $VM.VMhost Cluster = $cluster } $report += $object } } } } $report | Export-Csv C:\Temp\VMs.csv -NoTypeInformation -UseCulture
If you only want to shared data warehouses you can then use
$datastores = $cluster | Get-VMHost | Get-Datastore | Where {$_.Extensiondata.Summary.MultipleHostAccess -eq $True}
Hope this helps
Maybe you are looking for
-
No cellular service after installing 9.3.1
Service boxes is not available after installing 9.3.1 on iPad 2
-
Extended warranty: no email confirmation
HelloI bought a toshiba M40X-250 (1 year warranty) and the extended warranty (1 to 3 years old) yesterday. I recorded the two guarantees yesterday and asked for a confirmation by e-mail. I have still not received any email from toshiba. Is this norma
-
Inspiron 531 &; Windows video 10
I have an older machine from Dell to operate as my daughter's computer. It's from 2007, but it still works. He had Win 8.1 above, and another that it runs slower things because it is an older machine, it worked for the most part. However, this morn
-
I registered on the portal provider of blackberry, but on the payments tab info that there is a link "check" out with paypal after you have clicked on this link, I am staging ' credit or debit card ' and asking for details of the card.I saw on the si
-
How to add a reset button in OPM 12?
You need to add a reset button to 12 OPM. I am aware that it was easily possible in 10.4 Customizing VMS, however here, I want to add this button in each screen as well as on her multilingual text