Activity Feed
- Posted Re: Powershell Script to Poll for IIS AppPool consuming large amount of memory on Getting Data In. 03-08-2022 12:49 PM
- Posted Re: Powershell Script to Poll for IIS AppPool consuming large amount of memory on Getting Data In. 03-02-2022 06:15 AM
- Got Karma for Re: Powershell Script to Poll for IIS AppPool consuming large amount of memory. 02-14-2022 09:21 AM
- Posted Re: Powershell Script to Poll for IIS AppPool consuming large amount of memory on Getting Data In. 02-14-2022 09:17 AM
- Posted Re: Powershell Script to Poll for IIS AppPool consuming large amount of memory on Getting Data In. 01-10-2022 12:33 PM
- Posted Re: Powershell Script to Poll for IIS AppPool consuming large amount of memory on Getting Data In. 01-10-2022 07:13 AM
- Posted Re: Add color to report column in email on Reporting. 02-25-2021 07:01 AM
- Posted Re: Add color to report column in email on Reporting. 02-24-2021 01:40 PM
- Tagged Re: Add color to report column in email on Reporting. 02-24-2021 01:40 PM
- Posted Add color to report column in email on Reporting. 02-24-2021 11:25 AM
- Posted "winhostmon://Service" does not return StartName on All Apps and Add-ons. 02-16-2021 02:47 PM
Topics I've Started
Subject | Karma | Author | Latest Post |
---|---|---|---|
0 | |||
0 |
03-08-2022
12:49 PM
I wanted to offer and update. After making the change and performing a restart of the forwarder service memory still climbed pretty quickly to near what it was prior. I then restarted the client servers i running the script on and now 7 days not only as it held between 30-50% i even saw a spike to 76% at one point then it reclaimed 12 hrs later. That at least tells me most likely adding system.gc corrects the issue but requires a restart of the system. I will continue to watch mine for another week or so but consider the matter closed. Thank you
... View more
03-02-2022
06:15 AM
Good morning, We did see some decrease in memory however initially i was not sure if the GC need to be inside or outside the foreach loop. Originally i had If (Get-WmiObject -Class Win32_ServerFeature -ComputerName $env:computername | Where-Object {$_.name -like "Web Server (IIS)"}){
Import-Module WebAdministration
$ApplicationPools = Get-ChildItem IIS:\AppPools;
Foreach ($ApplicationPool in $ApplicationPools){
$ApplicationPoolName = $ApplicationPool.Name;
$ApplicationPoolState = $ApplicationPool.State;
If ($ApplicationPool.processModel.identityType -eq 'SpecificUser'){
$UserIdentity = $ApplicationPool.processModel.UserName;
}
else {
$UserIdentity = $ApplicationPool.processModel.identityType;
}
Write-Output "
ApplicationPoolName=`"$ApplicationPoolName`"
ApplicationPoolState=`"$ApplicationPoolState`"
UserIdentity=`"$UserIdentity`"
";
}
Remove-Module WebAdministration
}
[System.gc]::Collect() but memory slowly creeped upward so altered the script to If (Get-WmiObject -Class Win32_ServerFeature -ComputerName $env:computername | Where-Object {$_.name -like "Web Server (IIS)"}){
Import-Module WebAdministration
$ApplicationPools = Get-ChildItem IIS:\AppPools;
Foreach ($ApplicationPool in $ApplicationPools){
$ApplicationPoolName = $ApplicationPool.Name;
$ApplicationPoolState = $ApplicationPool.State;
If ($ApplicationPool.processModel.identityType -eq 'SpecificUser'){
$UserIdentity = $ApplicationPool.processModel.UserName;
}
else {
$UserIdentity = $ApplicationPool.processModel.identityType;
}
Write-Output "
ApplicationPoolName=`"$ApplicationPoolName`"
ApplicationPoolState=`"$ApplicationPoolState`"
UserIdentity=`"$UserIdentity`"
";
[System.gc]::Collect()
}
Remove-Module WebAdministration
} watching this currently to evaluate. Also testing the following variants. If (Get-WmiObject -Class Win32_ServerFeature -ComputerName $env:computername | Where-Object {$_.name -like "Web Server (IIS)"}){
$ApplicationPools = Get-WebConfiguration -Filter '/system.applicationHost/applicationPools/add'
foreach ($ApplicationPool in $ApplicationPools){
$ApplicationPoolName = $ApplicationPool.Name;
$ApplicationPoolState = $ApplicationPool.State;
If ($ApplicationPool.processModel.identityType -eq 'SpecificUser'){
$UserIdentity = $ApplicationPool.processModel.UserName;
}
else {
$UserIdentity = $ApplicationPool.processModel.identityType;
}
Write-Output "
ApplicationPoolName: $ApplicationPoolName
ApplicationPoolState: $ApplicationPoolState
UserIdentity: $UserIdentity
";
[System.gc]::Collect()
}
Remove-Module WebAdministration
} So watching it a bit longer. Unfortunately this is a slow memory creep 9 days or so before it normally reaches its peek.
... View more
02-14-2022
09:17 AM
1 Karma
Thank you Dmarling, We are adding the line to our script and will be testing, monitoring the memory this week. For us normally it takes approximately 9 days to get memory to the 80-90% range. We really appreciate your help and reply. Thank you again
... View more
01-10-2022
12:33 PM
What script, cmdlet and output did you end up using?
... View more
01-10-2022
07:13 AM
the script works, however it has a memory leak on the servers. That was the issue which opened this as over time memory is slowly eaten. THe script returns the following to splunk 1/10/22 9:05:01.000 AM ApplicationPoolName="Sites" ApplicationPoolState="Started" UserIdentity="domain\SvcUser"
... View more
02-25-2021
07:01 AM
You are correct Splunk cloud, unfortunately i am only a mere power user not admin. LoL But can run it past the admin to see if he will. I originally had the search, saved as a report then scheduled it to run daily because one of our team members like it delivered to his in box instead of the dashboard. Sadly though you confirmed what i was afraid of about the coloring. I had read send it as pdf could save the color but I was hoping to just have it inserted. I appreciate your help even though it only confirmed what i was hoping not to do. Have a wonderful day.
... View more
02-24-2021
01:40 PM
Thank you, as we are using Splunk web i am not sure that option could work. the query is. index=Index sourcetype=WinHostMon source="service" host="*" DisplayName="Bits*"
| rename DisplayName AS ServiceName
| rename State AS Status
| eval host = lower(host)
| lookup ourhosts_env host OUTPUTNEW Environment
| rename host as Host
| eval Time = strftime(_time, "%Y-%d-%m %H:%M:%S")
| fields - _time
| eval CurrentStatus = case(StartMode == "Disabled" AND Status == "Stopped", "Disabled", StartMode == "Auto" AND Status == "Running", "Success", StartMode == "Auto" AND Status == "Stopped", "Failure", StartMode == "Auto" AND Status == "Stopped", "Failure")
| stats latest(Time) as Time latest(Status) as Status latest(StartMode) as StartMode by Host ServiceName Environment CurrentStatus
| table Time Environment Host Status StartMode CurrentStatus When i run the search, or the report the colored cells show red, yellow, green. The email just has plain table no color.
... View more
- Tags:
- Thank
02-24-2021
11:25 AM
I have created a search which has multiple columns. One of the columns called status has color formatting. ALert = Red, Disiabled=Blue, Success=Green. The formatting works fine in the search however when the email is received there is no coloring at all. Is it possible to add to coloring so it appears as it does in the search > report? Also we are using splunk web not on premise. Thank you
... View more
Labels
- Labels:
-
saved search
-
scheduled search
02-16-2021
02:47 PM
We are using splunk cloud, and the liimited information I have read about winhostMon://Service suggests that it may be an option to retrieve StartName which is the username associated with the logon for the service but we cant seem to find why that is the only Field not being returned. Any help guidance and or suggestion would be greatly appreciated. Splunk Cloud Version:8.1.2011.1
... View more
Labels