Report snapshot including Snap owner/creator
I have a script that I run every day to declare open shadow. This is a script I found online, but then realized that we wanted to add the owner for the wink to the information. Again, I found little code online and was able to add in the script, but he still does not seem to properly make the owner. Any help would be greatly appreciated.
Here is the corresponding code. I added some parts that enter data using Get-VIEvent and then post it in (Description and CreatedBy). The problem is that it doesn't seem to be reliable. The owner sometimes comes in white, and sometimes it shows one user other than who actually took the snapshot. I'm not great PowerShell and I wanted to know if someone can suggest what is wrong in the code? I'll also join the original inside code that is supposed to shoot instant owner that I joined the first script. When I run which, in itself, he either said the event is not in the database, or sometimes it is correct when the main script is wrong, or watch a user empty.
I also read that there is a more reliable than VIEvents way to get the owner of the hanging. I found a code on this forum, but I was unable to understand how to integrate properly.
# Add plugin VMWare PowerShell and connect to vCenter
Add-pssnapin VMware.VimAutomation.Core
Set-executionpolicy remotesigned - confirm: $false
Game-PowerCLIConfiguration - ignore InvalidCertificateAction - confirm: $false
to connect-viserver < viserver >
# create table to capture info VM snapshot
$vmtable = New-Object system. Data.DataTable "VMTable".
$col1 = New-Object system. Data.DataColumn VM, ([string])
$col2 = New-Object system. Data.DataColumn Snapshot ([string])
$col3 = New-Object system. Data.DataColumn SizeMB, ([string])
$col4 = New-Object system. Data.DataColumn Created, ([string])
$col5 = New-Object system. Data.DataColumn Description,([string]) #Added by me
$col6 = New-Object system. CreatedBy,([string]) #Added by me Data.DataColumn
$vmtable.columns.add ($col1)
$vmtable.columns.add ($col2)
$vmtable.columns.add ($col3)
$vmtable.columns.add ($col4)
$vmtable.columns.add ($col5) #Added by me
$vmtable.columns.add ($col6) #Added by me
#examine all the VMS in vCenter, if the snapshot has been found - adding to the table
ForEach ($vm in (Get - VM |)) Sort - Object - property name))
{
ForEach ($snapshot in (Get-Snapshot - VM $vm. Name | Sort - Object - property name))
{
#$snapevent is how we get the event so that we can see wink creator. Other variables can be used here. Notes at the end of
$snapevent is get-VIEvent-entity $snap. VM-Types of information-finishing $snap. Created MaxSamples - 1 | Where-Object {$_.} FullFormattedMessage - imatch ' task: create instant virtual computer "}"
$created = - $snapshot split. Created
$row = $vmtable. NewRow()
$row. VM = $vm. Name
$row. Snapshot = $snapshot. Name
$row. SizeMB = "{0:N0}" f $snapshot. SizeMb
$row. Created = $created [0]
$row. Description = $snapshot.description #Added by me
$row. CreatedBy = $snapevent. Username #Added by me
$vmtable. Rows.Add ($row)
}
}
#SnapEvents notes:
#foreach ($snap in Get - VM |) Get - Snapshot)
#{$snapevent = get-VIEvent-entity $snap. VM-Types of information-finishing $snap. Created MaxSamples - 1 | Where-Object {$_.} FullFormattedMessage - imatch ' task: create instant virtual computer "}"
#if ($snapevent - not $null) {Write-Host ("VM:"+ $snap. ")} VM + ".." «Snapshot ' "+ $snap +" "created the"+ $snap. "» Created.DateTime + 'by' + $snapevent. (Nom d'utilisateur + ".")}
#else {write-Host ("VM:"+ $snap. ")} VM + ".." «Snapshot ' "+ $snap +" "created the"+ $snap. "» Created.DateTime + ".." This event is not in vCenter events database")}}
#
#Output example output:
#VM: DC2DC001. Snapshot ' pre - 5.1.2upgrade' created July 28, 2013 07:10:26 by vStrong.info\win8user.
#VM: DC1DC001. "Pre 5.1.2a upgrade" snapshot created July 28, 2013 07:51:24 by vStrong.info\win7user.
#VM: DC2APP001. Snapshot "to be resolved before" created on 2 August 2012 14:29:19. This event is not in the database of the vCenter events
One of the reasons why you empty, could be that the timestamp of the event is not 100% identical to the timestamp of the snapshot.
Alan SnapReminder , we add a short interval before and after snapshot creation time.
Tags: VMware
Similar Questions
-
Report snapshot. ssmail.txt output
Hey everyone, trying to make a report snapshot and some return values in a .txt document so I can send by e-mail. I would like to return the virtual machine creation date and the creator's username.
Everything works fine, except my ssmail.txt output. He wants only to return the user name of the last person who created a snapshot, even if its on a different virtual computer.
$myVMs = get - VM
$VMsWithSnaps = @)
{foreach ($vm to $myVMs)
$vmView = $vm | Get-View
If ($vmView.snapshot - not $null) {}
Write-Host "VM $vm has a snapshot.
$SnapshotEvents = get-VIEvent-body $vm - type info - MaxSamples 1000 | Where {}
$_. FullFormattedMessage.contains ("Create virtual machine snapshot")}
try {}
$user = $SnapshotEvents [0]. Username
$time = $SnapshotEvents [0]. Createduserid
} catch {} [System.Exception]
$user = $SnapshotEvents.UserName
$time = $SnapshotEvents.CreatedTime
}
$VMInfo = "" | Select 'VM', 'CreationDate', 'user '.
$VMInfo. "" VM "= $vm. Name
$VMInfo. "' CreationDate ' = $time
$VMInfo. "" User "= $user
$VMsWithSnaps += $VMInfo
Get - VM | Select-Object - ExpandProperty name | Out-file "C:\scripts\VMList.txt."
Get-Snapshot - VM (Get-Content C:\scripts\VMList.txt). Select-Object VM, name, creation, $user | Format-List | Out-file C:\scripts\ssmail.txt
}
}
$VMsWithSnaps | CreationDate sorting
*****************************************************
It's out of ssmail.txt:
VM: Lab - vCO VM
Name: test
Created on: 07/08/2014-14:01:38
Adam:
VM: Lab - vCO VM
Name: test1
Created on: 11/08/2014-13:18:39
Adam:
VM: Lab - vCO VM
Name: test2
Created on: 12/08/2014-09:38:36
Adam:
VM: Test VM
Name: test
Created: 13/08/2014-09:49:42
Adam:
********************************************************
It seems that the last person to create a snapshot will have their user name filled with each snapshot release. For example: he says 'Adam' created all snapshots, but "John" had created the first 3 and 'Adam' the last of them.
Thank you.
I don't understand why you have the Get - VM and Get-snapshot at the end of the script.
Try like this (I've simplified a little other things as well)
$myVMs = get - VM
{foreach ($vm to $myVMs)
Get-Snapshot - $vm VM | Tri-objet-property CreationDate-descending | Select - 1 first | %{
Write-Host "VM $vm has a snapshot.
$SnapshotEvents = @(get-VIEvent-entité $vm-tapez info-MaxSamples ([int]:: MaxValue) |)
Where {$_.} FullFormattedMessage.contains ("Create virtual machine snapshot")})
$_ | Select-Object VM,Name,@{N="Created; E = {$SnapshotEvents [0].} CreatedTime}},@{N="User '; E = {$SnapshotEvents [0].} User name}} |
Format-List | Out-file C:\ssmail.txt-ajouter
}
}
-
helps the report snapshot in full size conversion
Hi people,
Just start with PowerCLI and restored a scipt to send me a list of snapshots (I realize there are a lot of scripts that preset). the script works as expected, but the variable SizeMB includes 19 and 20 decimals, which makes it a little difficult to read.
line of script in question:
$Report = get - vm | Get-snapshot | Select vm powerstate, name, sizemb | ConvertTo-Html-head $a | Out-string
example of output:
VM
PowerState
Name
SizeMB
Test cluster
PoweredOff
Before installing the drivers
432.1879596710205078125
MAX - DEV
Receptor
06/03/2013
5201.38588237762451171875
full script below. can anyone suggest an easy way to round or truncate the size of snapshot to a whole number?
Thank you
Alex
Add-pssnapin VMware.VimAutomation.Core
SE connect-VIServer foo.bar.com
$vCenterSettings = get-view-Id "OptionManager-VpxSettings.
$MailSender = ($vCenterSettings.Setting |) Where-Object {$_.} Key - eq "mail.sender"}). Value
$MailSmtpServer = ($vCenterSettings.Setting |) Where-Object {$_.} Key - eq "mail.smtp.server"}). Value
$a = '< style >.
$a = $a + "BODY {font family: Verdana, Arial, Helvetica, without serif;} '. do-size: 11; "{do-color: #000000}.
$a = $a + "TABLE {border-width: 1px;}. border-style: solid; border-color: black; border-collapse: collapse ;} »
$a = $a + "TH {border-width: 1px;}. padding: 0px; border-style: solid; border-color: black; "{background-color: #04B45F}.
$a = $a + "TD {border-width: 1px;}. padding: 0px; border-style: solid; border-color: black; "{background-color: #BCF5A9}.
$a = $a + ' < / style >.
$Report = get - vm | Get-snapshot | Select vm powerstate, name, sizemb | ConvertTo-Html-head $a | Out-string
' Send-MailMessage-to $MailSender-to ' [email protected] "-subject" SoE vCenter report snapshot "-$Report - BodyAsHtml - smtpServer $MailSmtpServer of body "
OutputTry to change this line
$Report = get - vm | Get-snapshot | Select vm powerstate, name, sizemb | ConvertTo-Html-head $a | Out-string
in this
$Report = get - vm | Get-snapshot | Select vm,powerstate,name,@{N="sizemb; E = {[math]: tour ($_.)} (SizeMb, 2)}} |
ConvertTo-Html-head $a | Out-string
With a calculated property, you can make calculations or changes on the property that you want to display
-
Create a virtual report machine include: Pool of resources with custom fields
Hello
I would like to create a VM report that includes the name of the virtual host computer and Discription, as well as the virtual machine Resource Pool belongs too.
I would also report to query for custom fields, provide the names, values, and to give it in a format that works with export-csv.
I have a start on the script and it included as an attachment.
How should I go about adding custom fieldsvalues?
How can I add the name of the Resource Pool of the report?
Thank you in advanced for your help.
Tim
The problem with the CustomFields, is that I don't know how they are defined on a guest.
It's a problem when you want to make an Export-Csv thereafter. The cmdlet can handle variable-length items in the table very well.
That's why I put 1 CustomField in 1 rank.
$report = @() Get-ResourcePool | %{ $rpName = $_.Name $_ | Get-VM | %{ $vmName = $_.Name $_.CustomFields | %{ $report += New-Object PSObject -Property @{ ResPool = $rpName VM = $vmName CustomName = $_.Key CustomValue = $_.Value } } } } $report | Export-Csv "C:\report.csv" -NoTypeInformation -UseCulture
BTW, the Export-Csv cmdlet is a standard cmdlet. Has nothing to do with Dmitri.
Note that the script in this format requires PowerShell v2 RTM
____________
Blog: LucD notes
Twitter: lucd22
-
Unable to find the id of the statspack report snapshot in Oracle 9.2.0.4
Hello guys,.
When I run @?/rdbms/admin/spreport.sql I am not able to see any id snapshot. I see all the values as #.
Please find below the output, I get after I run @?/rdbms/admin/spreport.sql
========================================================================
August 6, 2013 22:00 7 August 6, 2013 23:00 7 August 7, 2013 00:00 7 August 7, 2013 01:00 7 August 7, 2013 02:00 7 August 7, 2013 03:00 7 Specify the start and end snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Begin snapshot Id specified:
Enter the value for end_snap:
============================================================================
Oracle version is 9.2.0.4.0
I checked the tables ' stats$ snapshot and stats$ database_instance ', here too, I can see instant as id #.
Please suggest.
You need to edit $ORACLE_HOME/rdbms/admin/sprepins.sql, find a line something like
column snap_id format 99999990 heading 'Snap Id'; -
Reporting to include custom attributes of Vm and organized through multiple vcenters.
Hello
We are just moving our production test vfoglight solution & have you come across a bit of a weird one. We had a report / discovers that would list all virtual machines in our virtual Center and displays the custom attributes in a nice - good for the management report, form etc. However, we are moving to a new instance of virtual center & we have a test instance too - all are present in vfoglight, but our report draws only the custom of the original vcentre attributes. I'm not wcf script guru, but I gave it a good look & can't see a way forward - the hero of any script out there who could take a look and help out?
Moreover, do you think I could put in a request for support for this one & get any joy?Hope someone can help - I'll post all the files needed etc.
Kind regards
Jonathan
Thought of it at the end - on the second vcenter vmware foglight agent did not have the ability to collect custom attributes in the service.config file set to true. After true and restart the collector and the connector, everything was fine.
-
I'm looking for a query compare - my config of UN-produced SGD with my config of SGD prod. My OEM non-produits are not controlled environments, and no changes will happen dynamically. The fear is that we miss a config that we made in non-produits, but did not Prod! My main goal is: wanted configs everything has changed, so that I can compare the environments. This will also help check if we follow values recommonded Oracle.
Any help is very appreciated.
Thank you
Vijay
Thank you. Exploring the omsvfy command, looks like omsvfy-summary view gives version I'm looking for.
-Vijay
-
Location of snapshot and 'owner '.
I'm pretty new to powershell and have met with this script (below) to collect information from snapshot. However, what the script does not do is give me the location of data store for each reported snapshot, or, the 'owner' of the snapshot based on the folder that the virtual machine is located in the CR. Has anyone out there collected this information before? Any suggestions are welcome. Thank you
function {Generate-report
Write-Output ".» Error {color: #FF0000; make-weight: bold;}. Title . "Normal ().
{Foreach ($snapshot to $report)
Write-Output ".VC report
Name of the virtual machine
Name of the snapshot
More than 24 hours
Host
Data store
Owner
$($snapshot.vm)
$($snapshot.name)
$($snapshot.created)
$($snapshot.host)
"
}
Write-Output "."
}
$username = "#"
$password = "#"
$ServerList = ' # '.
*$Report = @)
{foreach ($server in $serverlist)
If ($server - eq 'VCServer') {Connect-VIServer $server}
else {$server Connect-VIServer-user $username - password $password}
Get - vm | Get-snapshot | %{
$Snap = {} | Select the virtual machine name, created, host
$Snap.VM = $_.vm.name
$Snap.Name = $_.name
$Snap.Created = $_.created - lt (Get-Date). AddDays(-20)
$Snap.Host = $_.vm.host.name
$Report += $Snap
}
}
Connect-VIServer is called in the loop who crosses all servers in $ServerList.
In the script below, I moved the Connect-VIServer out of the loop when it comes to the "VCServer.
There was a statement of table rows missing at the beginning of the line where the snapshot data is written.
function Generate-Report { Write-Output "
" Write-Output "
" } $username = '######' $password = '#######' $ServerList = "########" $Report = @() if ($server -eq "VCServer"){Connect-VIServer $server} foreach ($server in $serverlist){ if ($server -ne "VCServer") {Connect-VIServer $server -user $username -password $password} get-vm | get-snapshot | % { $Snap = {} | Select VM,Name,Created,Host, DSdir $Snap.VM = $_.vm.name $Snap.Name = $_.name $Snap.Created = $_.created -lt (Get-Date).AddDays(-20) $Snap.Host = $_.vm.host.name $vm = Get-View -Id $_.VM.Id foreach($snaptree in $vm.Snapshot.RootSnapshotList){ if($snaptree.Name -eq $_.Name){ $sn = Get-View $snaptree.Snapshot $Snap.DSdir = $sn.Config.Files.SnapshotDirectory } } $Report += $Snap } } Generate-Report > "C:\Temp\test.htm"VC report " foreach ($snapshot in $report){ Write-Output "VM Name Snapshot Name Older than 24 Hours Host Datastore Owner " } Write-Output "$($snapshot.vm) $($snapshot.name) $($snapshot.created) $($snapshot.host) $($snapshot.DSdir) -
HI: I analyze the STATSPACK report: this is the "volume test" on our UAT server for most of entry or "bind variables". Our shared pool is well used in oracle. Recovery of Oracle logs is not configured properly on this server, as in "Top 5 events of waiting", there are 2 for Oder.
I need to know what other information may be digging from of 'waiting in the foreground events' & ' background waiting events ", and which can help us better understand, in combination of ' Top 5 wait event, that how did the server test /? It could be overwhelming. wait events, so appreciate useful diagnostic or analyses. Database is oracle 11.2.0.4 updated from 11.2.0.3 on IBM AIX 64-bit, level 6.x system power
STATSPACK report
DB Id Instance Inst Num Startup Time Release RAC database~~~~~~~~ ----------- ------------ -------- --------------- ----------- ---
700000XXX XXX 1 22 April 15 12:12 11.2.0.4.0 no.
Host name Platform CPU Cores Sockets (G) memory~~~~ ---------------- ---------------------- ----- ----- ------- ------------
dXXXX_XXX AIX-Based Systems (64-2 1 0 16.0)
Snapshot Id Snap Snap time Sessions Curs/Sess comment~~~~~~~~ ---------- ------------------ -------- --------- ------------------
BEGIN Snap: 5635 22 April 15 13:00:02 114 4.6
End Snap: 5636 22 April 15 14:00:01 128 8.8
Elapsed time: 59.98 (mins) Av law Sess: 0.6
DB time: 35,98 (mins) DB CPU: 19,43 (mins)
Cache sizes Begin End~~~~~~~~~~~ ---------- ----------
Cache buffer: block 2 064 M Std size: 8 K
Shared pool: 3 072 M Log Buffer: 13 632 K
Load profile per second per Transaction per Exec by call
~~~~~~~~~~~~ ------------------ ----------------- ----------- -----------
DB Time (s): 0.0 0.6 0.00 0.00
DB CPU: 0.0 0.3 0.00 0.00
Size: 458 720,6 8,755.7
Logical reads: 245,7 12 874,2
Block changes: 1 356.4 25.9
Physical reads: 6.6 0.1
Physical writings: 61.8 1.2
The user calls: 38.8 2 033,7
Analysis: 286,5 5.5
Hard analysis: 0.5 0.0
Treated W/A Mo: 1.7 0.0
Logons: 1.2 0.0
Runs: 801,1 15.3
Cancellations: 6.1 0.1
Operations: 52.4
Indicators of the instance~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Buffer % Nowait: 100.00 do NoWait %: 100.00
Buffer % success: 99.98% W/A optimal, Exec: 100.00
Library success %: 99,77% soft Parse: 99.82
Run parse %: 64.24 latch hit %: 99.98
Analyze the CPU to analyze Elapsd %: 53.15% Non-Parse CPU: 98.03
Shared pool statistics Begin End------ ------
% Memory use: 10.50 12.79
% SQL with executions > 1: 69,98 78,37
% Memory for SQL w/exec > 1: 70.22 81,96
Top 5 timed events Avg % Total
~~~~~~~~~~~~~~~~~~ wait Call
Event waits time (s) (ms) time
----------------------------------------- ------------ ----------- ------ ------
CPU time 847 50.2
ENQ: TX - 4 480 97 434 25.8 line lock conflict
Log file sync 284 169 185 1 11.0
log file parallel write 299 537 164 1 9.7
log file sequential read 698 16 24 1.0
Host CPU (processors: 2 hearts: Sockets 1: 0)
~ ~ ~ Medium load
Begin End User System Idle WIO WCPU
------- ------- ------- ------- ------- ------- --------
1.16 1.84 19.28 14.51 66.21 1.20 82.01
Instance of CPU~~~~~~~~~~~~ % Time (seconds)
-------- --------------
Host: Time (s) Total: 7,193.8
Host: Availability of time processor (s): 2,430.7
% of time host is busy: 33.8
Instance: Time processor Total (s): 1,203.1
% Busy CPU used, for example: 49.5
Instance: Time of database total (s): 2,426.4
% DB time waiting for CPU (resp. resources): 0.0
Statistical memory Begin End~~~~~~~~~~~~~~~~~ ------------ ------------
Host Mem (MB): 16,384.0 16 384,0
Use of LMS (MB): 7,136.0 7 136,0
Use of PGA (Mo): 282.5 361.4
Host % Mem used for SGA + PGA: 45.3 45.8
Foreground wait events DB/Inst: XXXXXs Snaps: 5635-5636
-> Only events with wait times Total (s) > =.001 are indicated
--> sorted by Total desc waiting time, waits desc (idle last events)
AVG % Total% Tim Total wait Wait Wait call
Event is waiting for the time (s) (ms) /txn times
---------------------------- ------------ ---- ---------- ------ -------- ------
ENQ: TX - line lock 4 480 0 434 97 contentio 0,0 25.8
284 167 0 185 1 file synchronization log 1.5 11.0
File I/O 8 741 of disk 0 4 operations 0.0 0.2
direct path write 0 13 247 3 0.1 0.2
DB file sequential read 6 058 0 1 0.0 0.1
buffer busy waits 1 800 0 1 1 0,0.1
SQL * Net more data to the client 29 161 0 1 0.2 0.1
direct path read 7 696 0 1 0.0 0.0
db file scattered read 316 0 1 2 0,0.0
latch: shared pool 144 0 0 2 0,0.0
Initialization of 30 0 0 3 0,0.0 CSS
cursor: hand 10 0 0 9 0,0.0 S
lock row cache 41 0 0 2 0,0.0
latch: rank objects cache 19 0 0 3 0,0.0
log file switch (private 8 0 0 7 0,0.0 str
library cache: mutex X 28 0 0 2 0,0.0
latch: cache buffers chains 54 0 0 1 0,0.0
free lock 290 0 0 0.0 0.0
sequential control file read 1 568 0 0 0.0 0.0
switch logfile (4 0 0 6 0,0.0 control point
Live sync 8 0 0 3 0,0.0 road
latch: redo allocation 60 0 0 0 0.0.0
SQL * Net break/reset for 34 0 0 1 0,0.0 customer
latch: enqueue hash chains 45 0 0 0 0.0.0
latch: cache buffers lru chain 7 0 0 2 0,0.0
latch: allowance 5 0 0 1 0,0.0 session
latch: object queue header 6 0 0 1 0,0.0 o
Operation of metadata files ASM 30 0 0 0 0.0.0
latch: in memory of undo latch 15 0 0 0.0 0.0
latch: cancel the overall data 8 0 0 0 0.0.0
SQL * Net client message 6 362 536 0 278 225 44 33.7
jobq slave wait 7 270 100 3 635 500 0.0
SQL * Net more data to 7 976 0 15 2 0,0 clien
SQL * Net message to client 6 362 544 0 8 0 33.7
-------------------------------------------------------------
Context of the DB/Inst events waiting: XXXXXs clings: 5635-5636
-> Only events with wait times Total (s) > =.001 are indicated
--> sorted by Total desc waiting time, waits desc (idle last events)
AVG % Total
% Tim Total wait Wait Wait call
Event is waiting for the time (s) (ms) /txn times
---------------------------- ------------ ---- ---------- ------ -------- ------
log file parallel write 299 537 0 164 1 1.6 9.7
log file sequential read 698 0 16 24 0.0 1.0
db file parallel write 9 556 0 13 1 0,1.8
146 0 10 70 0,0.6 startup operating system thread
control file parallel write 2 037 0 2 1 0,0.1
Newspaper archive e/s 35 0 1 30 0,0.1
LGWR wait for redo copy 2 447 0 0 0.0 0.0
async file IO DB present 9 556 0 0 0.1 0.0
DB file sequential read 145 0 0 2 0,0.0
File I/O disk 349 0 operations 0 0.0 0.0
db file scattered read 30 0 0 4 0,0.0
sequential control file read 5 837 0 0 0.0 0.0
ADR block lu file 19 0 0 4 0,0.0
Block ADR file write 5 0 0 15 0,0.0
direct path write 14 0 0 2 0,0.0
direct path read 3 0 0 7 0,0.0
latch: shared pool 3 0 0 6 0,0.0
single log file write 56 0 0 0.0 0.0
latch: redo allocation 53 0 0 0 0.0.0
latch: 1 0 0 3 0,0.0 active service list
free latch 11 0 0 0 0.0.0
CPI of RDBMS 5 314 523 57 189 182 1.7 message
Space Manager: slave wa slowed 4 086 88 18 996 4649 0.0
DIAG idle wait 7 185 100 1000 7 186 0.0
Streams AQ: waiting time 2 50 4 909 # 0,0
Streams AQ: qmn slowed slave 129 0 3 612 28002 0.0 w
Streams AQ: Coordinator of the 258 50 3 612 14001 0,0 qmn
SMON timer 2 43 3 605 83839 0.0
PMON timer 99 1 199 2999 3 596 0.0
SQL * Net client message 17 019 0 31 2 0.1
SQL * Net message to client 12 762 0 0 0.1 0
class slaves wait 28 0 0 0 0.0
Thank you very much!
Hello
I think that your CPU is overloaded by your stress tests. You have one VCPU with 2 wires (2 LCPU), right? And the load average is greater than one. You have time DB which is not counted in (CPU time + wait events) and which comes no doubt from time spent in the runqueue.
> Oracle recovery logs is not properly configured on this server, as in "Top 5 events of waiting", there are 2 for oder
It is an error in statspack for show "log file parallel write here." This moment is historical and is included in 'log file sync '. And I don't think you have to redo misconfiguration. Waiting for 1ms to commit is ok. In OLTP you should have more than one validation in a user interaction so that the user don't worry not about 1 m in batch mode, unless you commit to each row, 1 DC to commit should not increase the total execution time.
The fact that you have a lot of line lock (enq: TX - line lock conflict) but very little time (on average 97 ms) is probably a sign that testers are running simultaneously a charge affecting the same data. Their set of test data is perhaps too simple and short. An example: when stress tests of an order entry system if you run 1000 concurrent sessions, ordering the same product to the same customer, you can get this kind of symptoms, but the test we unrealistic.
It's a high activity of 2000 calls per second, 52 transactions per second, user. But you also have low average active sessions, so the report probably covers a period of non-uniform activity, which makes the averages without meaning.
So note to tell about the events of waiting here. But we don't have any info about 39% of DB time devoted to the CPU which is where something can be improved.
Kind regards
Franck.
-
(Redirected) Reference Dell Enterprise Reporter
I'm new on the Forum site. We are currently testing the Dell Business Reporter tool. I am a 10 month at a client project, and we have very specific needs, we strive to fill for the customer. We would like to find someone to customize settings for us in the Enterprise Reporter tool to create 2 different types of reports in Windows 2003 / 2008 mixed Windows file sharing / DFS environment. We are looking for the following parameters:
- List of folders, shares, date of last access on a per-server basis in a specific site.
- Another report which includes membership in a group, the group owner (as indicated in the description of the announcement of the Group) and Department of individual users (also from AD).
My NOTE to the ADMINemail address: Email ID deleted by privacy policy >
Hi rmharris97,
Please repost this in the customer center enterprise tech forum for faster assistance.
http://en.community.Dell.com/TechCenter/enterprise-client/f/
-
AWR SQL Report does not report the stats
AWR report only stats beyond a certain level? I have a statement select simple I know is running (executions of v$ sql increases), but when I run a report AWR SQL (awrsqrpt), it says "no data exists for this section of the report.
Snap Id Snap time Sessions Curs/Sess
--------- ------------------- -------- ---------
BEGIN Snap: 370936 10 June 15 07:00:24 856 36.1
End Snap: 370937 10 June 15 07:20:26 881 38.9
Elapsed time: 20.02 (mins)
DB time: 754.82 (min.)
Summary of SQL DB/Inst: CAMPRD/camprd snaps: 370936-370937
There is no data for this section of the report.
-------------------------------------------------------------
SQL ID: 84kfv4p500pgh DB/Inst: CAMPRD/camprd Snaps: 370936-370937
There is no data for this section of the report.
-------------------------------------------------------------
Full text of SQL
There is no data for this section of the report.
I ran the report on the last 4 days and reports
ORA-20025: SQL 84kfv4p500pgh ID does not exist for this database instance.
and yet, the executions of V$ SQL continues to increase
Thank you
Ian
CWA only captures statements considered to be Top N (DBA_HIST_WR_CONTROL. TOPNSQL)
You can use DBMS_WORKLOAD_REPOSITORY. ADD_COLORED_SQL sort AWR it will include
-
Hi, I'm after a script that deletes snapshots that are x number of days old and excludes those that begin with a certain letter
any help will be appreciated
There was an error in my original script, I've updated the code above.
To send an e-mail, you could do
$numberOfDays = 7
$excludeName = "^ exclude."
$report = get - VM | Get-Snapshot |
where {$_.created - lt (Get-Date).adddays(-$numberofdays) - and $_.} Name - notmatch $excludeName} | %{
$snap = $_
Remove-Snapshot - cliché $snap - confirm: $false - RunAsync > $null
$snap | Select @{N = "VM"; E={$_. VM.}}, name, created
}
«Send-MailMessage-to [email protected] - to [email protected] - object «Deleted snapshots "»
-BodyAsHtml-body ($report |) ConvertTo-HTML | Out-String) '
-SmtpServer SMTP.domaine.com
-
Hello
I have a script that removes all previous snapshots then 14 days.
I want to change it and add this option:
If the name of the snapshot contains the word consolidate or VADP, remove him after 1 day if the name is different delete after 14 days.
It's the script of ny:
SendMail function
{
Param ($Body)
$emailfrom = " " [email protected] "
' $emailto = ' [email protected] "" "
$subject = "report snapshot."
$smtpserver = "smtpvs.blabla.co.il"
$smtp = new-object net.mail.smtpclient ($smtpserver)
$smtp. Send ($emailfrom, $eMailTo, $Subject, $Body)
}
$vCenter = $args [0]
If (($args[0]) - and ($args [1]))
{
to connect-viserver $vCenter
$body = "' the following snapshots have been deleted:" "
$body += [environment]: NewLine
$snaps = get - vm | Get-snapshot
$now = date
foreach ($s in $snaps)
{
$age = $now-$s.created
If ($age.days - ge 14)
{
$VMname = get-vm-Id $s.VMId | Select name
$name = $VMname.name
$snapname = $s.name
$daysold = $age.days
If ($args [1] - eq '-f')
{
Remove-snapshot $s - confirm: $false
}
$body += "VM: $name Snap name: $snapname age: $daysold days.
$body += [environment]: NewLine
}
}
SendMail $body
disconnect-viserver-confirm: $false
}
on the other
{
Write-host - foregroundcolor red "use: \script.» [vCenter] < f (force) >.
}
Change this line
If ($age.days - ge 14)
in
If (($age.days-ge 14-et $s.Name-notmatch "consolider |)) VADP") - or (($age.days-ge 1-et $s.Name-match"consolider |)) VADP")))
-
Hi all, I searched the internet for days to be able to find an example of a script or any code besides that will list all files in a warehouse of VMware vcenter, the majority of the code that I found used Get - VM to find the folder names. Get - VM is not useful for me.
The script I need must be able to locate a file ending with "* _recent" inside a folder named ".snapshots" located in the root of several data stores (not Local).
Summary of process:
Find all data centers
Locate all data warehouses
Search in each data store found a folder titled ".snapshot" at the root of the data store if ".snapshot" is NOT found, not found report and continue to the next data store.
If ".snapshot" determine whether a file ending with '_recent' is present .snapshot, found or not found report
It would be ideal if the results / report saved in the CSV format and shows, for each data store, if there is no ".snapshot" or «_recent»
Anyone out there can help with the creation of a script to fulfill my needs it please?
I'm not sure that this is even possible?
Kind regards
Troy.
You can use the provider of data store for this type of research.
Something like that
&{foreach($dc in Get-Datacenter){ foreach($datastore in Get-Datastore -Location $dc){ New-PSDrive -Location $datastore -Name DS -PSProvider VimDatastore -Root '\' | Out-Null $snap = Get-ChildItem -Path DS:\ | Where{$_.PSIsContainer -and $_.Name -eq ".snapshot"} if($snap){ $recent = Get-ChildItem -Path DS:\.snapshot | Where{$_.PSIsContainer -and $_.Name -match "_recent"} if($recent){ $result = "Folder found" } else{ $result = ".snapshot\*_recent not found" } } else{ $result = ".snapshot folder not found" } Remove-PSDrive -Name DS -Confirm:$false $result | Select-Object @{N="Datacenter";E={$dc.Name}}, @{N="Datastore";E={$datastore.Name}}, @{N="Result";E={$_}} }}} | Export-Csv report.csv -NoTypeInformation -UseCulture
-
So I would like to see if I can get some tips on what im doing is not right.
What I'm trying to do is to check if there is a snapshot to the virtual machine in $list (this part seems. work on the portion of the YEW,
but in the ELSE...
My problem is that I do not know how just plug in html to display something like "NO snapshot FOUND"
I use the convertto-html to create a report...
$myreport = @)
$snap = get-vm-name $liste | Get-Snapshot
If ($snap)
{
$vmlist = get-Content C:\test.txt
Get-vm-name $vmlist | % {
$Row = "" | Select-Object VM, "VMWare Tools".
$Row.VM = $_. Name
$Row. "" VMWare Tools "= $_.toolsversionstatus
$myreport += $Row
}
}
On the other
{
$myreport = @)
NOT FOUND of SNAPSHOTS <-don't know how to add this ($myreport)
$myreport += $Row
}
}I will check this and let you know.
Maybe you are looking for
-
How to know why my iMac wakes itself since the installation of Sierra?
I installed macOS Sierra yesterday. Since then, whenever I put my iMac to sleep he awakened by himself some time later and stayed awake until manually put still asleep. I don't know how long it took before he woke up every time. I looked for a reviva
-
I have a 5 button mouse Microsoft. In the mouse properties, I have 'Close' linked to one of the buttons. In previous versions of Firefox, which would close the active tab. With Firefox 4, it closes the browser. Is it possible to recover this feature?
-
Satellite L50DT-A009 touchscreen does not work
Hello! Tech total noob here, but I bought this model today.He had an upgrade of RAM 8 GB, made by the retailer.Other than that, standard bog. However, the touch screen does not work.We have had a look but impossible even to find all the tools for the
-
iPod Touch leaves the .dat files in Favorites
Whenever I plug my ipod touch into my computor it does an automatic synchronization and leaves a bunch of .dat files in all my favorite folders. This is a bread PITA to delete I seem to only be able to remove one at a time, and there seems to be hund
-
video card improving on Pavilion 500 - 164
I tried to upgrade the vidio card to a Galaxy GEforce GT610. The computer would not send a signal to the screen with this trendy card. I think I heard the beep of computer 4 times when starting. Can someone give me advice on this. The power would