Forum: Cfengine Help
Subject: status of process matching in Solaris?
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,21186,21186#msg-21186
Where are we with process matching in Solaris in community 3.1.4? Consider
this bundle:
body common control
{
bundlesequence => { "test" };
inputs => {"library.cf", "cfengine_stdlib.cf"};
}
bundle agent test
{
processes:
"cf-serverd$"
signals => { "int", "kill" },
process_select => byowner("root");
}
body process_select byowner (o){
process_owner => { "${o}" };
process_result => "process_owner";
}
Run on Linux:
cf-agent -IKnvf ./bugs.cf
...
community> Observe process table with /bin/ps -eo
user,pid,ppid,pgid,pcpu,pmem,vsz,pri,rss,nlwp,stime,time,args
community>
community> .........................................................
community> Promise handle:
community> Promise made by: cf-serverd$
community> .........................................................
community>
community> !! Matched: root 12431 1 12431 0.3 0.0 82212 24 3056
1 09:12 00:00:03 /var/cfengine/bin/cf-serverd
community> -> Found matching pid 12431
(root 12431 1 12431 0.3 0.0 82212 24 3056 1 09:12 00:00:03
/var/cfengine/bin/cf-serverd)
community> -> Need to keep signal promise 'int' in process entry 12431
community> -> Need to keep signal promise 'kill' in process entry 12431
Now on Solaris.
cf-agent -IKnvf ./bugs.cf
...
ommunity> Observe process table with /bin/ps -eo
user,pid,ppid,pgid,pcpu,pmem,vsz,pri,rss,nlwp,stime,time,args,zone
community>
community> .........................................................
community> Promise handle:
community> Promise made by: cf-serverd$
community> .........................................................
community>
community> -> No restart promised for cf-serverd$
community>
community> + Private classes augmented:
community>
community> - Private classes diminished:
Yet, look at the actual ps command.
bash-3.00$ /bin/ps -eo
user,pid,ppid,pgid,pcpu,pmem,vsz,pri,rss,nlwp,stime,time,args,zone|grep
cf-serverd
root 7116 1 7116 0.0 0.1 8408 59 3152 1 08:24:04 00:01
/var/cfengine/bin/cf-serverd
sterlz001
root 23043 1 23043 0.0 0.1 8280 59 3024 1 18:47:13 00:10
/var/cfengine/bin/cf-serverd
global
nwatson 10683 10094 10682 0.0 0.1 1720 49 1320 1 09:29:01 00:00
grep cf-serverd
global
Why does the match fail in Solaris?
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine