- Community Home
- >
- Servers and Operating Systems
- >
- HPE ProLiant
- >
- ProLiant Servers (ML,DL,SL)
- >
- sbin PATH issue with hp-snmp-agents-8.3.0.27-24
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
Forums
Discussions
Discussions
Forums
Discussions
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
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
12-16-2009 06:16 AM
12-16-2009 06:16 AM
sbin PATH issue with hp-snmp-agents-8.3.0.27-24
/opt/hp/hp-snmp-agents/server/etc/cmasm2d: line 44: dmidecode: command not found
/opt/hp/hp-snmp-agents/server/etc/cmasm2d: line 45: dmidecode: command not found
/opt/hp/hp-snmp-agents/server/etc/cmasm2d: /opt/hp/hp-snmp-agents/server/etc/cmarackd: line 24: pidof: command not found
/opt/hp/hp-snmp-agents/server/etc/cpqriisd: line 17: cmaerr: command not found
After looking in /opt/hp/hp-snmp-agents/server/etc/cmasm2d, I noticed lines like this:
RODNAME=`dmidecode | grep "Product Name" | cut -d" " -f4 | head -n1`
GENERATION=`dmidecode | grep "Product Name" | cut -d" " -f5 | head -n1`
Binaries like dmidecode and pidof are located in "sbin" paths like /sbin or /usr/sbin, which are not in the default PATH on a Red Hat system.
It appears the scripts should be detecting the actual path of the binaries instead of assuming they are in the path.
Also, those dmidecode lines don't appear in that script in hp-snmp-agents-8.1.0-110.rhel4, and the service stops and starts OK on a RHEL4 server.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2009 06:33 AM
12-16-2009 06:33 AM
Re: sbin PATH issue with hp-snmp-agents-8.3.0.27-24
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2009 07:05 AM
12-16-2009 07:05 AM
Re: sbin PATH issue with hp-snmp-agents-8.3.0.27-24
However, my point in bringing this up is that I believe this is a bug in HP's software, and the fix should come from HP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2009 08:59 AM
12-16-2009 08:59 AM
Re: sbin PATH issue with hp-snmp-agents-8.3.0.27-24
How do the installation or software settings differ in the RHEL4 release? i.e. does RHEL4 use the /sbin in the PATH (OS or SNMP software) or do they put their binaries in /bin or /usr/bin?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2009 10:45 AM
12-16-2009 10:45 AM
Re: sbin PATH issue with hp-snmp-agents-8.3.0.27-24
In some scripts, they just call "pidof" directly:
---/opt/hp/hp-snmp-agents/server/etc/cmarackd---
pid=`pidof -o $$ -o $PPID -o %PPID -x $1`
---/opt/hp/hp-snmp-agents/server/etc/cmarackd---
But, in others, they do things much better:
---/opt/hp/hp-snmp-agents/server/etc/cmad---
...
#different distros put pidof in different places
if [ -f /sbin/pidof ]; then
PIDOF=/sbin/pidof
elif [ -f /bin/pidof ]; then
PIDOF=/bin/pidof
fi
...
pidlist=`$PIDOF -o $$ $PNAME`
---/opt/hp/hp-snmp-agents/server/etc/cmad---
The need these sanity checks in all their scripts.