Link to home
Start Free TrialLog in
Avatar of sunhux
sunhux

asked on

Suspend & resume a process using script/command

In procexp (Process Explorer), we can suspend & resume back a process.

What's the equivalent command or tools to do this?

In our AV suit, I'll need to distribute the scan across Mon-Sat but to do this
from the AV's management console, it involves a lot of manual efforts &
each time a new VM is provisioned, have to keep track.

So I thought of using a random function that generates 0 to 4 that saves
this number into the thousands of Windows VMs & then use a script
to suspend & resume the coreShellService process (the AV process)
0 to 5 days later when the manual weekly scan commences on Mon
0100hrs.

With command line AV scanner, I could use Unix Shell scripts to do
this with a random function & make the script sleep 0 to 5 days before
'waking' up to trigger the manual scan.

This will minimize the chance of an AV scan storm which suddenly
chews up a lot of resource across the vSphere cluster
Avatar of Coralon
Coralon
Flag of United States of America image

I don't think you can do that based on the command line options for process explorer (even looking through the documentation).

There isn't any easy way to pause a process.  However, there is a codeplex piece of software that may help you accomplish this.  http://www.codeproject.com/Articles/2964/Win-process-suspend-resume-tool

Coralon
Avatar of sunhux
sunhux

ASKER

Thanks very much;  found from that link there's equivalent MS tool ie pssuspend (& /r  to resume):
https://technet.microsoft.com/en-us/sysinternals/bb897540.aspx

Well, now I run into yet another issue:
coreShellService process provides both Realtime as well manual scan so if I suspend this process
(for x number of days where x is 0 to 5) to defer the manual scan to x days later, this means for
this duration of x days, Realtime AV will not function which will pose a risk if we get viruses
Avatar of sunhux

ASKER

To help me, anyone know if there's equivalent tools in Windows 2008 R2 x64
for iorenice & renice  used in Linux to throttle IO & CPU utilization ?
SOLUTION
Avatar of Coralon
Coralon
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sunhux

ASKER

Ok, got the nice tool (to lower CPU priority) for Windows.

Any idea where I can get ionice or iorenice equivalent for Windows 2008 R2
that are ready to run (without compiling)?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sunhux

ASKER

The 1st link for iopriority could do iorenice actually.

The 2nd link does not appear to give me anything useable or did I miss something?
The download link is on the bottom right..

I haven't done anything with it.

Coralon
Avatar of sunhux

ASKER

Ok thanks, I downloaded  windows_ionice-0.1.1.gem from that
Download link on the bottom right of the 2nd link.

So how do I install / run this  .gem  file?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial