[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: change priority of tasks in cfagent
From: |
Wheeler, John |
Subject: |
RE: change priority of tasks in cfagent |
Date: |
Mon, 12 May 2003 10:37:39 -0500 |
I started to formulate a solution based on fiters:
control:
Verbose = ( on )
actionsequence = (
shellcommands
processes
shellcommands
)
processes:
SetOptionString "-elf"
"cfagent"
filter=renicecfagent
shellcommands:
'/bin/ps -elf |grep cfagent'
filters:
{ renicecfagent
Priority: "20"
Result: "Priority"
}
started to test it but:
<SNIP>
End of CMD is 86
Regex 8 R root 11776 11457 1 87 20 ? 629
10:19:58 pts/3 0:00 cfagent -f ./blah.conf -v -d2 matched cfagent
ProcessFilter( 8 R ...)
SplitLine( 8 R root 11776 11457 1 87 20 ? 629
10:19:58 pts/3 0:00 cfagent -f ./blah.conf -v -d2)
F=(8) of [ 8 R root 11776 11457 1 87 20 ? 629
10:19:58 pts/3 0:00 cfagent -f ./blah.conf -v -d2]
S=(R) of [ 8 R root 11776 11457 1 87 20 ? 629
10:19:58 pts/3 0:00 cfagent -f ./blah.conf -v -d2]
UID=(root) of [ 8 R root 11776 11457 1 87 20 ? 629
10:19:58 pts/3 0:00 cfagent -f ./blah.conf -v -d2]
PID=(11776) of [ 8 R root 11776 11457 1 87 20 ? 629
10:19:58 pts/3 0:00 cfagent -f ./blah.conf -v -d2]
PPID=(11457) of [ 8 R root 11776 11457 1 87 20 ? 629
10:19:58 pts/3 0:00 cfagent -f ./blah.conf -v -d2]
C=(1) of [ 8 R root 11776 11457 1 87 20 ? 629
10:19:58 pts/3 0:00 cfagent -f ./blah.conf -v -d2]
PRI=(87) of [ 8 R root 11776 11457 1 87 20 ? 629
10:19:58 pts/3 0:00 cfagent -f ./blah.conf -v -d2]
NI=(20) of [ 8 R root 11776 11457 1 87 20 ? 629
10:19:58 pts/3 0:00 cfagent -f ./blah.conf -v -d2]
ADDR=(?) of [ 8 R root 11776 11457 1 87 20 ? 629
10:19:58 pts/3 0:00 cfagent -f ./blah.conf -v -d2]
SZ=(629) of [ 8 R root 11776 11457 1 87 20 ? 629
10:19:58 pts/3 0:00 cfagent -f ./blah.conf -v -d2]
Segmentation Fault (core dumped)
[root@cessna /root]# file core
core: ELF 32-bit MSB core file SPARC Version 1, from 'cfagent'
looks like I did something "bad". It found the priority. If you can get
this to work, the next step would be to enable a class and have shell
commands renice the process. You may even be able to renice it from the
filter itself with something like
ExecProgram: "/bin/nice $(this)" # True if the program returns
true. $(this) is the current object
Gave up. ;-(
> -----Original Message-----
> From: Lucas Albers [mailto:admin@cs.montana.edu]
> Sent: Saturday, May 10, 2003 6:50 PM
> To: help-cfengine@gnu.org
> Subject: change priority of tasks in cfagent
>
> Is their a way to set cfagent to run with a higher priority.
> I have a regular cfagent task that I would like to run at a nice +20.
> Can cfagent renice itself?
> Should I just renice it through a cron job?
> It would seem you could have it look for the cfagent process in the
> process section and then run nice on itself.
> --Luke
> Computer Science Sysadmin
> Montana State University, Bozeman MT.
>
>
>
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://mail.gnu.org/mailman/listinfo/help-cfengine
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- RE: change priority of tasks in cfagent,
Wheeler, John <=