- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: mon_EMSHAProvider_state.sh cron job failing wi...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2010 02:58 AM
тАО08-16-2010 02:58 AM
I've seen that there's a cron job that runs the script /etc/opt/resmon/lbin/mon_EMSHAProvider_state.sh everytime. As far as I know this script checks if EMS is running and starts it just in case its down.
The issue is that I receive alerts everyday about this cronjob failing (its fails once a day) and if I check the cron log i get the following excerpt:
> CMD: sleep 15;/etc/opt/resmon/lbin/mon_EMSHAProvider_state.sh
> root 22927 c Mon Aug 16 01:05:00 METDST 2010
< root 22926 c Mon Aug 16 01:05:00 METDST 2010
< root 22925 c Mon Aug 16 01:05:00 METDST 2010 rc=1
< root 22927 c Mon Aug 16 01:05:15 METDST 2010
How can I troubleshoot the reason of this (everyday) failed cronjob?
Regards.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2010 03:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2010 03:32 AM
тАО08-16-2010 03:32 AM
Re: mon_EMSHAProvider_state.sh cron job failing with rc=1
#############################################################
# Check if cimserver is running
#############################################################
is_cimserver_running()
{
message=$( /usr/bin/ps -e | /usr/bin/grep cimserver | /usr/bin/grep -v cimserverd | /usr/bin/grep -v cimservera 2>&1 )
if [ $? -ne 0 ]
then
return 1
fi
return 0
}
NOTE: If cimserver is not running, the script exit with condition 1.
Verify /var/adm/cron/log file
rgs,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2010 04:04 AM
тАО08-16-2010 04:04 AM
Re: mon_EMSHAProvider_state.sh cron job failing with rc=1
+ PROVIDER_MODULE=EMSHAProviderModule
+ + /opt/wbem/bin/cimprovider -ls
+ awk { print $2}
+ grep EMSHAProviderModule
STATUS=OK
+ [ OK = Degraded ]
cat /etc/opt/resmon/lbin/mon_EMSHAProvider_state.sh (08-16 14:01)
#!/sbin/sh
#
#-------------------------------------------------------
# If ProviderModule state is "Degraded" then
# disable/re-enable it
#-------------------------------------------------------
CIMPROVIDER=/opt/wbem/bin/cimprovider
PROVIDER_MODULE=EMSHAProviderModule
STATUS=`$CIMPROVIDER -ls | grep $PROVIDER_MODULE | awk '{ print $2}' `
if [ "$STATUS" = "Degraded" ]
then
# Disable Provider Module
$CIMPROVIDER -d -m $PROVIDER_MODULE
# Enable Provider Module
$CIMPROVIDER -e -m $PROVIDER_MODULE
fi
#---------------------------------------------------------------------
Ok, this script fails with rc=1 if cimserver is not running at any time. How can I check while cimserver was not running at that moment???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2010 04:15 AM
тАО08-16-2010 04:15 AM
Re: mon_EMSHAProvider_state.sh cron job failing with rc=1
The script only check if the ProviderModule state is "Degraded" then disable and enable it.
The CIM Server must be started using the cimserver command. If the system is rebooted, the CIM Server will automatically
restart, with the exception of the case where the CIM Server was shutdown prior to the reboot.
- Verify than cimserver is running:
# cimserver -l -s
- If cimserver is not running then start with:
# cimserver
man cimserver
man cimserverd
rgs,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2010 04:24 AM
тАО08-16-2010 04:24 AM
Re: mon_EMSHAProvider_state.sh cron job failing with rc=1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2010 04:32 AM
тАО08-16-2010 04:32 AM
Re: mon_EMSHAProvider_state.sh cron job failing with rc=1
Cron is telling you the return code (rc) of the last command. In your case the last command returned a value of one (1).
Posible cause:
cimserver daemon proccess is not running.
Restart cimserver
# cimserver -s
# cimserver
# cimserver -l -s
rgs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2010 10:33 PM
тАО08-16-2010 10:33 PM