Perform IISRESET if CPU usage above 90% [closed] - iis

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm trying to find out how to do an IISRESET if the CPU usage gets above 90%. I was thinking about using a batch file or something like that, but really I have no clue.
The problem is the CPU usage gets to 99%, the machine slows down and the only way to get the website working again is to log onto the machine and manually perform an IISRESET, I'm trying to find out if there is a way to automate that so that when the CPU usage get to around 95% the IISRESET will happen.
Hope someone can help.
Thanks
Alex

This PowerShell script will do that:
if ((Get-Counter '\Processor(_Total)\% Processor Time').CounterSamples[0].CookedValue -gt 90) { &iisreset }

Related

How do I measure CPU usage and memory percentage versus time on linux? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I would like to plot the CPU and memory usage of an application on linux vs time. What is the best way to do this?
Would greping these values out from top every 0.1s and writing them into some file work - or is there a better and easier way?
There is an easier way. All of the information displayed in top can be found in /proc/<pid>/, most of it in /proc/<pid>/stat. man proc describes the content of these files.

Size of access.log and server load? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Is there any difference at all in server load when adding new lines to a big vs. small access.log file?
What I mean is, should I delete my access.log files if they become too big or leave it. It is 6GB right now. I do not rotate.
I'm not sure about the performance difference of big or small files, but maybe you want to split them every month and compress old access-log files. For that you can use logrotate. More information in the man page
Log rotation is an important part of maintaining a server. Without it, you'r likely to fill up your disk, and then your server will behave extremely strangely, depending on the app.
Regardless of performance, you should be using logrotate or something similar.

show Processor speed [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I have a server with an AMD Opteron(tm) Processor 246 and a customised Linux kernel (2.6.9-100.ELhugemem) in it. When I check the processor using dmidecode, it displays a speed of 2000 MHz, whereas /proc/cpuinfo shows a speed of 1000MHz.
Can anybody explain this and also give me a method to check the current CPU speed?
What you are seeing is probably due to frequency scaling. You can see the minimum, maximum and current cpu frequency by:
cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq
cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
(Replace cpu0 as appropiate).
see cpufreq-info and cpufreq-set in http://www.thinkwiki.org/wiki/How_to_use_cpufrequtils
(may have to possibly install depending on distro)

How to hide other users processes from 'ps aux' output for 'users' group? Debian squeeze [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I'm running Debian. I want users to be unable to see my processes when they type 'ps aux'. A web search wasn't clear enough on how to do that, but it seems to be possible. How do I do that?
There are no simple ways, other than fancy things like tweaking the kernel code or the ps command code, or things like trying to use an innocent-looking name for the process. See:
https://superuser.com/questions/199044/is-it-possible-to-hide-a-process-from-the-listing-of-ps-or-top-on-linux
There are no questions of users or groups: everyone can see everyone's processes.
This cannot be done. What are your motivations for doing this?

Destroy a large amount of data as quickly as possible? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 12 years ago.
Improve this question
How would you go about securely destroying several hundred gigabytes of arbitrary data as quickly as possible?
Incinerating hard drives is a slow, manual (and therefore insecure) process.
Physically destroying the drives does not (necessarily) take a significant amount of time. Consider, for example, http://www.redferret.net/?p=14528 .
I know the answer but this seems like one of those questions best left unanswered unless you know why it's being asked.

Resources