Operating System - HP-UX
1834935 Members
2250 Online
110071 Solutions
New Discussion

Re: EMS and toggle_switch

 
Aravind_3
Frequent Advisor

EMS and toggle_switch

Here's one executable /etc/opt/resmon/lbin/toggle_switch
in connection with EMS (Event Monitoring Service )

EMS can invoked by toggle_switch restart option
and can be stopped by
toggle_switch stop option


I would like to know which is the process which gets killed when we use

/etc/opt/resmon/lbin/toggle_switch stop

Or

Which are the processes it starts when we execute this
/etc/opt/resmon/lbin/toggle_switch restart


Thanks
Aravind
8 REPLIES 8
Cheryl Griffin
Honored Contributor

Re: EMS and toggle_switch

Aravind,
/etc/opt/resmon/lbin/toggle_switch restart affects the following:

/etc/opt/resmon/lbin/start mon_client
/etc/opt/resmon/lbin/registrar
/etc/opt/resmon/lbin/startmon_client


Cheryl
"Downtime is a Crime."
S.K. Chan
Honored Contributor

Re: EMS and toggle_switch

I'm not sure if this will answer your question. If you do ..
# strings toggle_switch | more
and look closely the first 50 or so lines, you'll see that "toggle_switch" actually calls "cstm" and passing these parameters to it ( from file /var/stm/data/tools/monitor/stop_psm and start_psm )
The "stop_psm" file has this ..
DaemonShutdown daemon -all,"psmctd" OK
and "start_pasm" file has this ..
DaemonStartup daemon -all,"psmctd" OK
In cstm ...
cstm > daemonstartup
(To shutdown ...
1) cclogd
2) diaglogd
3) memlogd
..so that's tell me running "toggle_switch" actually restart all 1,2 and 3.
Aravind_3
Frequent Advisor

Re: EMS and toggle_switch

To make things more simpler:

I would like to know
how do i know whether the EMS is in enabled state or
EMS is in disabled state ?
S.K. Chan
Honored Contributor

Re: EMS and toggle_switch

You would ..
# cd /etc/opt/resmon/lbin
# ./monconfig
==> You would see "EVENT MONITORING IS CURRENTLY ENABLED" if EMS is enabled. This is followed by a list of options in the "Monitoring Request Manager Menu".
Also (to really confirm ..)
# ps -ef|grep resmon
==> You should see 2 processes running is EMS is enabled.. They are ..
a) emsagent
b) p_client
Tom Geudens
Honored Contributor

Re: EMS and toggle_switch

Hi,
To answer your last question, execute :
/etc/opt/resmon/lbin/monconfig

Hope it helps,
Tom
A life ? Cool ! Where can I download one of those from ?
Aravind_3
Frequent Advisor

Re: EMS and toggle_switch

Yes!
Running ./monconfig gives me the current status. Fine.

But
Even in disabled EMS state
emsagent
p_client
are still running.

Don't they get killed in disabled state ?
How do i know by the processes whether it is in enabled or disabled state.
Aravind_3
Frequent Advisor

Re: EMS and toggle_switch

Yes!
Running ./monconfig gives me the current status. Fine.

But
Even in disabled EMS state
emsagent
p_client
are still running.

Don't they get killed in disabled state ?
How do i know by the processes whether it is in enabled or disabled state.
S.K. Chan
Honored Contributor

Re: EMS and toggle_switch

Good question .. it almost got me too ! The existence of these 2 processes (emsagent and p_client) confirms EMS is running. The reason why they are always in the process list is because I think /etc/inittab respawns them. Just take a look at /etc/inittab, you should see entries that has ems1->ems4 in it. What you can do is before you run monconfig to disable EMS, edit /etc/inittab and comment these lines out with a "#" then run ..
# init q
to re-read /etc/inittab. Now run monconfig and disable (the "K" option). I bet emsagent and p_client will not be restarted.